lkml.org 
[lkml]   [2020]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4.19 177/639] rtc: ds1307: rx8130: Fix alarm handling
On Sat, Jan 25, 2020 at 02:30:36PM +0100, Pavel Machek wrote:
> Hi!
>
> > When the EXTENSION.WADA bit is set, register 0x19 contains a bitmap of
> > week days, not a day of month. As Linux only handles a single alarm
> > without repetition using day of month is more flexible, so clear this
> > bit. (Otherwise a value depending on time.tm_wday would have to be
> > written to register 0x19.)
>
> So the comment explains why WADA bit needs to be clear.
>
> > @@ -749,8 +749,8 @@ static int rx8130_set_alarm(struct device *dev, struct rtc_wkalrm *t)
> > if (ret < 0)
> > return ret;
> >
> > - ctl[0] &= ~RX8130_REG_EXTENSION_WADA;
> > + ctl[0] &= RX8130_REG_EXTENSION_WADA;
>
> But then code is changed to preserve WADA bit while it was clearing it
> before.

This looks broken indeed. The new code clears all flags but WADA. Will
take a look tomorrow.

Best regards
Uwe



--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |

\
 
 \ /
  Last update: 2020-01-26 22:29    [W:0.339 / U:2.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site