diff options
author | David Lechner <david@lechnology.com> | 2018-07-20 23:19:44 +0300 |
---|---|---|
committer | Sebastian Reichel <sebastian.reichel@collabora.co.uk> | 2018-07-23 00:33:43 +0300 |
commit | 9c7272412bc556f6af2a89e0f1660dacb44e3b1d (patch) | |
tree | f64457adabcb29593b72b54e53cb934a5998cc8c | |
parent | 6e92cecb1e1b073c0cbd1e0e0f338803e0df1924 (diff) | |
download | linux-9c7272412bc556f6af2a89e0f1660dacb44e3b1d.tar.xz |
power: supply: lego_ev3_battery: fix Vce offset
This fixes the value that accounts for the Vce of a transistor in the
LEGO MINDSTORMS EV3 power supply driver. The old value (200mV) was the
max value from the data sheet. After testing, the actual value has been
found to be 50mV. By using 50mV we get a more accurate voltage
indication.
Signed-off-by: David Lechner <david@lechnology.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
-rw-r--r-- | drivers/power/supply/lego_ev3_battery.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/supply/lego_ev3_battery.c b/drivers/power/supply/lego_ev3_battery.c index 6e3b3e384172..1ae3710909b7 100644 --- a/drivers/power/supply/lego_ev3_battery.c +++ b/drivers/power/supply/lego_ev3_battery.c @@ -52,7 +52,7 @@ static int lego_ev3_battery_get_property(struct power_supply *psy, return ret; val->intval *= 2000; - val->intval += 200000; + val->intval += 50000; /* plus adjust for shunt resistor drop */ ret = iio_read_channel_processed(batt->iio_i, &val2); |