Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp981153lqh; Fri, 29 Mar 2024 03:29:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU3uZs++K4QQdgl6GCnsymQnLgxQGu4xKDW2XX27NksLL1uX63vRQJ466eYzHBrkQ9Dfw6xhDDwVF8evvCyS/crfbKqaNpJzuOuZ+kJGQ== X-Google-Smtp-Source: AGHT+IHA2vb8vD9Cl71PGWe9xEg6fcMr7ggpUsOY904UO6SChG8urhPGvWd8ekHGxItsNPasM4o4 X-Received: by 2002:a17:906:2847:b0:a46:d5b9:c2ae with SMTP id s7-20020a170906284700b00a46d5b9c2aemr1215602ejc.32.1711708140657; Fri, 29 Mar 2024 03:29:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711708140; cv=pass; d=google.com; s=arc-20160816; b=sMcR5o33VON4gtOSqjEp2ULpklPZext+g+jKLitZVswj8B8ZzYXz4X65s1o1GefSUI yaB8/jo+ulBhAgwx8ehuS+epgkwFyfNW/eOaDnrFE9ZbKziO4RpIXC+8FXUw3IlPkTNg mwvvGCnvOxIpwU6AnHpp5eHJ2qACMhsCIcJbdw2kV++ntplSMomEzk091Orl1UGYqBY7 nFAXkQSeWngUOK7s4ginvpJ2OTlNE1K+X9TIK2WtaVNvmrm97MElABg+jb8afePdoG80 wgwulVU6evpGb0MBSM0FGlDjq5KFdLPowVpStfRy7QGRtbYXdB42wO5u8mW/KbK5k4vd 49sQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=8jLCIWTLVye4PXFQW3QnPZ9wsvlBJeU7UwVpsnvSw6w=; fh=+JO7wHWOmFJJBQwmIRrYT3oatSNoc83/Ami2hi5dejE=; b=FJFDjhtehUAqzSMNglLcmi64KL69E5xK9c/hhM8td8es8fsQZBpw9G8LDPdWnrNU/I xYN1MjMq+UOsd/fyCoE+rhwJirC8CyteamRPCI+UOgPE78PtGjGPXHltDOTRKBP+VTuK UJGUuNZEONStGCsCuYAw9iiku4vjougWvWQIbKU0VwHcDWYDZvvSDNcaJ5+/ZSu3jUnz sgrhPe+Kuo9HtX49l+Pzj9VviFvZ0ycZmmQ7Q/iaOr0iDqe1T3LSUmLC7Yh+eilfsb6C FEjjUhEA3ucEszJlamIEmU3OYH8Gbl63brEMW39Y1Vo8VhcHDmAXKLtMWKbatipSnmBr cd1A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=gEtLObBZ; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-124389-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124389-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ne32-20020a1709077ba000b00a47473982besi1763867ejc.381.2024.03.29.03.29.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 03:29:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-124389-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=gEtLObBZ; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-124389-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124389-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 553081F23F2D for ; Fri, 29 Mar 2024 10:29:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8510654665; Fri, 29 Mar 2024 10:28:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="gEtLObBZ" Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7914B53E01; Fri, 29 Mar 2024 10:28:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.198 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711708132; cv=none; b=N0Ugqg88vnr+yFO2Fmt+U4vnZA4Av7xTT6zNWTvAdxual5VD5Sl2Uk0MAme+ZqzItuuz6RtBb0Y+7ijWKCV+dX7050ujF4Idc922+6LhL2urKaWm6ERzMxa1QQ11rLsln5B5qOl8wuUCB72UJzI+I+4Uc/GlDdOluk5Lugr3ugM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711708132; c=relaxed/simple; bh=INoHp/pa5mQKkPJSEnhdMRcocNB4PmSJWa7zs42M1lA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YN3pIqu23tvGzPfaiGQtr4V+Gea8dJJKXfhVulyClkxLPy+R1i4SOJYwDnp2881HiKrrIWtZ+asCkyYQzfaAjBXi6X1EsPbWsOQ0wt4KioADXSxXp04ehZpJNDqJ4EMZj/IMn51H9E7b95cH2zGyPuGHlxf6OuvNIuu7fjP+C7g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=gEtLObBZ; arc=none smtp.client-ip=217.70.183.198 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 7FFDCC0008; Fri, 29 Mar 2024 10:28:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1711708127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8jLCIWTLVye4PXFQW3QnPZ9wsvlBJeU7UwVpsnvSw6w=; b=gEtLObBZI40GFMjxYbApcxXhhVxY5fE+ZOFuVqKBUMGvGuOlEp31hsm7VbS68RsPeNtB8j aILG2nfC/+K9O5qN2cie/1aci9+MURBK5ocDj2a5KwX3Xv9qKYFl5ZaoEBo6MUIMBBkvkP dccQ8+5O0qOns3cGRL9f2vOnfTCPJYjvZZ61f/Y4hhmlhcA5O6jV2GIem6eFgW3Eu01+sI +l3+TDAiExWUoG0ckblTrfpl9e8L1RLbk1Cw9rdqn3pSgyjIBGfGrOkijADVHSvSaS1fPb a6bcl82HPQIEBHn/LQcHiTgIl6238ZbumelOOSZTtm/g0qNWfimrr5b3IL2OdQ== Date: Fri, 29 Mar 2024 11:28:47 +0100 From: Alexandre Belloni To: Karthikeyan Krishnasamy Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, parthiban@linumiz.com, saravanan@linumiz.com Subject: Re: [PATCH] drivers: rtc: rv3028: check and update PORF flag during probe Message-ID: <20240329102847fcdca1cf@mail.local> References: <20240329101940.1424643-1-karthikeyan@linumiz.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240329101940.1424643-1-karthikeyan@linumiz.com> X-GND-Sasl: alexandre.belloni@bootlin.com On 29/03/2024 15:49:40+0530, Karthikeyan Krishnasamy wrote: > PORF flag is set during power reset and voltage drop below Vpor > data in rtc device is no longer valid if PORF flag is set > and software must reset to 0, in order to perform sanity > check on rtc data > > Signed-off-by: Karthikeyan Krishnasamy > --- > drivers/rtc/rtc-rv3028.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/rtc/rtc-rv3028.c b/drivers/rtc/rtc-rv3028.c > index 2f001c59c61d..e9699ff0c4e8 100644 > --- a/drivers/rtc/rtc-rv3028.c > +++ b/drivers/rtc/rtc-rv3028.c > @@ -951,6 +951,13 @@ static int rv3028_probe(struct i2c_client *client) > if (ret < 0) > return ret; > > + if (status & RV3028_STATUS_PORF) { > + ret = regmap_update_bits(rv3028->regmap, RV3028_STATUS, > + RV3028_STATUS_PORF, 0); > + if (ret < 0) > + return ret; > + } > + This breaks the workflow, you must set the time to reset PORF. > if (status & RV3028_STATUS_AF) > dev_warn(&client->dev, "An alarm may have been missed.\n"); > > -- > 2.34.1 > -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com