* [PATCH] hwmon: (max31790) Set correct PWM value
@ 2017-03-07 19:38 Alex Hemme
2017-03-07 22:19 ` Guenter Roeck
0 siblings, 1 reply; 2+ messages in thread
From: Alex Hemme @ 2017-03-07 19:38 UTC (permalink / raw)
To: jdelvare, linux; +Cc: linux-hwmon, Alex Hemme
Traced fans not spinning to incorrect PWM value being written.
The passed in value was written instead of the calulated value.
Fixes: 54187ff9d766 ("hwmon: (max31790) Convert to use new hwmon registration API")
Signed-off-by: Alex Hemme <ahemme@cisco.com>
---
drivers/hwmon/max31790.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwmon/max31790.c b/drivers/hwmon/max31790.c
index c1b9275..281491c 100644
--- a/drivers/hwmon/max31790.c
+++ b/drivers/hwmon/max31790.c
@@ -311,7 +311,7 @@ static int max31790_write_pwm(struct device *dev, u32 attr, int channel,
data->pwm[channel] = val << 8;
err = i2c_smbus_write_word_swapped(client,
MAX31790_REG_PWMOUT(channel),
- val);
+ data->pwm[channel]);
break;
case hwmon_pwm_enable:
fan_config = data->fan_config[channel];
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] hwmon: (max31790) Set correct PWM value
2017-03-07 19:38 [PATCH] hwmon: (max31790) Set correct PWM value Alex Hemme
@ 2017-03-07 22:19 ` Guenter Roeck
0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2017-03-07 22:19 UTC (permalink / raw)
To: Alex Hemme; +Cc: jdelvare, linux-hwmon
On Tue, Mar 07, 2017 at 02:38:29PM -0500, Alex Hemme wrote:
> Traced fans not spinning to incorrect PWM value being written.
> The passed in value was written instead of the calulated value.
>
> Fixes: 54187ff9d766 ("hwmon: (max31790) Convert to use new hwmon registration API")
>
> Signed-off-by: Alex Hemme <ahemme@cisco.com>
Applied, and sorry for the trouble.
Thanks,
Guenter
> ---
> drivers/hwmon/max31790.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/max31790.c b/drivers/hwmon/max31790.c
> index c1b9275..281491c 100644
> --- a/drivers/hwmon/max31790.c
> +++ b/drivers/hwmon/max31790.c
> @@ -311,7 +311,7 @@ static int max31790_write_pwm(struct device *dev, u32 attr, int channel,
> data->pwm[channel] = val << 8;
> err = i2c_smbus_write_word_swapped(client,
> MAX31790_REG_PWMOUT(channel),
> - val);
> + data->pwm[channel]);
> break;
> case hwmon_pwm_enable:
> fan_config = data->fan_config[channel];
> --
> 1.8.3.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-08 0:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-07 19:38 [PATCH] hwmon: (max31790) Set correct PWM value Alex Hemme
2017-03-07 22:19 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox