Skip to contentSkip to conversation

test_power: Fix battery_current initial value

PATCH In review lh lin 2 participants 2 messages Jul 29, 2020 Power supply

lore
Share & tools
lore

lh lin

author
#0 lore raw

PATCH 1/1 test_power: Fix battery_current initial value

From: LH Lin <[email protected]>

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

---
 drivers/power/supply/test_power.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/test_power.c +1 -1
index 65c23ef6408d..4f29f0f096f5 100644
@@ -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;
 
Signature · 1 line
2.18.0
#1 lore raw

Hi,

Quoted 7 lines · lh lin

From: LH Lin <[email protected]>

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

---

Thanks, queued.

-- Sebastian

Quoted 18 lines
 drivers/power/supply/test_power.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/test_power.c +1 -1
index 65c23ef6408d..4f29f0f096f5 100644
@@ -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;
 
Signature · 1 line
2.18.0