Re: [PATCH 3/4] drivers/hwmon/lm80.c: added error handling

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

 



Oops:

Forgot to mention this in the commit message but this:

  static struct lm80_data *lm80_update_device(struct device *dev)
 {

[...]

+       if (!data->valid)
+       {
+               /* last time failed: re-initialize the LM80 chip */
+               lm80_init_client(client);
+       }
       if (time_after(jiffies, data->last_updated + 2 * HZ) || !data->valid) {

was added to reinitialize the chip if the data is not valid.

This helps that if the device is disconnected temporarily it will give the proper value again after being connected.

(this is tested with a small fan+LM80 pcb that is connected to the main system with a connector so the fan can be serviced/replaced if needed (which was the reason to author this patch in the first place)).

Best regards, Frans.
_______________________________________________
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