Skip to content

Commit

Permalink
power: rx51_battery: Fix reporting correct values
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Anton Vorontsov <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
  • Loading branch information
pali authored and Samuel Ortiz committed Apr 8, 2013
1 parent a5055d5 commit 8059c1c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/power/rx51_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8059c1c

Please sign in to comment.