Battery fixes
cover Battery fixes
Alan Cox (1):
intel mid battery: Fix battery scaling
Arjan van de Ven (1):
Fix the argument order to intel_scu_ipc_command in the battery driver
drivers/power/intel_mid_battery.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
Signature · 2 lines
"CMS is like a porcupine in a balloon factory" --Alan Altmark
PATCH 1/2 Fix the argument order to intel_scu_ipc_command in the battery driver
From: Arjan van de Ven <[email protected]>
The arguments to intel_scu_ipc_command are "command, subcommand" the battery driver got this the wrong way around.
---
drivers/power/intel_mid_battery.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/power/intel_mid_battery.c +1 -1
@@ -168,7 +168,7 @@ struct battery_property {*/ static int pmic_scu_ipc_battery_cc_read (u32 *value) { -return intel_scu_ipc_command (IPC_CMD_CC_RD ,IPCMSG_BATTERY , +return intel_scu_ipc_command (IPCMSG_BATTERY ,IPC_CMD_CC_RD ,NULL ,0 , value,1 ); }
PATCH 2/2 intel mid battery: Fix battery scaling
In reply to Alan CoxThere are 3600 seconds per not 3600 hours per second. Correcting this along with the previous fix gives sensible numbers.
---
drivers/power/intel_mid_battery.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/power/intel_mid_battery.c +1 -1
@@ -427,7 +427,7 @@ static int pmic_usb_get_property(struct power_supply *psy,static inline unsigned long mAStouAh (unsigned long v) {/* seconds to hours, mA to µA */ -return v *3600 *1000 ; +return (v *1000 ) /3600 ; }/**
Anton Vorontsov
AppliedQuoted 5 lines · Alan Cox
Alan Cox (1):
intel mid battery: Fix battery scalingArjan van de Ven (1):
Fix the argument order tointel_scu_ipc_commandin the battery driver
Applied, thanks!