Skip to content

Commit

Permalink
hwmon: (oxp-sensors) Fix pwm reading
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joaquín Ignacio Aramendía authored and Guenter Roeck committed Dec 5, 2022
1 parent 6ff838f commit 0cd3ba6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hwmon/oxp-sensors.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0cd3ba6

Please sign in to comment.