From: "Heiko Stübner" <heiko@sntech.de>
To: Chris Zhong <zyw@rock-chips.com>
Cc: robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com,
ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
sameo@linux.intel.com, lee.jones@linaro.org, lgirdwood@gmail.com,
broonie@kernel.org, a.zummo@towertech.it, mturquette@linaro.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
rtc-linux@googlegroups.com, grant.likely@linaro.org,
hl@rock-chips.com, huangtao@rock-chips.com, cf@rock-chips.com,
zhangqing@rock-chips.com, xxx@rock-chips.com,
dianders@chromium.org, olof@lixom.net, sonnyrao@chromium.org,
dtor@chromium.org, javier.martinez@collabora.co.uk,
kever.yang@rock-chips.com
Subject: Re: [PATCH v6 3/5] RTC: RK808: add RTC driver for RK808
Date: Wed, 27 Aug 2014 20:52:19 +0200 [thread overview]
Message-ID: <6810623.bmce33g2Ev@diego> (raw)
In-Reply-To: <1409062496-12074-1-git-send-email-zyw@rock-chips.com>
Hi Chris,
Am Dienstag, 26. August 2014, 22:14:56 schrieb Chris Zhong:
> Adding RTC driver for supporting RTC device present inside RK808 PMIC.
>
> Signed-off-by: Chris Zhong <zyw@rock-chips.com>
> Signed-off-by: Zhang Qing <zhangqing@rock-chips.com>
>
> ---
>
> Changes in v6:
> Adviced by doug
> - move RTC_READSEL setting into probe
>
> Changes in v5:
> - fixed a bug about set_time failed
>
> Changes in v4:
> - use &client->dev replace rk808->dev
>
> Changes in v3: None
> Changes in v2:
> Adviced by javier.martinez
> - Add a separate clock driver, rather than in RTC driver
>
> drivers/rtc/Kconfig | 10 ++
> drivers/rtc/Makefile | 1 +
> drivers/rtc/rtc-rk808.c | 412
> +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 423
> insertions(+)
> create mode 100644 drivers/rtc/rtc-rk808.c
>
[...]
> diff --git a/drivers/rtc/rtc-rk808.c b/drivers/rtc/rtc-rk808.c
> new file mode 100644
> index 0000000..00cd997
> --- /dev/null
> +++ b/drivers/rtc/rtc-rk808.c
[...]
> +/*
> + * We will just handle setting the frequency and make use the framework for
> + * reading the periodic interupts.
> + *
> + * @freq: Current periodic IRQ freq:
> + * bit 0: every second
> + * bit 1: every minute
> + * bit 2: every hour
> + * bit 3: every day
> + */
> +static irqreturn_t rk808_alarm_irq(int irq, void *data)
> +{
> + struct rk808_rtc *rk808_rtc = data;
> + struct rk808 *rk808 = rk808_rtc->rk808;
> + struct i2c_client *client = rk808->i2c;
> + uint32_t rtc_ctl;
> + int ret;
> +
> + ret = regmap_write(rk808->regmap, RK808_RTC_STATUS_REG,
> + RTC_STATUS_MASK);
> + if (ret) {
> + dev_err(&client->dev,
> + "%s:Failed to update RTC status: %d\n", __func__, ret);
> + return ret;
> + }
> +
> + rtc_update_irq(rk808_rtc->rtc, 1, RTC_IRQF | RTC_AF);
> + dev_dbg(&client->dev,
> + "%s:irq=%d,rtc_ctl=0x%x\n", __func__, irq, rtc_ctl);
what is rtc_ctl? It seems to be unused and its use in the dev_dbg produces:
drivers/rtc/rtc-rk808.c: In function 'rk808_alarm_irq':
drivers/rtc/rtc-rk808.c:258:2: warning: 'rtc_ctl' may be used uninitialized in this function [-Wuninitialized]
Heiko
prev parent reply other threads:[~2014-08-27 18:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-26 14:14 [PATCH v6 3/5] RTC: RK808: add RTC driver for RK808 Chris Zhong
[not found] ` <1409062496-12074-1-git-send-email-zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2014-08-26 18:28 ` Doug Anderson
2014-08-26 21:42 ` Dmitry Torokhov
2014-08-27 18:52 ` Heiko Stübner [this message]
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=6810623.bmce33g2Ev@diego \
--to=heiko@sntech.de \
--cc=a.zummo@towertech.it \
--cc=broonie@kernel.org \
--cc=cf@rock-chips.com \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=dtor@chromium.org \
--cc=galak@codeaurora.org \
--cc=grant.likely@linaro.org \
--cc=hl@rock-chips.com \
--cc=huangtao@rock-chips.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=javier.martinez@collabora.co.uk \
--cc=kever.yang@rock-chips.com \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mturquette@linaro.org \
--cc=olof@lixom.net \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=rtc-linux@googlegroups.com \
--cc=sameo@linux.intel.com \
--cc=sonnyrao@chromium.org \
--cc=xxx@rock-chips.com \
--cc=zhangqing@rock-chips.com \
--cc=zyw@rock-chips.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;
as well as URLs for NNTP newsgroup(s).