diff options
author | Pali Rohár <pali.rohar@gmail.com> | 2013-02-15 23:56:50 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-04-08 16:36:27 +0200 |
commit | 8059c1c6be45973ea72342567a6ede5f4f0bf8e7 (patch) | |
tree | e9ae060b1e6a8eb62cbf886efc2c6a659eaf99a4 /drivers/power/rx51_battery.c | |
parent | a5055d5d683605210f77d46614bbdb389c1e4a07 (diff) |
power: rx51_battery: Fix reporting correct values
Tell twl4030_madc_conversion that this driver needs raw values.
Driver twl4030_madc has some hardcoded values and conversation
functions which are incorrect for Nokia RX-51 board. This driver
rx51_battery expects raw values which convert itself.
This patch fixing values reported by power supply interface.
Before this patch driver reported always incorrect values on
3.8 kernel (sometimes design capacity was negative).
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Acked-by: Anton Vorontsov <anton@enomsg.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/power/rx51_battery.c')
-rw-r--r-- | drivers/power/rx51_battery.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/power/rx51_battery.c b/drivers/power/rx51_battery.c index 8208888b844e..35f625e18ba6 100644 --- a/drivers/power/rx51_battery.c +++ b/drivers/power/rx51_battery.c @@ -42,6 +42,7 @@ static int rx51_battery_read_adc(int channel) req.method = TWL4030_MADC_SW1; req.func_cb = NULL; req.type = TWL4030_MADC_WAIT; + req.raw = true; if (twl4030_madc_conversion(&req) <= 0) return -ENODATA; |