From: Andrew Morton <akpm@linux-foundation.org>
To: Ashish Jangam <ashish.jangam@kpitcummins.com>
Cc: <linux-kernel@vger.kernel.org>, <sameo@linux.intel.com>,
<p_gortmaker@yahoo.com>, <dchen@diasemi.com>,
<rtc-linux@googlegroups.com>,
Alessandro Zummo <a.zummo@towertech.it>,
shubhro <omaplinuxkernel@gmail.com>
Subject: Re: [Patch v3 3/7] rtc: DA9055 RTC driver
Date: Thu, 13 Dec 2012 13:39:40 -0800 [thread overview]
Message-ID: <20121213133940.18b6d7d4.akpm@linux-foundation.org> (raw)
In-Reply-To: <1355403860.2353.4.camel@dhruva>
On Thu, 13 Dec 2012 18:34:20 +0530
Ashish Jangam <ashish.jangam@kpitcummins.com> wrote:
> (This rtc patch is resend for merge)
> ---
> This is the RTC patch for the DA9055 PMIC. This patch has got dependency on
> the DA9055 MFD core.
>
> This patch is functionally tested on Samsung SMDKV6410.
>
> ...
>
> +static int __init da9055_rtc_device_init(struct da9055 *da9055,
> + struct da9055_pdata *pdata)
> +{
> + int ret;
> +
> + /* Enable RTC and the internal Crystal */
> + ret = da9055_reg_update(da9055, DA9055_REG_CONTROL_B,
> + DA9055_RTC_EN, DA9055_RTC_EN);
> + if (ret < 0)
> + return ret;
> + ret = da9055_reg_update(da9055, DA9055_REG_EN_32K,
> + DA9055_CRYSTAL_EN, DA9055_CRYSTAL_EN);
> + if (ret < 0)
> + return ret;
> +
> + /* Enable RTC in Power Down mode */
> + ret = da9055_reg_update(da9055, DA9055_REG_CONTROL_B,
> + DA9055_RTC_MODE_PD, DA9055_RTC_MODE_PD);
> + if (ret < 0)
> + return ret;
> +
> + /* Enable RTC in Reset mode */
> + if (pdata && pdata->reset_enable) {
> + ret = da9055_reg_update(da9055, DA9055_REG_CONTROL_B,
> + DA9055_RTC_MODE_SD,
> + DA9055_RTC_MODE_SD <<
> + DA9055_RTC_MODE_SD_SHIFT);
> + if (ret < 0)
> + return ret;
> + }
> +
> + /* Disable the RTC TICK ALM */
> + ret = da9055_reg_update(da9055, DA9055_REG_ALARM_MO,
> + DA9055_RTC_TICK_WAKE_MASK, 0);
> + if (ret < 0)
> + return ret;
If one of these failure paths is taken, the hardware will be left in a
part-initialised state. Is this wise?
> + return 0;
> +}
next prev parent reply other threads:[~2012-12-13 21:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-11 10:40 [Patch v3 3/7] RTC: DA9055 RTC driver Ashish Jangam
2012-10-11 11:23 ` shubhro
2012-10-23 10:03 ` Ashish Jangam
2012-11-23 10:11 ` [Patch v3 3/7] rtc: " Ashish Jangam
2012-11-23 11:09 ` Venu Byravarasu
2012-11-23 12:27 ` Ashish Jangam
2012-11-27 22:23 ` Andrew Morton
2012-11-28 9:24 ` Ashish Jangam
2012-12-10 5:42 ` Ashish Jangam
2012-12-12 21:11 ` Andrew Morton
2012-12-13 5:51 ` Ashish Jangam
2012-12-13 13:04 ` Ashish Jangam
2012-12-13 21:39 ` Andrew Morton [this message]
2012-11-28 9:24 ` Ashish Jangam
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=20121213133940.18b6d7d4.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=a.zummo@towertech.it \
--cc=ashish.jangam@kpitcummins.com \
--cc=dchen@diasemi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=omaplinuxkernel@gmail.com \
--cc=p_gortmaker@yahoo.com \
--cc=rtc-linux@googlegroups.com \
--cc=sameo@linux.intel.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