hwmon: (oxp-sensors) Fix pwm reading

PWM reading is only 1 register long.

Signed-off-by: Joaquín Ignacio Aramendía <samsagax@gmail.com>
Link: https://lore.kernel.org/r/20221128185206.212022-1-samsagax@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
Joaquín Ignacio Aramendía 2022-11-28 15:52:06 -03:00 committed by Guenter Roeck
parent 6ff838f287
commit 0cd3ba682a

View File

@ -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)