Skip to content

Commit

Permalink
hwmon: (tps23861) correct shunt LSB values
Browse files Browse the repository at this point in the history
Current shunt LSB values got reversed during in the
original driver commit.

So, correct the current shunt LSB values according to
the datasheet.

This caused reading slightly skewed current values.

Fixes: fff7b8a ("hwmon: add Texas Instruments TPS23861 driver")
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Link: https://lore.kernel.org/r/20210609220728.499879-3-robert.marko@sartura.hr
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Robert Marko authored and Guenter Roeck committed Jun 10, 2021
1 parent b325d35 commit e13d112
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/hwmon/tps23861.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@
#define TEMPERATURE_LSB 652 /* 0.652 degrees Celsius */
#define VOLTAGE_LSB 3662 /* 3.662 mV */
#define SHUNT_RESISTOR_DEFAULT 255000 /* 255 mOhm */
#define CURRENT_LSB_255 62260 /* 62.260 uA */
#define CURRENT_LSB_250 61039 /* 61.039 uA */
#define CURRENT_LSB_250 62260 /* 62.260 uA */
#define CURRENT_LSB_255 61039 /* 61.039 uA */
#define RESISTANCE_LSB 110966 /* 11.0966 Ohm*/
#define RESISTANCE_LSB_LOW 157216 /* 15.7216 Ohm*/

Expand Down

0 comments on commit e13d112

Please sign in to comment.