[lm-sensors] [PATCH] hwmon/f71882fg: Actually read registers for the "extra" fan on the f71808a

Jean Delvare khali at linux-fr.org
Wed Apr 27 20:21:50 CEST 2011


On Wed, 27 Apr 2011 19:32:18 +0200, Hans de Goede wrote:
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> ---
>  drivers/hwmon/f71882fg.c |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c
> index 61ffab5..a4a94a0 100644
> --- a/drivers/hwmon/f71882fg.c
> +++ b/drivers/hwmon/f71882fg.c
> @@ -1266,7 +1266,13 @@ static struct f71882fg_data *f71882fg_update_device(struct device *dev)
>  			data->pwm[nr] =
>  			    f71882fg_read8(data, F71882FG_REG_PWM(nr));
>  		}
> -		/* The f8000 can monitor 1 more fan, but has no pwm for it */
> +		/* Some models have 1 more fan with limited capabilities */
> +		if (data->type == f71808a) {
> +			data->fan[2] = f71882fg_read16(data,
> +						F71882FG_REG_FAN(2));
> +			data->pwm[2] = f71882fg_read8(data,
> +							F71882FG_REG_PWM(2));
> +		}
>  		if (data->type == f8000)
>  			data->fan[3] = f71882fg_read16(data,
>  						F71882FG_REG_FAN(3));

Merged, thanks.

-- 
Jean Delvare




More information about the lm-sensors mailing list