aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorMaciej Purski <[email protected]>2017-12-18 09:43:58 +0100
committerGreg Kroah-Hartman <[email protected]>2018-01-08 16:03:42 +0100
commita28caa7b8fe19ac2c31b7630772107e0d50ce18e (patch)
treef7f4354c6d215542c99896b8701ddf8106f09d56 /tools/perf/scripts/python/bin
parentbbdcbd12a59a6306623ea5184e42a514e420b2e9 (diff)
iio: adc: ina2xx: Make calibration register value fixed
Calibration register is used for calculating current register in hardware according to datasheet: current = shunt_volt * calib_register / 2048 (ina 226) current = shunt_volt * calib_register / 4096 (ina 219) Fix calib_register value to 2048 for ina226 and 4096 for ina 219 in order to avoid truncation error and provide best precision allowed by shunt_voltage measurement. Make current scale value follow changes of shunt_resistor from sysfs as calib_register value is now fixed. Power_lsb value should also follow shunt_resistor changes as stated in datasheet: power_lsb = 25 * current_lsb (ina 226) power_lsb = 20 * current_lsb (ina 219) This is a part of the patchset: https://lkml.org/lkml/2017/11/22/394 Signed-off-by: Maciej Purski <[email protected]> Reviewed-by: Stefan BrĂ¼ns <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions