Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp735210ybl; Wed, 21 Aug 2019 04:55:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqyZZPLYHWg5rIqgNKosEzo9ht/isRt+OevUCGqaRXXSxNvWSPSvsmiBqaVlp9ex92Bm/Y/p X-Received: by 2002:a17:90a:17e2:: with SMTP id q89mr4932313pja.8.1566388505342; Wed, 21 Aug 2019 04:55:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566388505; cv=none; d=google.com; s=arc-20160816; b=u4klEp5TexyC0+jSI/ez3GNFBFSR1mzx+KDTFgg5PWDORJwHnKbTzfA8wwvszFeo4x bJkyPPVGUvTBSiElakZ3GWE+peUc79RadK84qoeLWLTRVkp3IsT81MmFYI1fS4CCLE6X YmO2+X5Lh7LmD23fBfBO5gMPlBoQkDvoQ4m/KRJvc3vg1Dhh6EazPj39PnPid2/sSUEc VVwAXxevme84Vzx2GJ6f9cNke4Xu3cUYiiKU53MqjFtsK+xJOaq1p/hDmsE+mn6RoSOQ teY19qslhHhdqBEVefXr9rjDNRjqJRRm/8gRyQSXJ/RZW2Ud6rSzwQwQqp1bodQ6hlgo Y+3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=57LlM4H8RkCAcbdoywB42V0fKhz33TG1aezRdSmA76U=; b=o8wWkiPALHbp8GJIwYgZs2ojJ7xBw/GaTfSOx9+dO9csO5GIQWNQIQ7tSllY8QaT+C qp1Lv97hkHCwOKgXmDJGWURIIJxatBawy+VYBpOGqL22hL/kPhq6WNic97VoWaP/nB4j LHzh33IFU7zQq6Z9laOLhXtI7xQca6mV13mN8tb7uIofa3AeDmzaVg0FBNF9b/ihBGI2 4KGrFB+fVY4FbUNtCkJMNvqA0ttOPUTmYU1/EUYA+vKbnRoAT1xqnmt76ABlu19+llod GO4yTSIk0i6cZW67raMbzbn6Kg4UqGRSA7bZTqpiDS+9nY72itcfQqgEYXNYChyYg+Uy LCWg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a127si15637918pfa.151.2019.08.21.04.54.49; Wed, 21 Aug 2019 04:55:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727151AbfHULjA (ORCPT + 99 others); Wed, 21 Aug 2019 07:39:00 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:55305 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726372AbfHULi7 (ORCPT ); Wed, 21 Aug 2019 07:38:59 -0400 X-Originating-IP: 90.65.161.137 Received: from localhost (lfbn-1-1545-137.w90-65.abo.wanadoo.fr [90.65.161.137]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 31AF460004; Wed, 21 Aug 2019 11:38:57 +0000 (UTC) Date: Wed, 21 Aug 2019 13:38:56 +0200 From: Alexandre Belloni To: Mark Brown Cc: Li Yang , nandor.han@vaisala.com, Biwen Li , a.zummo@towertech.it, linux-rtc@vger.kernel.org, lkml Subject: Re: [v2] rtc: pcf85363/pcf85263: fix error that failed to run hwclock -w Message-ID: <20190821113856.GB27031@piout.net> References: <20190816024636.34738-1-biwen.li@nxp.com> <20190816080417.GB3545@piout.net> <20190816162825.GE3545@piout.net> <20190820182224.GI4738@sirena.co.uk> <20190821112142.GD5128@sirena.co.uk> <20190821112413.GA27031@piout.net> <20190821113029.GE5128@sirena.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190821113029.GE5128@sirena.co.uk> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/08/2019 12:30:29+0100, Mark Brown wrote: > On Wed, Aug 21, 2019 at 01:24:13PM +0200, Alexandre Belloni wrote: > > On 21/08/2019 12:21:42+0100, Mark Brown wrote: > > > On Tue, Aug 20, 2019 at 01:33:14PM -0500, Li Yang wrote: > > > > > violation check of regmap rejects such access. According to > > > > Alexcandre, the address wrapping is essential to the functionality of > > > > It's *essential*? Will innovation never cease? > > > To be clear, for some RTCs, its is the only way to accurately set the > > time. > > What's the mechanism here? It's a very strange thing to require. The clock control is on the first register, then you have sec, min, hour, day, mon, year. To be able to set the clock accurately, you need to first disable the clock, then set the time and date and finally reenable the clock in the first register. This should be done in a single i2c write. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com