aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/libxed.py
diff options
context:
space:
mode:
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>2022-07-20 22:22:55 -0500
committerGuenter Roeck <linux@roeck-us.net>2022-07-21 07:18:39 -0700
commit0eabb1396656f215a5333a9444158b17b0fd3247 (patch)
treed8051f245aaed268c87f7651b2cdb5041a5384b9 /tools/perf/scripts/python/libxed.py
parent3b1ea71faccba3abbf71f9a2510c212e1783b6e1 (diff)
hwmon: (tps23861) fix byte order in current and voltage registers
Trying to use this driver on a big-endian machine results in garbage values for voltage and current. The tps23861 registers are little- endian, and regmap_read_bulk() does not do byte order conversion. Thus on BE machines, the most significant bytes got modified, and were trimmed by the VOLTAGE_CURRENT_MASK. To resolve this use uint16_t values, and convert them to host byte order using le16_to_cpu(). This results in correct readings on MIPS. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Link: https://lore.kernel.org/r/20220721032255.2850647-1-mr.nuke.me@gmail.com [groeck: Use __le16 instead of uint16_t] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'tools/perf/scripts/python/libxed.py')
0 files changed, 0 insertions, 0 deletions