mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 2/2] rtc-tps65910: enable RTC power domain on initialization
@ 2012-11-29  8:48 Kim, Milo
  2012-11-29  9:07 ` Venu Byravarasu
  0 siblings, 1 reply; 6+ messages in thread
From: Kim, Milo @ 2012-11-29  8:48 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Samuel Ortiz, a.zummo, swarren, vbyravarasu, sivaramn, linux-kernel

 Enabling RTC HW block depends on the default value of TPS65910 register.
 In some mode, RTC block is disabled by default.(eg. AM3517 Craneboard)
 In this case, RTC_PWDN(RTC power down) bit should be cleared to enable
 the RTC HW block.

 This patch also works in case that RTC block is active by default,
 because there is no side effect even if the bit is updated again.

 Tested on AM3517 Craneboard.

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
---
 drivers/rtc/rtc-tps65910.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/rtc/rtc-tps65910.c b/drivers/rtc/rtc-tps65910.c
index e8d44bc..b4d9f02 100644
--- a/drivers/rtc/rtc-tps65910.c
+++ b/drivers/rtc/rtc-tps65910.c
@@ -247,6 +247,13 @@ static int __devinit tps65910_rtc_probe(struct platform_device *pdev)
 		return ret;
 
 	dev_dbg(&pdev->dev, "Enabling rtc-tps65910.\n");
+
+	/* Enable RTC digital power domain */
+	ret = regmap_update_bits(tps65910->regmap, TPS65910_DEVCTRL,
+		DEVCTRL_RTC_PWDN_MASK, 0 << DEVCTRL_RTC_PWDN_SHIFT);
+	if (ret < 0)
+		return ret;
+
 	rtc_reg = TPS65910_RTC_CTRL_STOP_RTC;
 	ret = regmap_write(tps65910->regmap, TPS65910_RTC_CTRL, rtc_reg);
 	if (ret < 0)
-- 
1.7.9.5


Best Regards,
Milo



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-11-30  9:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-29  8:48 [PATCH 2/2] rtc-tps65910: enable RTC power domain on initialization Kim, Milo
2012-11-29  9:07 ` Venu Byravarasu
2012-11-29 23:11   ` Kim, Milo
2012-11-30  0:13     ` Andrew Morton
2012-11-30  9:49       ` Venu Byravarasu
2012-11-30  9:32     ` Venu Byravarasu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®