devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
To: Baolin Wang <baolin.wang-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Baolin Wang <baolin.wang-lxIno14LUO0EEoCn2XhGlw@public.gmane.org>,
	Alessandro Zummo
	<a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-rtc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Subject: Re: [PATCH 2/2] rtc: sprd: Add Spreadtrum RTC driver
Date: Wed, 8 Nov 2017 06:35:22 +0100	[thread overview]
Message-ID: <20171108053522.qhoagssswonevae4@piout.net> (raw)
In-Reply-To: <CAMz4kuK=7W7t63Axi=jcqLPYz-L=MF=uE-8rNNf9LhqP1E=hXw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 08/11/2017 at 13:29:21 +0800, Baolin Wang wrote:
> > Don't do that. This is a valuable information. If you know the time is
> > invalid, return -EINVAL in read_time(). What your are doing here is
> > confusing the system by making it believe your fake date is the correct
> > time.
> 
> Usually for mobile device, we should give one reasonable start time if
> the RTC powered down. Anyway I can remove this feature now.
> Very appreciated for your helpful comments.

Then userspace will have -EINVAL when reading the RTC and will be able
to set the RTC to whatever value it wants. Don't encode that policy in
the kernel.


-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-11-08  5:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-07 11:34 [PATCH 1/2] dt-bindings: rtc: Add Spreadtrum SC27xx RTC documentation Baolin Wang
2017-11-07 11:34 ` [PATCH 2/2] rtc: sprd: Add Spreadtrum RTC driver Baolin Wang
2017-11-08  3:44   ` Alexandre Belloni
2017-11-08  5:29     ` Baolin Wang
     [not found]       ` <CAMz4kuK=7W7t63Axi=jcqLPYz-L=MF=uE-8rNNf9LhqP1E=hXw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-08  5:35         ` Alexandre Belloni [this message]
     [not found]           ` <20171108053522.qhoagssswonevae4-m++hUPXGwpdeoWH0uzbU5w@public.gmane.org>
2017-11-08  5:48             ` Baolin Wang
     [not found] ` <7037c5053a533505f38fc036290a398989cfdafc.1510051749.git.baolin.wang-lxIno14LUO0EEoCn2XhGlw@public.gmane.org>
2017-11-08  3:15   ` [PATCH 1/2] dt-bindings: rtc: Add Spreadtrum SC27xx RTC documentation Alexandre Belloni
     [not found]     ` <20171108031520.zx2ipqugiyypmpms-m++hUPXGwpdeoWH0uzbU5w@public.gmane.org>
2017-11-08  5:02       ` Baolin Wang
2017-11-08  5:12         ` Alexandre Belloni
2017-11-08  5:33           ` Baolin Wang

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=20171108053522.qhoagssswonevae4@piout.net \
    --to=alexandre.belloni-wi1+55scjutkeb57/3fjtnbpr1lh4cv8@public.gmane.org \
    --cc=a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org \
    --cc=baolin.wang-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=baolin.wang-lxIno14LUO0EEoCn2XhGlw@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rtc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /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).