Commit 0cd3ba68 authored by Joaquín Ignacio Aramendía's avatar Joaquín Ignacio Aramendía Committed by Guenter Roeck

hwmon: (oxp-sensors) Fix pwm reading

PWM reading is only 1 register long.
Signed-off-by: default avatarJoaquín Ignacio Aramendía <samsagax@gmail.com>
Link: https://lore.kernel.org/r/20221128185206.212022-1-samsagax@gmail.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 6ff838f2
......@@ -158,7 +158,7 @@ static int oxp_platform_read(struct device *dev, enum hwmon_sensor_types type,
case hwmon_pwm:
switch (attr) {
case hwmon_pwm_input:
ret = read_from_ec(OXP_SENSOR_PWM_REG, 2, val);
ret = read_from_ec(OXP_SENSOR_PWM_REG, 1, val);
if (ret)
return ret;
if (board == oxp_mini_amd)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment