Relax probing for ds1337.c

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

 



Hi,

I'm using mainline drivers/i2c/chips/ds1337.c (Dallas RTC)
for an embedded ep93xx board. (ARM based)

Whenever I end up with an invalid date in the RTC,
(first time boot, backup battery power failure, ...)
I run into the following vicious circle:

Invalid date -> i2c driver probing fails -> RTC driver doesn't get
loaded, ==> no chance of setting a valid date with hwclock.

I've looked at the probing routines and found them to be quite picky,
especially when compared to other RTC drivers. The following patch
relaxes the checks a bit so that the driver gets loaded even if the
date in the RTC is invalid.

This should not lead to problems, because startup scripts usually
detect invalid date/time and use hwclock to set some bogus, but valid
date. (like 1st Jan 2002). Afterwards user/ntpdate/dcf77/gps can set a
valid date again.

I've already sent this to the author, but he asked me to have it
reviewed first.

Please tell me whether this changes are acceptable, or if there is a
better way.

Thanks
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Relax-probing-to-prevent-catch22.txt
Url: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20060223/b1767ccd/attachment.txt 


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

  Powered by Linux