From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 428DBC43387 for ; Wed, 26 Dec 2018 22:36:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 14C77218FC for ; Wed, 26 Dec 2018 22:36:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rv/KoeNS"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="lj8/h9Fu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 14C77218FC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=T/Sp+cJuwEdFAHHiG1ESBij5GP5OZHx7sD9bA8nRLlU=; b=rv/KoeNSp/qDfj +g5JFGZjpdtpruZEgXj7tTvBKTUbIDkVw3P1NJ2RuvpRjAkmixGK48aDUT+XZFgn++vICDKFvWo8d CvdTc95z8nLy8mtXQROLzeIWsYvOPGuLT1q4b/yV9kgtoPKTdZs1inHwJSryaZ4V0GIASQ2PaivkH tCG7N8Pc2MSEvj5au/FAEIhBV1Dd1bNtyTSayopxN0bxwzlwM0QgL/WdADWNrElVBukRJFINTk6eB 41NqMR+Oe6TnbZMyn+CIq1ePPAD5g3QFY183GoiwVfn9gRq/qN1EPLL4qGuUeP/KFMGlWQE2C3xZ5 rNG0+dvfmozrbWrgZzHA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gcHmj-0007Wk-08; Wed, 26 Dec 2018 22:36:17 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gcHmg-0007V6-2I for linux-amlogic@lists.infradead.org; Wed, 26 Dec 2018 22:36:15 +0000 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2E372218EA; Wed, 26 Dec 2018 22:36:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1545863762; bh=+UsXK8ncnqHvF5avdfkuyb3u1krBLvbmjzTngtqA4h4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lj8/h9Fug/1vjyMaN9jOnT0mcps+eedLSojmDSMBPR59uUQPYF2ymTIqz53TZRoC0 u2Z5uuGLUeJT7eJcQJ3cnbqGQsfLmgDS5+oD1RMUz0OoP7JkePsvaYWU+0/otfWfhm GMwXe0+HKwt91kHMN8/oI3JHPrcDNzyPEolLRn10= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 02/97] pinctrl: meson: fix pull enable register calculation Date: Wed, 26 Dec 2018 17:34:22 -0500 Message-Id: <20181226223557.149329-2-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181226223557.149329-1-sashal@kernel.org> References: <20181226223557.149329-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181226_143614_122882_DB8003F5 X-CRM114-Status: GOOD ( 10.13 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sasha Levin , linux-gpio@vger.kernel.org, Linus Walleij , linux-amlogic@lists.infradead.org, Jerome Brunet Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org From: Jerome Brunet [ Upstream commit 614b1868a125a0ba24be08f3a7fa832ddcde6bca ] We just changed the code so we apply bias disable on the correct register but forgot to align the register calculation. The result is that we apply the change on the correct register, but possibly at the incorrect offset/bit This went undetected because offsets tends to be the same between REG_PULL and REG_PULLEN for a given pin the EE controller. This is not true for the AO controller. Fixes: e39f9dd8206a ("pinctrl: meson: fix pinconf bias disable") Signed-off-by: Jerome Brunet Acked-by: Neil Armstrong Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/meson/pinctrl-meson.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c index 4f3ab18636a3..c8eff70fdb1c 100644 --- a/drivers/pinctrl/meson/pinctrl-meson.c +++ b/drivers/pinctrl/meson/pinctrl-meson.c @@ -191,7 +191,8 @@ static int meson_pinconf_set(struct pinctrl_dev *pcdev, unsigned int pin, case PIN_CONFIG_BIAS_DISABLE: dev_dbg(pc->dev, "pin %u: disable bias\n", pin); - meson_calc_reg_and_bit(bank, pin, REG_PULL, ®, &bit); + meson_calc_reg_and_bit(bank, pin, REG_PULLEN, ®, + &bit); ret = regmap_update_bits(pc->reg_pullen, reg, BIT(bit), 0); if (ret) -- 2.19.1 _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: [PATCH AUTOSEL 4.19 02/97] pinctrl: meson: fix pull enable register calculation Date: Wed, 26 Dec 2018 17:34:22 -0500 Message-ID: <20181226223557.149329-2-sashal@kernel.org> References: <20181226223557.149329-1-sashal@kernel.org> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <20181226223557.149329-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jerome Brunet , Linus Walleij , Sasha Levin , linux-gpio@vger.kernel.org, linux-amlogic@lists.infradead.org List-Id: linux-gpio@vger.kernel.org From: Jerome Brunet [ Upstream commit 614b1868a125a0ba24be08f3a7fa832ddcde6bca ] We just changed the code so we apply bias disable on the correct register but forgot to align the register calculation. The result is that we apply the change on the correct register, but possibly at the incorrect offset/bit This went undetected because offsets tends to be the same between REG_PULL and REG_PULLEN for a given pin the EE controller. This is not true for the AO controller. Fixes: e39f9dd8206a ("pinctrl: meson: fix pinconf bias disable") Signed-off-by: Jerome Brunet Acked-by: Neil Armstrong Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/meson/pinctrl-meson.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c index 4f3ab18636a3..c8eff70fdb1c 100644 --- a/drivers/pinctrl/meson/pinctrl-meson.c +++ b/drivers/pinctrl/meson/pinctrl-meson.c @@ -191,7 +191,8 @@ static int meson_pinconf_set(struct pinctrl_dev *pcdev, unsigned int pin, case PIN_CONFIG_BIAS_DISABLE: dev_dbg(pc->dev, "pin %u: disable bias\n", pin); - meson_calc_reg_and_bit(bank, pin, REG_PULL, ®, &bit); + meson_calc_reg_and_bit(bank, pin, REG_PULLEN, ®, + &bit); ret = regmap_update_bits(pc->reg_pullen, reg, BIT(bit), 0); if (ret) -- 2.19.1