power: supply: test_power: Fix battery_current initial value
authorLH Lin <lh.lin@mediatek.com>
Wed, 29 Jul 2020 12:14:00 +0000 (20:14 +0800)
committerSebastian Reichel <sre@kernel.org>
Wed, 29 Jul 2020 17:43:49 +0000 (19:43 +0200)
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>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/test_power.c

index b3c05ff05783fb64494d9e09075ac0c1cde1eafd..04acd76bbaa1261aa0d5a34e83bb8ecf64a96add 100644 (file)
@@ -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;