lkml.org 
[lkml]   [2015]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2] drivers/rtc/rtc-ds1307.c: Enable the mcp794xx alarm after programming time
On 21/04/2015 at 20:59:15 -0500, Nishanth Menon wrote :
> >> Why is that so? when set alarm is requested for time X, you want
> >> interrupt at time X, not an interrupt for previous configured RTC
> >> alarm time!
> >>
> >
> > You expect at least an interrupt.
>
> And you will get an interrupt if the event occurs before the i2c burst
> starts. Once the i2cburst does start, you are committing to the new time.
>

You mean that even if ALM0EN is set after ALM0IF was set to 1, it will
trigger the interrupt? I had a look at the MFP output block diagram
would let me think that this is the case. I was thinking otherwise
before. If that is so, then indeed, your patch is OK.

My concern was about the time between ds1307->write_block_data() and
i2c_smbus_write_byte_data() which actually calls cond_sched().

I fully agree that your patch doesn't change the behaviour for the other
cases you presented and further clean up is to be done in a separate set
of patches.

--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


\
 
 \ /
  Last update: 2015-04-22 13:41    [W:0.317 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site