From: Andrew Morton <akpm@linux-foundation.org>
To: Chris Zhong <zyw@rock-chips.com>
Cc: dianders@chromium.org, heiko@sntech.de, 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,
a.zummo@towertech.it, mturquette@linaro.org, broonie@kernel.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, olof@lixom.net,
sonnyrao@chromium.org, dtor@chromium.org,
javier.martinez@collabora.co.uk, kever.yang@rock-chips.com
Subject: Re: [PATCH v10 1/3] RTC: RK808: add RTC driver for RK808
Date: Wed, 10 Sep 2014 13:44:11 -0700 [thread overview]
Message-ID: <20140910134411.8128acce79f2423d4448e8f4@linux-foundation.org> (raw)
In-Reply-To: <1410311886-4579-2-git-send-email-zyw@rock-chips.com>
On Wed, 10 Sep 2014 09:18:04 +0800 Chris Zhong <zyw@rock-chips.com> wrote:
> Adding RTC driver for supporting RTC device present inside RK808 PMIC.
>
> ...
>
> + ret = rtc_valid_tm(&tm);
> + if (ret) {
> + dev_warn(&pdev->dev, "invalid date/time and init time\n");
> + rk808_rtc_set_time(&pdev->dev, &tm_def);
> + }
This is somewhat unusual. Most drivers will emit a warning and give up
when they find the time is wrong. Why is this driver different and is
this desirable behaviour?
Also, I did this:
From: Andrew Morton <akpm@linux-foundation.org>
Subject: rtc-rk808-add-rtc-driver-for-rk808-fix
make tm_def static
Cc: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/rtc/rtc-rk808.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff -puN drivers/rtc/Kconfig~rtc-rk808-add-rtc-driver-for-rk808-fix drivers/rtc/Kconfig
diff -puN drivers/rtc/Makefile~rtc-rk808-add-rtc-driver-for-rk808-fix drivers/rtc/Makefile
diff -puN drivers/rtc/rtc-rk808.c~rtc-rk808-add-rtc-driver-for-rk808-fix drivers/rtc/rtc-rk808.c
--- a/drivers/rtc/rtc-rk808.c~rtc-rk808-add-rtc-driver-for-rk808-fix
+++ a/drivers/rtc/rtc-rk808.c
@@ -326,14 +326,14 @@ static SIMPLE_DEV_PM_OPS(rk808_rtc_pm_op
rk808_rtc_suspend, rk808_rtc_resume);
/* 2014.1.1 12:00:00 Saturday */
-struct rtc_time tm_def = {
- .tm_wday = 6,
- .tm_year = 114,
- .tm_mon = 0,
- .tm_mday = 1,
- .tm_hour = 12,
- .tm_min = 0,
- .tm_sec = 0,
+static struct rtc_time tm_def = {
+ .tm_wday = 6,
+ .tm_year = 114,
+ .tm_mon = 0,
+ .tm_mday = 1,
+ .tm_hour = 12,
+ .tm_min = 0,
+ .tm_sec = 0,
};
static int rk808_rtc_probe(struct platform_device *pdev)
_
next prev parent reply other threads:[~2014-09-10 20:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-10 1:18 [PATCH v10 0/3] Add rockchip RK808 pmic driver Chris Zhong
2014-09-10 1:18 ` [PATCH v10 1/3] RTC: RK808: add RTC driver for RK808 Chris Zhong
2014-09-10 20:44 ` Andrew Morton [this message]
2014-09-10 21:37 ` Doug Anderson
2014-09-10 22:08 ` Andrew Morton
2014-09-11 0:10 ` Doug Anderson
2014-09-10 1:18 ` [PATCH v10 2/3] clk: RK808: Add clkout " Chris Zhong
2014-09-10 1:18 ` [PATCH v10 3/3] regulator: RK808: Remove pdata from the regulator Chris Zhong
2014-09-10 2:49 ` Doug Anderson
2014-09-10 10:51 ` Mark Brown
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=20140910134411.8128acce79f2423d4448e8f4@linux-foundation.org \
--to=akpm@linux-foundation.org \
--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=heiko@sntech.de \
--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
all inboxes | Powered by JetHome®