From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751658AbbIQMuL (ORCPT ); Thu, 17 Sep 2015 08:50:11 -0400 Received: from regular2.263xmail.com ([211.157.152.4]:51490 "EHLO regular2.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750792AbbIQMuJ (ORCPT ); Thu, 17 Sep 2015 08:50:09 -0400 X-263anti-spam: KSV:0;BIG:0;ABS:1;DNS:0;ATT:0;SPF:S; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 1 X-SKE-CHECKED: 1 X-ADDR-CHECKED: 0 X-RL-SENDER: zhengxing@rock-chips.com X-FST-TO: alexandre.belloni@free-electrons.com X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: zhengxing@rock-chips.com X-UNIQUE-TAG: <1fa485844cb39a1c04d208207582fcd1> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Message-ID: <55FAB5B6.3010605@rock-chips.com> Date: Thu, 17 Sep 2015 20:44:38 +0800 From: Xing Zheng User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120410 Thunderbird/11.0.1 MIME-Version: 1.0 To: Alexandre Belloni CC: =?UTF-8?B?SGVpa28gU3TDvGJuZXI=?= , a.zummo@towertech.it, rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 9/9] rtc: hym8563: make sure hym8563 can be normal work References: <1442478540-15068-1-git-send-email-zhengxing@rock-chips.com> <1442486368-1912-1-git-send-email-zhengxing@rock-chips.com> <3439697.Ymf0XB1EzX@diego> <20150917123138.GG4287@piout.net> In-Reply-To: <20150917123138.GG4287@piout.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015年09月17日 20:31, Alexandre Belloni wrote: > Hi, > > On 17/09/2015 at 14:07:47 +0200, Heiko Stübner wrote : >> Am Donnerstag, 17. September 2015, 18:39:28 schrieb Xing Zheng: >>> The rtc hym8563 maybe failed to register if first startup or rtc >>> powerdown: >>> [ 0.988540 ] rtc-hym8563 1-0051: no valid clock/calendar values available >>> [ 0.995642 ] rtc-hym8563 1-0051: rtc core: registered hym8563 as rtc0 [ >>> 1.078985 ] rtc-hym8563 1-0051: no valid clock/calendar values available [ >>> 1.085698 ] rtc-hym8563 1-0051: hctosys: unable to read the hardware >>> clock >>> >>> We can set initial time for rtc and register it: >>> [ 0.995678 ] rtc-hym8563 1-0051: rtc core: registered hym8563 as rtc0 >>> [ 1.080313 ] rtc-hym8563 1-0051: setting system clock to 2000-01-01 >>> 00:02:00 UTC (946684920) >> hmm, not setting a false date was actually intentional when I did the driver. >> >> In my mind it is better to shout and keep programs from using wrong values >> than to set some arbitary date and let programs silently use this wrong value. >> > Indeed, I find it worse to set a wrong value instead of returning an > error. Userspace has to define its policy when reading the time fails. > OK, I got it, this patch will be abandoned at next version. Thanks.