diff mbox series

hwmon: (oxp-sensors) Bugfix pwm reading

Message ID 20221128185206.212022-1-samsagax@gmail.com (mailing list archive)
State Accepted
Headers show
Series hwmon: (oxp-sensors) Bugfix pwm reading | expand

Commit Message

Joaquín Ignacio Aramendía Nov. 28, 2022, 6:52 p.m. UTC
PWM reading is only 1 register long.

Signed-off-by: Joaquín Ignacio Aramendía <samsagax@gmail.com>
---
 drivers/hwmon/oxp-sensors.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: 9494c53e1389b120ba461899207ac8a3aab2632c

Comments

Guenter Roeck Nov. 28, 2022, 10:19 p.m. UTC | #1
On Mon, Nov 28, 2022 at 03:52:06PM -0300, Joaquín Ignacio Aramendía wrote:
> PWM reading is only 1 register long.
> 
> Signed-off-by: Joaquín Ignacio Aramendía <samsagax@gmail.com>

Applied.

Thanks,
Guenter

> ---
>  drivers/hwmon/oxp-sensors.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 
> base-commit: 9494c53e1389b120ba461899207ac8a3aab2632c
> 
> diff --git a/drivers/hwmon/oxp-sensors.c b/drivers/hwmon/oxp-sensors.c
> index c04277676b72..f84ec8f8eda9 100644
> --- a/drivers/hwmon/oxp-sensors.c
> +++ b/drivers/hwmon/oxp-sensors.c
> @@ -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)
diff mbox series

Patch

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