RE: [rtc-linux] [PATCH 1/2] rtc: rtc-lpc32xx: Introduce RTC driver for the LPC32XX SoC

From: Kevin Wells
Date: Tue Aug 10 2010 - 15:30:00 EST


Hi Zongshun,

Thanks for helping review this.

> Subject: Re: [rtc-linux] [PATCH 1/2] rtc: rtc-lpc32xx: Introduce RTC driver
> for the LPC32XX SoC
>
> Hi Kevin ,
>
> This is really a natty rtc patch:).

From the urban dictionary...
"natty"
1) originating from rastafarian culture. meaning 'good','cool' and
most importantly, 'elite'.
2) A slang for Natural Light beer, a favorite of poor college students
the world over.

I hope it's the first one, but I guess the 2nd isn't that bad if
youâre a college student o)
I'll merge both patches into a single patch for v2 and repost in a
few days.

> > + Â Â Â /* Disable alarm during update */
> > + Â Â Â tmp = rtc_readl(rtc, RTC_CTRL);
> > + Â Â Â rtc_writel(rtc, RTC_CTRL, tmp & ~RTC_MATCH0_EN);
> > +
> > + Â Â Â rtc->alarm_enabled = wkalrm->enabled = 1;
> > + Â Â Â if (wkalrm->enabled) {
> > + Â Â Â Â Â Â Â rtc_writel(rtc, RTC_MATCH0, alarmsecs);
> > + Â Â Â Â Â Â Â rtc_writel(rtc, RTC_INTSTAT, RTC_MATCH0_INT_STS);
> > + Â Â Â Â Â Â Â rtc_writel(rtc, RTC_CTRL, tmp | RTC_MATCH0_EN);
> > + Â Â Â }
>
> I think this 'wkalrm->enabled ' will always be set '1', so 'if'
> condition will be alway true?

Thanks for catching this. The '= 1' assignment shouldn't be there.
¢éì®&Þ~º&¶¬–+-±éÝ¥Šw®žË±Êâmébžìdz¹Þ)í…æèw*jg¬±¨¶‰šŽŠÝj/êäz¹ÞŠà2ŠÞ¨è­Ú&¢)ß«a¶Úþø®G«éh®æj:+v‰¨Šwè†Ù>Wš±êÞiÛaxPjØm¶Ÿÿà -»+ƒùdš_