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>
This commit is contained in:
parent
a5055d5d68
commit
8059c1c6be
1 changed files with 1 additions and 0 deletions
|
@ -42,6 +42,7 @@ static int rx51_battery_read_adc(int channel)
|
||||||
req.method = TWL4030_MADC_SW1;
|
req.method = TWL4030_MADC_SW1;
|
||||||
req.func_cb = NULL;
|
req.func_cb = NULL;
|
||||||
req.type = TWL4030_MADC_WAIT;
|
req.type = TWL4030_MADC_WAIT;
|
||||||
|
req.raw = true;
|
||||||
|
|
||||||
if (twl4030_madc_conversion(&req) <= 0)
|
if (twl4030_madc_conversion(&req) <= 0)
|
||||||
return -ENODATA;
|
return -ENODATA;
|
||||||
|
|
Loading…
Reference in a new issue