Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2832940pxb; Mon, 19 Apr 2021 15:27:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzd4/YKOEnDhxEGzoaDlGkqmYjiHjkdb/fFAypL5Z4eMcIrH2c9a9eote2csAfIFb10eHpf X-Received: by 2002:a17:90a:6407:: with SMTP id g7mr1349166pjj.206.1618871239020; Mon, 19 Apr 2021 15:27:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618871239; cv=none; d=google.com; s=arc-20160816; b=SeTCTXoIJAhd0WFGEujxJnsPXi8Wb7vy4lnmD5YKz9AapTn4DKbJA4VCIcddTOu0bP 22uyfJykRFsal+WGez5Unm7B42HdHCP0PRJb0XqcjGjlt4rWat190YOHfsYcV0O5djSt YpJaPgUWFmnHN1N7dxqMejPp3CDkGCPViT1zuqQbA19SplW/zTXrwE+oQ7MgaEbiDKNV enZI1Vh/adiac1iznOH1gbq9zAj35Ut8FhHkRq+QozMpHroQoiAukdhQyXC+hTFG+jDm HzwRvoIoexIJLnnc5Nla8a0YOTh1EQgGxpMJgXFPQFdoHCWAOE8FiT3ftUBu4STzLFCo BbbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=qbi3Oh+bXpz+nGbN4THB9whcY9okoLw3SJSj+YeZNEE=; b=yeKtaw6e3ZHD55wOY5iDFMVxm4zdArZCxy9nOYJ7+2C4NkYukES2rJLUq/lNI28z1m EKB5HsreErTfMyUzZumUttE1PIOfIGv/fdBcgMg2WA5hyTvjYC+xZMGY1v/VBUqDsRQh 46F+NbGBcSqgdNCpfIhZwPhztHVXjlM/uyvhRxIgHNbZ+wL3PbMK36M8OVqLF15V2xgS BCqP2jpykPmKVkOqrINUqvPHyjHp+AyPP6nUVo9yFVLSy5Os/VM6T0h5sFT75GhfbWqx aMP5LjiInY/e02IOnk+pKVJcbo9DwdMwE0JrMnINsKnU0XEU+qFYvfpgqBntVpvLmKkV 1nug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v4si18254628ple.156.2021.04.19.15.27.06; Mon, 19 Apr 2021 15:27:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232289AbhDSVQ1 (ORCPT + 99 others); Mon, 19 Apr 2021 17:16:27 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:55541 "EHLO relay10.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229714AbhDSVQ0 (ORCPT ); Mon, 19 Apr 2021 17:16:26 -0400 Received: from localhost (lfbn-lyo-1-1676-55.w90-65.abo.wanadoo.fr [90.65.108.55]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 8453A240003; Mon, 19 Apr 2021 21:15:54 +0000 (UTC) Date: Mon, 19 Apr 2021 23:15:54 +0200 From: Alexandre Belloni To: "Gervais, Francois" Cc: "linux-rtc@vger.kernel.org" , Alessandro Zummo , Michael McCormick , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 1/1] rtc: pcf85063: add integrity check Message-ID: References: <20210311174940.23072-1-fgervais@distech-controls.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/04/2021 20:26:42+0000, Gervais, Francois wrote: > > I'm not sure I get the use case because PCF85063_REG_CTRL2 should be > > initialized properly after the driver is probed anyway. The other two > > can be set from userspace once it detects the oscillator failure which > > would be better at deciding the policy anyway. > > Thank you for the feedback I think I understand now. > > We saw the reported problem on devices running kernel v5.4 which doesn't > have the common clock framework support and so PCF85063_REG_CTRL2 > clkout was not initialized by the kernel and left at hardware default. > > I guess with CCF support, if PCF85063_REG_CTRL2 gets corrupted on > power application, on driver probe the clkout value will be set to 0b000 > or some known default. > > I'm not familiar the CCF, do you know if it's the case that default values > will be set on boot? The CCF will disable any clocks that are not used on boot so the clock will be either used and configured or not used and disabled. -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com