Skip to contentSkip to conversation

hwmon: (oxp-sensors) Bugfix pwm reading

PATCH Applied Joaquín Ignacio Aramendía 2 participants 2 messages Nov 28, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwmon: (oxp-sensors) Bugfix pwm reading

PWM reading is only 1 register long.

---
 drivers/hwmon/oxp-sensors.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/oxp-sensors.c +1 -1
index c04277676b72..f84ec8f8eda9 100644
@@ -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)

base-commit: 9494c53e1389b120ba461899207ac8a3aab2632c

Signature · 1 line
2.38.1
maintainer Applied
#1 lore raw
Quoted 3 lines · Joaquín Ignacio Aramendía

PWM reading is only 1 register long.

Applied.

Thanks,
Guenter

Quoted 20 lines
---
 drivers/hwmon/oxp-sensors.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

base-commit: 9494c53e1389b120ba461899207ac8a3aab2632c

drivers/hwmon/oxp-sensors.c +1 -1
index c04277676b72..f84ec8f8eda9 100644
@@ -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)