All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] [PATCH] hwmon (w83627hf) Don't touch nonexistent I2C address registers
@ 2012-10-26  7:58 Jean Delvare
  2012-10-26 13:53 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Jean Delvare @ 2012-10-26  7:58 UTC (permalink / raw)
  To: lm-sensors

Only the W83627HF could be accessed through I2C. All other supported
chips are LPC-only, so they do not have I2C address registers. Don't
write to nonexistent or reserved registers on these chips.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
---
 drivers/hwmon/w83627hf.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- linux-3.7-rc2.orig/drivers/hwmon/w83627hf.c	2012-10-26 09:38:18.000000000 +0200
+++ linux-3.7-rc2/drivers/hwmon/w83627hf.c	2012-10-26 09:50:44.935025004 +0200
@@ -1732,8 +1732,10 @@ static void __devinit w83627hf_init_devi
 	/* Minimize conflicts with other winbond i2c-only clients...  */
 	/* disable i2c subclients... how to disable main i2c client?? */
 	/* force i2c address to relatively uncommon address */
-	w83627hf_write_value(data, W83781D_REG_I2C_SUBADDR, 0x89);
-	w83627hf_write_value(data, W83781D_REG_I2C_ADDR, force_i2c);
+	if (type = w83627hf) {
+		w83627hf_write_value(data, W83781D_REG_I2C_SUBADDR, 0x89);
+		w83627hf_write_value(data, W83781D_REG_I2C_ADDR, force_i2c);
+	}
 
 	/* Read VID only once */
 	if (type = w83627hf || type = w83637hf) {


-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [lm-sensors] [PATCH] hwmon (w83627hf) Don't touch nonexistent I2C address registers
  2012-10-26  7:58 [lm-sensors] [PATCH] hwmon (w83627hf) Don't touch nonexistent I2C address registers Jean Delvare
@ 2012-10-26 13:53 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2012-10-26 13:53 UTC (permalink / raw)
  To: lm-sensors

On Fri, Oct 26, 2012 at 09:58:59AM +0200, Jean Delvare wrote:
> Only the W83627HF could be accessed through I2C. All other supported
> chips are LPC-only, so they do not have I2C address registers. Don't
> write to nonexistent or reserved registers on these chips.
> 
> Signed-off-by: Jean Delvare <khali@linux-fr.org>

Acked-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/hwmon/w83627hf.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> --- linux-3.7-rc2.orig/drivers/hwmon/w83627hf.c	2012-10-26 09:38:18.000000000 +0200
> +++ linux-3.7-rc2/drivers/hwmon/w83627hf.c	2012-10-26 09:50:44.935025004 +0200
> @@ -1732,8 +1732,10 @@ static void __devinit w83627hf_init_devi
>  	/* Minimize conflicts with other winbond i2c-only clients...  */
>  	/* disable i2c subclients... how to disable main i2c client?? */
>  	/* force i2c address to relatively uncommon address */
> -	w83627hf_write_value(data, W83781D_REG_I2C_SUBADDR, 0x89);
> -	w83627hf_write_value(data, W83781D_REG_I2C_ADDR, force_i2c);
> +	if (type = w83627hf) {
> +		w83627hf_write_value(data, W83781D_REG_I2C_SUBADDR, 0x89);
> +		w83627hf_write_value(data, W83781D_REG_I2C_ADDR, force_i2c);
> +	}
>  
>  	/* Read VID only once */
>  	if (type = w83627hf || type = w83637hf) {
> 
> 
> -- 
> Jean Delvare
> 
> _______________________________________________
> lm-sensors mailing list
> lm-sensors@lm-sensors.org
> http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
> 

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-26 13:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-26  7:58 [lm-sensors] [PATCH] hwmon (w83627hf) Don't touch nonexistent I2C address registers Jean Delvare
2012-10-26 13:53 ` Guenter Roeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.