Re: [PATCH] rtc: tps65910: allow using RTC without alarm interrupt

From: Alexandre Belloni
Date: Thu Nov 14 2019 - 14:59:45 EST


On 14/11/2019 02:08:05+0300, Andrey Skvortsov wrote:
> > > static int tps65910_rtc_probe(struct platform_device *pdev)
> > > {
> > > struct tps65910 *tps65910 = NULL;
> > > @@ -415,13 +422,17 @@ static int tps65910_rtc_probe(struct platform_device *pdev)
> > > tps65910_rtc_interrupt, IRQF_TRIGGER_LOW,
> > > dev_name(&pdev->dev), &pdev->dev);
> > > if (ret < 0) {
> > > - dev_err(&pdev->dev, "IRQ is not free.\n");
> > > - return ret;
> > > + dev_err(&pdev->dev, "request IRQ:%d failed, err = %d\n",
> > > + irq, ret);
> >
> > Do we actually need an error message here?
>
> You are right. This is definitely not an error anymore.
> What about
> dev_warn(&pdev->dev, "unable to request IRQ, alarms disabled\n");
> like some other drivers do?
>

Yes, or that can be left out completely as userspace will be able to
know whether alarms are supported without this message.


--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com