Message ID | 1363336179.30613.18.camel@dhruva |
---|---|
State | Superseded |
Headers | show |
On Fri, 15 Mar 2013 13:59:39 +0530 Ashish Jangam <ashish.jangam@kpitcummins.com> wrote: > DA9052/53 MFD core handles only virtual irq therefore rtc driver needs > to be updated to work on virtual irq. Without this update DA9052/53 rtc > driver will fail during its registration. > Also getting irq by it name is no longer supported in DA9052/53 core. > > ... > > --- a/drivers/rtc/rtc-da9052.c > +++ b/drivers/rtc/rtc-da9052.c > @@ -239,10 +239,10 @@ static int da9052_rtc_probe(struct platform_device *pdev) > > rtc->da9052 = dev_get_drvdata(pdev->dev.parent); > platform_set_drvdata(pdev, rtc); > - rtc->irq = platform_get_irq_byname(pdev, "ALM"); > - ret = request_threaded_irq(rtc->irq, NULL, da9052_rtc_irq, > - IRQF_TRIGGER_LOW | IRQF_ONESHOT, > - "ALM", rtc); > + rtc->irq = DA9052_IRQ_ALARM; > + > + ret = da9052_request_irq(rtc->da9052, rtc->irq, "ALM", > + da9052_rtc_irq, rtc); > if (ret != 0) { > rtc_err(rtc->da9052, "irq registration failed: %d\n", ret); > return ret; drivers/rtc/rtc-da9052.c was converted to use devm_request_threaded_irq() after linux-3.8, so I cannot apply this patch to mainline. Can you please prepare a patch against 3.9-rc3? Do you believe that the patch should be backported into -stable kernels? If so, Greg will need a different version of it - ie, the one you have just sent. Please send that to him at the appropriate time (say, when you see me drop the 3.9-rc3 version from the -mm tree).
On Mon, 2013-03-18 at 15:21 -0700, Andrew Morton wrote: > On Fri, 15 Mar 2013 13:59:39 +0530 Ashish Jangam <ashish.jangam@kpitcummins.com> wrote: > > > DA9052/53 MFD core handles only virtual irq therefore rtc driver needs > > to be updated to work on virtual irq. Without this update DA9052/53 rtc > > driver will fail during its registration. > > Also getting irq by it name is no longer supported in DA9052/53 core. > > > > ... > > > > --- a/drivers/rtc/rtc-da9052.c > > +++ b/drivers/rtc/rtc-da9052.c > > @@ -239,10 +239,10 @@ static int da9052_rtc_probe(struct platform_device *pdev) > > > > rtc->da9052 = dev_get_drvdata(pdev->dev.parent); > > platform_set_drvdata(pdev, rtc); > > - rtc->irq = platform_get_irq_byname(pdev, "ALM"); > > - ret = request_threaded_irq(rtc->irq, NULL, da9052_rtc_irq, > > - IRQF_TRIGGER_LOW | IRQF_ONESHOT, > > - "ALM", rtc); > > + rtc->irq = DA9052_IRQ_ALARM; > > + > > + ret = da9052_request_irq(rtc->da9052, rtc->irq, "ALM", > > + da9052_rtc_irq, rtc); > > if (ret != 0) { > > rtc_err(rtc->da9052, "irq registration failed: %d\n", ret); > > return ret; > > drivers/rtc/rtc-da9052.c was converted to use > devm_request_threaded_irq() after linux-3.8, so I cannot apply this > patch to mainline. Can you please prepare a patch against 3.9-rc3? Yes. > > Do you believe that the patch should be backported into -stable > kernels? If so, Greg will need a different version of it - ie, the one > you have just sent. Please send that to him at the appropriate time > (say, when you see me drop the 3.9-rc3 version from the -mm tree). Ok, I will do the necessary.
diff --git a/drivers/rtc/rtc-da9052.c b/drivers/rtc/rtc-da9052.c index 60b826e..e22c950 100644 --- a/drivers/rtc/rtc-da9052.c +++ b/drivers/rtc/rtc-da9052.c @@ -239,10 +239,10 @@ static int da9052_rtc_probe(struct platform_device *pdev) rtc->da9052 = dev_get_drvdata(pdev->dev.parent); platform_set_drvdata(pdev, rtc); - rtc->irq = platform_get_irq_byname(pdev, "ALM"); - ret = request_threaded_irq(rtc->irq, NULL, da9052_rtc_irq, - IRQF_TRIGGER_LOW | IRQF_ONESHOT, - "ALM", rtc); + rtc->irq = DA9052_IRQ_ALARM; + + ret = da9052_request_irq(rtc->da9052, rtc->irq, "ALM", + da9052_rtc_irq, rtc); if (ret != 0) { rtc_err(rtc->da9052, "irq registration failed: %d\n", ret); return ret;
DA9052/53 MFD core handles only virtual irq therefore rtc driver needs to be updated to work on virtual irq. Without this update DA9052/53 rtc driver will fail during its registration. Also getting irq by it name is no longer supported in DA9052/53 core. Signed-off-by: Ashish Jangam <ashish.jangam@kpitcummins.com> --- drivers/rtc/rtc-da9052.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)