From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexandre Belloni Subject: Re: [PATCH 2/2] rtc: sprd: Add Spreadtrum RTC driver Date: Wed, 8 Nov 2017 06:35:22 +0100 Message-ID: <20171108053522.qhoagssswonevae4@piout.net> References: <7037c5053a533505f38fc036290a398989cfdafc.1510051749.git.baolin.wang@spreadtrum.com> <20171108034409.cm65hvuhz67hmz3b@piout.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Baolin Wang Cc: Baolin Wang , Alessandro Zummo , Rob Herring , Mark Rutland , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, LKML , linux-rtc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Mark Brown List-Id: devicetree@vger.kernel.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