mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] Battery fixes
@ 2010-08-10  9:27 Alan Cox
  2010-08-10  9:27 ` [PATCH 1/2] Fix the argument order to intel_scu_ipc_command in the battery driver Alan Cox
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Alan Cox @ 2010-08-10  9:27 UTC (permalink / raw)
  To: cbou, dwmw2, linux-kernel

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(-)

-- 
	"CMS is like a porcupine in a balloon factory"
					--Alan Altmark



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] Fix the argument order to intel_scu_ipc_command in the battery driver
  2010-08-10  9:27 [PATCH 0/2] Battery fixes Alan Cox
@ 2010-08-10  9:27 ` Alan Cox
  2010-08-10  9:28 ` [PATCH 2/2] intel mid battery: Fix battery scaling Alan Cox
  2010-08-10 10:37 ` [PATCH 0/2] Battery fixes Anton Vorontsov
  2 siblings, 0 replies; 4+ messages in thread
From: Alan Cox @ 2010-08-10  9:27 UTC (permalink / raw)
  To: cbou, dwmw2, linux-kernel

From: Arjan van de Ven <arjan@linux.intel.com>

The arguments to intel_scu_ipc_command are "command, subcommand"
the battery driver got this the wrong way around.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
---

 drivers/power/intel_mid_battery.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/drivers/power/intel_mid_battery.c b/drivers/power/intel_mid_battery.c
index 46730f5..6430a7b 100644
--- a/drivers/power/intel_mid_battery.c
+++ b/drivers/power/intel_mid_battery.c
@@ -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);
 }
 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] intel mid battery: Fix battery scaling
  2010-08-10  9:27 [PATCH 0/2] Battery fixes Alan Cox
  2010-08-10  9:27 ` [PATCH 1/2] Fix the argument order to intel_scu_ipc_command in the battery driver Alan Cox
@ 2010-08-10  9:28 ` Alan Cox
  2010-08-10 10:37 ` [PATCH 0/2] Battery fixes Anton Vorontsov
  2 siblings, 0 replies; 4+ messages in thread
From: Alan Cox @ 2010-08-10  9:28 UTC (permalink / raw)
  To: cbou, dwmw2, linux-kernel

There are 3600 seconds per not 3600 hours per second. Correcting this
along with the previous fix gives sensible numbers.

Signed-off-by: Alan Cox <alan@linux.intel.com>
---

 drivers/power/intel_mid_battery.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/drivers/power/intel_mid_battery.c b/drivers/power/intel_mid_battery.c
index 6430a7b..c61ffec 100644
--- a/drivers/power/intel_mid_battery.c
+++ b/drivers/power/intel_mid_battery.c
@@ -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;
 }
 
 /**


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] Battery fixes
  2010-08-10  9:27 [PATCH 0/2] Battery fixes Alan Cox
  2010-08-10  9:27 ` [PATCH 1/2] Fix the argument order to intel_scu_ipc_command in the battery driver Alan Cox
  2010-08-10  9:28 ` [PATCH 2/2] intel mid battery: Fix battery scaling Alan Cox
@ 2010-08-10 10:37 ` Anton Vorontsov
  2 siblings, 0 replies; 4+ messages in thread
From: Anton Vorontsov @ 2010-08-10 10:37 UTC (permalink / raw)
  To: Alan Cox; +Cc: dwmw2, linux-kernel

On Tue, Aug 10, 2010 at 10:27:43AM +0100, Alan Cox wrote:
> 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

Applied, thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-08-10 10:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-10  9:27 [PATCH 0/2] Battery fixes Alan Cox
2010-08-10  9:27 ` [PATCH 1/2] Fix the argument order to intel_scu_ipc_command in the battery driver Alan Cox
2010-08-10  9:28 ` [PATCH 2/2] intel mid battery: Fix battery scaling Alan Cox
2010-08-10 10:37 ` [PATCH 0/2] Battery fixes Anton Vorontsov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome