Linux RTC
 help / color / mirror / Atom feed
* [PATCH RESEND 0/2] rtc: initial patches to fix borkage of rtc-s35390a
@ 2016-05-11  7:11 Uwe Kleine-König
  2016-05-11  7:11 ` [rtc-linux] [PATCH RESEND 1/2] rtc: initialize output parameter for read alarm to "uninitialized" Uwe Kleine-König
  2016-05-11  7:11 ` [rtc-linux] [PATCH RESEND 2/2] rtc: make rtc_time64_to_tm save to use for dates before 1970 Uwe Kleine-König
  0 siblings, 2 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2016-05-11  7:11 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni
  Cc: rtc-linux, Michael Langer, Byron Bradley, Manuel Röder

Hello,

[I'm resending because only a single patch made it to the rtc list, don't know
why.]

here are two patches that improve the rtc core's robustness regarding
stuff the rtc-s35390a does. That is in .read_alarm it only assigns
alm->time.tm_wday, alm->time.tm_hour and alm->time.tm_min which as of
now makes the kernel report things like:

	[    2.257418] rtc rtc0: invalid alarm value: 1900-1-29 1193031:57:16

.

The open issues (I'm aware of) but which are orthogonal to the patches
here are:

 - The core doesn't handle a driver setting alm->time.tm_wday but not
   alm->time.tm_mday.
 - The chip has status bits that signal if an irq is pending, but these
   are cleared at read and the first read during driver probe doesn't
   check for these bits set. (There are more such read-to-clear bits,
   e.g. when the battery backing was lost ...)
   The result is that the irq isn't acked (by unsetting INT2AE) which
   prevents some devices (e.g. QNAP TS-41x) to shutdown.
   (https://bugs.debian.org/794266)

So with the two patches in this series the QNAP TS-41x still fails to
shutdown, but it is handled a bit better. 

I'd consider this merge window material.

Uwe Kleine-König (2):
  rtc: initialize output parameter for read alarm to "uninitialized"
  rtc: make rtc_time64_to_tm save to use for dates before 1970

 drivers/rtc/interface.c | 12 +++++++++++-
 drivers/rtc/rtc-lib.c   | 13 +++++++++----
 2 files changed, 20 insertions(+), 5 deletions(-)

-- 
2.8.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-29 23:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-11  7:11 [PATCH RESEND 0/2] rtc: initial patches to fix borkage of rtc-s35390a Uwe Kleine-König
2016-05-11  7:11 ` [rtc-linux] [PATCH RESEND 1/2] rtc: initialize output parameter for read alarm to "uninitialized" Uwe Kleine-König
2016-05-29 23:27   ` [rtc-linux] " Alexandre Belloni
2016-05-11  7:11 ` [rtc-linux] [PATCH RESEND 2/2] rtc: make rtc_time64_to_tm save to use for dates before 1970 Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox