Re: [PATCH] hwmon: (lm75) Strengthen detect function

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

 



Hi Guenter,

On Fri, 5 Dec 2014 08:47:24 -0800, Guenter Roeck wrote:
> I was trying to run a module test for tmp421 while having the lm75 driver
> loaded. Loading the i2c-stub driver with address 0x4c caused lm75 detection
> to run, which detected the simulated chip at 0x4c as lm75 (because all
> registers in i2c-stub are initially set to 0) and instantiated it. This of
> course was a bit of a bummer when I tried to manually instantiate the tmp421
> afterwards, causing my module test to fail. So it wasn't a real chip, just
> an annoying side effect of trying to use i2c-stub while the lm75 driver
> was loaded.

Yes, I had the same problem with i2c-stub in the past while testing
multiple drivers. I've fixed detection functions each time it happened.
Feel tree to fix every i2c detection function which trips on all-zeroes.

> (...)
> Guess I'll apply the patch as-is. If anything I wonder if it would make sense
> to add the same test to sensors-detect (in addition to the comparison).

As you wish, I'm fine both ways.

-- 
Jean Delvare
SUSE L3 Support

_______________________________________________
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