Re: [rtc-linux] [PATCH 6/6] rtc/mc13783: implement alarm

From: Uwe Kleine-König
Date: Mon Mar 01 2010 - 06:10:22 EST

On Mon, Mar 01, 2010 at 11:56:25AM +0100, Alessandro Zummo wrote:
> On Mon, 1 Mar 2010 11:53:45 +0100
> Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> wrote:
> > for now this just ignores the possible race to trigger an alarm when
> > setting the time. Should I resolve that, if so, what is the prefered
> > way to do that?
> I saw you email on the topic but I haven't had
> the time to answer appropriately.
> I'd suggest to disable the alarm irq while setting
> the time.
I have two possibilities, I'm not sure if you mean the first or just any
of the two:

pending = is_alarm_pending
set time and date
if (!pending)

alarmtime = read_alaram
set time and date

I'd prefer 2), is that OK for you, too?

Best regards

Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | |
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at