Hi, On 17/09/2015 at 14:07:47 +0200, Heiko Stübner wrote : > Am Donnerstag, 17. September 2015, 18:39:28 schrieb Xing Zheng: > > The rtc hym8563 maybe failed to register if first startup or rtc > > powerdown: > > [ 0.988540 ] rtc-hym8563 1-0051: no valid clock/calendar values available > > [ 0.995642 ] rtc-hym8563 1-0051: rtc core: registered hym8563 as rtc0 [ > > 1.078985 ] rtc-hym8563 1-0051: no valid clock/calendar values available [ > > 1.085698 ] rtc-hym8563 1-0051: hctosys: unable to read the hardware > > clock > > > > We can set initial time for rtc and register it: > > [ 0.995678 ] rtc-hym8563 1-0051: rtc core: registered hym8563 as rtc0 > > [ 1.080313 ] rtc-hym8563 1-0051: setting system clock to 2000-01-01 > > 00:02:00 UTC (946684920) > > hmm, not setting a false date was actually intentional when I did the driver. > > In my mind it is better to shout and keep programs from using wrong values > than to set some arbitary date and let programs silently use this wrong value. >
Indeed, I find it worse to set a wrong value instead of returning an error. Userspace has to define its policy when reading the time fails. -- Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

