All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Anderson <dianders@chromium.org>
To: Chris Zhong <zyw@rock-chips.com>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
	zhangqing <zhangqing@rock-chips.com>, xxx <xxx@rock-chips.com>,
	"Heiko Stübner" <heiko@sntech.de>,
	"Alessandro Zummo" <a.zummo@towertech.it>,
	rtc-linux@googlegroups.com,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] RTC: RK808: remove tm_def structure
Date: Wed, 10 Sep 2014 21:04:07 -0700	[thread overview]
Message-ID: <CAD=FV=UHgyUgzqqbmGWnsjKxbbZcUMC__qfebbHAuj9EkJu18Q@mail.gmail.com> (raw)
In-Reply-To: <1410401092-8355-1-git-send-email-zyw@rock-chips.com>

Chris,

On Wed, Sep 10, 2014 at 7:04 PM, Chris Zhong <zyw@rock-chips.com> wrote:
> Signed-off-by: Chris Zhong <zyw@rock-chips.com>

It's good to add a description, like:

If the date/time is invalid at bootup, there's no reason to set it to
a bogus value.  We can just let the data and time be invalid until
someone makes it valid.

> ---
>
>  drivers/rtc/rtc-rk808.c |   17 ++---------------
>  1 file changed, 2 insertions(+), 15 deletions(-)

Other than the lack of description, this looks great.  It applies atop
Andrew's patch to make tm_dev "static" and works like a charm.

I tested by hacking the device with:
  i2cset -f -y 0 0x1b 0x10 0xc1
  i2cset -f -y 0 0x1b 3 0x32
  i2cset -f -y 0 0x1b 0x10 0xc0

That made it think it was the 32nd day of the month.  I then rebooted and saw:
  [    3.371853] rk808-rtc rk808-rtc: invalid date/time
  [    3.379115] rk808-rtc rk808-rtc: rtc core: registered rk808-rtc as rtc0
  [    5.411574] rk808-rtc rk808-rtc: hctosys: invalid date/time

I was still able to set the clock.  Once I did it worked fine.


Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>

      reply	other threads:[~2014-09-11  4:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-11  2:04 [PATCH] RTC: RK808: remove tm_def structure Chris Zhong
2014-09-11  4:04 ` Doug Anderson [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='CAD=FV=UHgyUgzqqbmGWnsjKxbbZcUMC__qfebbHAuj9EkJu18Q@mail.gmail.com' \
    --to=dianders@chromium.org \
    --cc=a.zummo@towertech.it \
    --cc=akpm@linux-foundation.org \
    --cc=heiko@sntech.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rtc-linux@googlegroups.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.