Re: [PATCH] sensors-detect: Make LM73 detection less problematic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2011-08-30 at 16:19 -0400, Jean Delvare wrote:
> Same idea as the change just made to the lm73 driver itself: do as
> much detection as possible with byte reads.
> 
> Index: prog/detect/sensors-detect
> ===================================================================
> --- prog/detect/sensors-detect	(révision 5993)
> +++ prog/detect/sensors-detect	(copie de travail)
> @@ -4044,7 +4044,9 @@
>  	# Bits that always return 0
>  	return if ($conf & 0x0c) or ($status & 0x10);
>  
> -	return if i2c_smbus_read_word_data($file, 0x07) != 0x9001;
> +	# Test with byte read first to avoid confusing other chips
> +	return if i2c_smbus_read_byte_data($file, 0x07) != 0x01
> +	       or i2c_smbus_read_word_data($file, 0x07) != 0x9001;
>  
>  	# Make sure the chip supports SMBus read word transactions
>  	my $cur = i2c_smbus_read_word_data($file, 0x00);
> 
> 
Looks good. 

Reminds me - would be great if you could find the time to comment on the
sensors patch I sent out a while ago (adding support for the new sysfs
attributes).

Thanks,
Guenter




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



[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux