Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5943247rwb; Sun, 11 Dec 2022 15:56:43 -0800 (PST) X-Google-Smtp-Source: AA0mqf5rJetbK37VijD+kWME5jt1lZTXH0UifZetE4hvNyWTimy74lQjddisHlTRL7sv4/dguLhS X-Received: by 2002:a17:903:260d:b0:189:6ab3:9e64 with SMTP id jd13-20020a170903260d00b001896ab39e64mr14891477plb.34.1670803002779; Sun, 11 Dec 2022 15:56:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670803002; cv=none; d=google.com; s=arc-20160816; b=h/VL2UcCkMIA7C6Kgjt5WMv7bzR7SipEcXx3FlUaW4xrHoLipYYLfBzM+nYJW4MqqA nbSY7++psUcuW1BzHEkdFuSFmonU8SyKWnPXRLZ3lGshHfZb1TjtiwvxCEHzIzYDDtWY FiFxtcC/ZUENj3ih1go9aW6HGVoYhHHTbfSBVum2DbfOL7WsnGNUW1oW0hjiyx6kpNea +boPEf7jtuZaUho6Tpm3dOJuhD34cvi6WsSprJuLZkrknBsEdhIaHh3hHf/M8E+Zw+Ow pSSnug+YwRRNLiP8+OYt/4d2+vBWyEOjT9ULLqLHxuWzLLOjhtdLonz9z4E8sAdjhffV PKlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=0KOJ4zXaURWQnHMs6xWhQytHCPi+wcBSN7++KVZzNTo=; b=Pq0bELNM4ovrKolBMXH2redZ2TLzSSK5Q7i6IbifPu3LLkrARVMElvbKJRfI4lM3ag 2zYEuy6fVCj6Q6P2xYNZ0oOGLN9Mtx/+L7qA8617ciTqn6UTiwVlzDC/7fcTNPtBMaS8 dV+yO/3dvOFdYsbaXhFLahaD/QPu54Ed+tAiioAVg6FGUo0mb1Lo53YSsn2NLsMCwMXy ysCt22MHJOd/0UE6K+ayjhjh5SCHbJo+yr6TaShiowuF9m6jO4GUMuPYmE8AzHKeJnNp 9bcsCQ+kOZbVhTpiD9lYRFCSC6iQOlixW33kdCXgqvWlRcsdgy1mJ98McU7c7GlfqscG UWOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=WsR+8U2Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s193-20020a632cca000000b00476f101ef48si8243537pgs.7.2022.12.11.15.56.22; Sun, 11 Dec 2022 15:56:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=WsR+8U2Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230378AbiLKWgF (ORCPT + 76 others); Sun, 11 Dec 2022 17:36:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229656AbiLKWgE (ORCPT ); Sun, 11 Dec 2022 17:36:04 -0500 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::228]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18A1B647A; Sun, 11 Dec 2022 14:36:00 -0800 (PST) Received: (Authenticated sender: alexandre.belloni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id EA8331BF203; Sun, 11 Dec 2022 22:35:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670798159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=0KOJ4zXaURWQnHMs6xWhQytHCPi+wcBSN7++KVZzNTo=; b=WsR+8U2YYoaDuVTH9ziqyRgpeTA8yZytk7/aT645Mgxo/vWm5ULpphN7rc/EMia058f0fc o0vr0grLYLQeQAFEjiMoyWyfXfTnzQZE8n+Ms3v9wYsMt0PgPa5In+wySB4cFnlI9UgAge 073viXQIRhy/3ZIVmv/e7QTK+CNE9SbbXw7pkIv92W/70JqlAtmq5i+CzhcGEf+9dZ7FNc ao8+ouCN4+tEBTqrWsXvMJe4QDB/Kpi0+pLrEabAXjnXYYwCPYVrW0Y6rOKtdUqH55yW7t 1MPam4omzWoarxbYesoXHHulK/64DbtRpLgxrn/WD9905ihN0+LjxVosPZ9noA== From: alexandre.belloni@bootlin.com To: Alessandro Zummo , Alexandre Belloni , Michael McCormick Cc: Janne Terho , linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] rtc: pcf85063: fix pcf85063_clkout_control Date: Sun, 11 Dec 2022 23:35:53 +0100 Message-Id: <20221211223553.59955-1-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexandre Belloni pcf85063_clkout_control reads the wrong register but then update the correct one. Reported-by: Janne Terho Fixes: 8c229ab6048b ("rtc: pcf85063: Add pcf85063 clkout control to common clock framework") Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-pcf85063.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-pcf85063.c b/drivers/rtc/rtc-pcf85063.c index 99f9cc57c7b3..754e03984f98 100644 --- a/drivers/rtc/rtc-pcf85063.c +++ b/drivers/rtc/rtc-pcf85063.c @@ -424,7 +424,7 @@ static int pcf85063_clkout_control(struct clk_hw *hw, bool enable) unsigned int buf; int ret; - ret = regmap_read(pcf85063->regmap, PCF85063_REG_OFFSET, &buf); + ret = regmap_read(pcf85063->regmap, PCF85063_REG_CTRL2, &buf); if (ret < 0) return ret; buf &= PCF85063_REG_CLKO_F_MASK; -- 2.38.1