Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753016Ab2K2Isx (ORCPT ); Thu, 29 Nov 2012 03:48:53 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:48129 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751346Ab2K2Isv convert rfc822-to-8bit (ORCPT ); Thu, 29 Nov 2012 03:48:51 -0500 From: "Kim, Milo" To: Andrew Morton CC: Samuel Ortiz , "a.zummo@towertech.it" , "swarren@wwwdotorg.org" , "vbyravarasu@nvidia.com" , "sivaramn@nvidia.com" , "linux-kernel@vger.kernel.org" Subject: [PATCH 2/2] rtc-tps65910: enable RTC power domain on initialization Thread-Topic: [PATCH 2/2] rtc-tps65910: enable RTC power domain on initialization Thread-Index: Ac3ODj+EBtR5lNOFQkugojWkudbjXg== Date: Thu, 29 Nov 2012 08:48:06 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [157.87.185.123] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1457 Lines: 46 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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/