From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Keerthy <j-keerthy@ti.com>
Cc: tony@atomide.com, linux-omap@vger.kernel.org, pawel.moll@arm.com,
galak@codeaurora.org, paul@pwsan.com, akpm@linux-foundation.org,
johan@kernel.org, grygorii.strashko@ti.com,
rtc-linux@googlegroups.com, bcousson@baylibre.com, nm@ti.com,
devicetree@vger.kernel.org, t-kristo@ti.com
Subject: [rtc-linux] Re: [PATCH v2 2/6] rtc: omap: Add external clock enabling support
Date: Tue, 11 Aug 2015 16:00:54 +0200 [thread overview]
Message-ID: <20150811140054.GM3411@piout.net> (raw)
In-Reply-To: <1439198906-31189-3-git-send-email-j-keerthy@ti.com>
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
--
--
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
next prev parent reply other threads:[~2015-08-11 14:00 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-10 9:28 [rtc-linux] [PATCH v2 0/6] ARM: AM4372: Enable RTC Keerthy
2015-08-10 9:28 ` [rtc-linux] [PATCH v2 1/6] ARM: dts: AM43XX: Add clk_32k_rtc node Keerthy
2015-08-10 9:28 ` [rtc-linux] [PATCH v2 2/6] rtc: omap: Add external clock enabling support Keerthy
2015-08-11 14:00 ` Alexandre Belloni [this message]
2015-08-12 14:27 ` [rtc-linux] " Paul Walmsley
2015-08-12 19:08 ` Keerthy
2015-08-12 20:16 ` Alexandre Belloni
2015-08-13 20:17 ` Paul Walmsley
2015-08-14 4:55 ` Keerthy
2015-08-14 8:29 ` Alexandre Belloni
2015-08-10 9:28 ` [rtc-linux] [PATCH v2 3/6] ARM: AM43xx: Introduce a separate soc_is function for am438x series of SoCs Keerthy
2015-08-11 12:55 ` [rtc-linux] " Tony Lindgren
2015-08-11 17:54 ` Keerthy
2015-08-12 8:37 ` Tony Lindgren
2015-08-13 6:59 ` Keerthy
2015-08-13 9:04 ` Keerthy
2015-08-13 9:59 ` Tony Lindgren
2015-08-10 9:28 ` [rtc-linux] [PATCH v2 4/6] ARM: dts: am43x-epos-evm: Add the am438 compatible string Keerthy
2015-08-10 9:28 ` [rtc-linux] [PATCH v2 5/6] ARM: AM43XX: HWMOD: Add rtc hwmod Keerthy
2015-08-12 14:39 ` [rtc-linux] " Paul Walmsley
2015-08-13 6:39 ` Tero Kristo
2015-08-10 9:28 ` [rtc-linux] [PATCH v2 6/6] ARM: dts: AM437X-GP-EVM: Enable rtc Keerthy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150811140054.GM3411@piout.net \
--to=alexandre.belloni@free-electrons.com \
--cc=akpm@linux-foundation.org \
--cc=bcousson@baylibre.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=grygorii.strashko@ti.com \
--cc=j-keerthy@ti.com \
--cc=johan@kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=nm@ti.com \
--cc=paul@pwsan.com \
--cc=pawel.moll@arm.com \
--cc=rtc-linux@googlegroups.com \
--cc=t-kristo@ti.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox