Hi,
This seems better but:
On 10/08/2015 at 14:58:22 +0530, Keerthy wrote :
> diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
> index d99b2ee..756819f 100644
> --- a/arch/arm/boot/dts/am4372.dtsi
> +++ b/arch/arm/boot/dts/am4372.dtsi
> @@ -336,6 +336,8 @@
> interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH
> GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
> ti,hwmods = "rtc";
> + clocks = <&clk_32768_ck>, <&clk_32k_rtc>;
> + clock-names = "int-clk", "ext-clk";
> status = "disabled";
> };
>
This change has to be part of another patch.
> @@ -698,6 +706,7 @@ static int __exit omap_rtc_remove(struct platform_device
> *pdev)
> static int omap_rtc_suspend(struct device *dev)
> {
> struct omap_rtc *rtc = dev_get_drvdata(dev);
> + u8 reg;
>
> rtc->interrupts_reg = rtc_read(rtc, OMAP_RTC_INTERRUPTS_REG);
>
> @@ -711,6 +720,18 @@ static int omap_rtc_suspend(struct device *dev)
> enable_irq_wake(rtc->irq_alarm);
> else
> rtc_write(rtc, OMAP_RTC_INTERRUPTS_REG, 0);
> +
> + /*
> + * If we have the luxury of external clock then
> + * Switch to external clock so we can keep ticking
> + * acorss suspend
> + */
> + if (rtc->has_ext_clk) {
> + reg = rtc_read(rtc, OMAP_RTC_OSC_REG);
> + rtc_write(rtc, OMAP_RTC_OSC_REG, reg |
> + OMAP_RTC_OSC_SEL_32KCLK_SRC);
> + }
> +
You should probably prepare/enable the clock before switching to it. I
know it doesn't matter right now but that may not be the case on other
boards.
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html