diff mbox series

test_power: Fix battery_current initial value

Message ID 20200729121400.20960-1-lh.lin@mediatek.com (mailing list archive)
State Mainlined
Commit c365ee561ee343b587df9f5ba191c1a090d4f43e
Headers show
Series test_power: Fix battery_current initial value | expand

Commit Message

lh lin July 29, 2020, 12:14 p.m. UTC
From: LH Lin <lh.lin@mediatek.com>

Since default battery_status is POWER_SUPPLY_STATUS_DISCHARGING,
we should change default battery_current to a negative value.

Signed-off-by: LH Lin <lh.lin@mediatek.com>
---
 drivers/power/supply/test_power.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sebastian Reichel July 29, 2020, 8:38 p.m. UTC | #1
Hi,

On Wed, Jul 29, 2020 at 08:14:00PM +0800, lh lin wrote:
> From: LH Lin <lh.lin@mediatek.com>
> 
> Since default battery_status is POWER_SUPPLY_STATUS_DISCHARGING,
> we should change default battery_current to a negative value.
> 
> Signed-off-by: LH Lin <lh.lin@mediatek.com>
> ---

Thanks, queued.

-- Sebastian

>  drivers/power/supply/test_power.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/power/supply/test_power.c b/drivers/power/supply/test_power.c
> index 65c23ef6408d..4f29f0f096f5 100644
> --- a/drivers/power/supply/test_power.c
> +++ b/drivers/power/supply/test_power.c
> @@ -34,7 +34,7 @@ static int battery_technology		= POWER_SUPPLY_TECHNOLOGY_LION;
>  static int battery_capacity		= 50;
>  static int battery_voltage		= 3300;
>  static int battery_charge_counter	= -1000;
> -static int battery_current		= 1600;
> +static int battery_current		= -1600;
>  
>  static bool module_initialized;
>  
> -- 
> 2.18.0
diff mbox series

Patch

diff --git a/drivers/power/supply/test_power.c b/drivers/power/supply/test_power.c
index 65c23ef6408d..4f29f0f096f5 100644
--- a/drivers/power/supply/test_power.c
+++ b/drivers/power/supply/test_power.c
@@ -34,7 +34,7 @@  static int battery_technology		= POWER_SUPPLY_TECHNOLOGY_LION;
 static int battery_capacity		= 50;
 static int battery_voltage		= 3300;
 static int battery_charge_counter	= -1000;
-static int battery_current		= 1600;
+static int battery_current		= -1600;
 
 static bool module_initialized;