> -----Original Message-----
> From: Andrew Morton [mailto:a...@linux-foundation.org]
> Sent: Wednesday, February 26, 2014 6:07 AM
> To: rtc-li...@googlegroups.com
> Cc: Wang Dongsheng-B40534; a.zu...@towertech.it; Zhao Chenhui-B35336; 
> linuxppc-
> d...@lists.ozlabs.org
> Subject: Re: [rtc-linux] [PATCH] rtc/ds3232: Enable ds3232 to work as wakeup
> source
> 
> On Tue, 21 Jan 2014 13:24:51 +0800 Dongsheng Wang 
> <dongsheng.w...@freescale.com>
> wrote:
> 
> > From: Wang Dongsheng <dongsheng.w...@freescale.com>
> >
> > Add suspend/resume and device_init_wakeup to enable ds3232 as
> > wakeup source, /sys/class/rtc/rtcX/wakealarm for set wakeup alarm.
> >
> > ...
> >
> > @@ -411,23 +424,21 @@ static int ds3232_probe(struct i2c_client *client,
> >     if (ret)
> >             return ret;
> >
> > -   ds3232->rtc = devm_rtc_device_register(&client->dev, client->name,
> > -                                     &ds3232_rtc_ops, THIS_MODULE);
> > -   if (IS_ERR(ds3232->rtc)) {
> > -           dev_err(&client->dev, "unable to register the class device\n");
> > -           return PTR_ERR(ds3232->rtc);
> > -   }
> > -
> > -   if (client->irq >= 0) {
> > +   if (client->irq != NO_IRQ) {
> 
> x86_64 allmodconfig:
> 
> drivers/rtc/rtc-ds3232.c: In function 'ds3232_probe':
> drivers/rtc/rtc-ds3232.c:427: error: 'NO_IRQ' undeclared (first use in this
> function)
> drivers/rtc/rtc-ds3232.c:427: error: (Each undeclared identifier is reported
> only once
> drivers/rtc/rtc-ds3232.c:427: error: for each function it appears in.)
> 
> Not all architectures implement NO_IRQ.
> 
> I think this should be
> 
>       if (client->irq > 0) {
> 
> but I'm not sure - iirc, x86 (at least) treats zero as "not an IRQ".
> But I think some architectures permit IRQ 0.  There was discussion many
> years ago but I don't think anything got resolved.
> 
I think this is why NO_IRQ is defined in kernel, that should be resolved this 
issue.

Sorry, I don't know why some architectures didn't define this macro?


Hi Ben,

Did you have some suggestion?

Thanks,
-Dongsheng

> 
> Help!  I think some ppc people will know what to do here?
> 

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to