Commit 18c701a9 authored by Kim, Milo's avatar Kim, Milo Committed by Linus Torvalds

drivers/rtc/rtc-tps65910.c: enable RTC power domain on initialization

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: default avatarMilo(Woogyom) Kim <milo.kim@ti.com>
Acked-by: default avatarVenu Byravarasu <vbyravarasu@nvidia.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Sivaram Nair <sivaramn@nvidia.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 162a96ea
...@@ -247,6 +247,13 @@ static int __devinit tps65910_rtc_probe(struct platform_device *pdev) ...@@ -247,6 +247,13 @@ static int __devinit tps65910_rtc_probe(struct platform_device *pdev)
return ret; return ret;
dev_dbg(&pdev->dev, "Enabling rtc-tps65910.\n"); 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; rtc_reg = TPS65910_RTC_CTRL_STOP_RTC;
ret = regmap_write(tps65910->regmap, TPS65910_RTC_CTRL, rtc_reg); ret = regmap_write(tps65910->regmap, TPS65910_RTC_CTRL, rtc_reg);
if (ret < 0) if (ret < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment