Re: [rtc-linux] [PATCH v3 2/3] rtc: Add APM X-Gene SoC RTC driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi,

>> +static int xgene_rtc_suspend(struct device *dev)
>> +{
>> +     struct platform_device *pdev = to_platform_device(dev);
>> +     struct xgene_rtc_dev *pdata = platform_get_drvdata(pdev);
>> +     int irq;
>> +
>> +     irq = platform_get_irq(pdev, 0);
>> +     if (device_may_wakeup(&pdev->dev)) {
>> +             if (!enable_irq_wake(irq))
>> +                     pdata->irq_wake = 1;
>> +     } else {
>> +             xgene_rtc_alarm_irq_enable(dev, 0);
>> +             clk_disable(pdata->clk);
>> +     }
>
> Why does the driver only disable the clock over suspend rather than also
> unpreparing it?

This was modeled after rtc-spear.c. Is this or rtc-spear in-correct?

>
>> +     if (device_may_wakeup(&pdev->dev)) {
>> +             if (pdata->irq_wake) {
>> +                     disable_irq_wake(irq);
>> +                     pdata->irq_wake = 0;
>> +             }
>> +     } else {
>> +             clk_enable(pdata->clk);
>
> It's also not checking for errors here.

This was also modeled after rtc-spear. I guess I can check and print
an warning but don't believe it matter.

>
>> +             xgene_rtc_alarm_irq_enable(dev, 1);
>> +     }
>
> Won't this unconditionally enable the interrupt regardless of what the
> setting was prior to suspend?

This was also modeled after rtc-spear.c. Is this or rtc-spear in-correct?

-Loc
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux