[PATCH] hwmon: fix temp fault in dme1737 driver

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

 



Hi Juerg,

On Mon, 16 Jul 2007 18:35:36 -0700, Juerg Haefliger wrote:
> Fix temp?_fault attribute. The temp was incorrectly compared against
> 0x0800 rather than 0x8000.
> 
> Signed-off-by: Juerg Haefliger <juergh at gmail.com>

Have you verified that this works as intended in practice? The
datasheet says that "a diode fault condition forces the diode reading
register to a value of 80h", which leaves some doubt on whether the 4
LSBs, which live in a different register, are set to 0 as well or not.
So I wonder if:

	res = ((data->temp[ix] & 0xff00) == (s16)0x8000);

wouldn't be a better test.

-- 
Jean Delvare




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

  Powered by Linux