From patchwork Tue Nov 13 10:55:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 10680235 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A72291747 for ; Tue, 13 Nov 2018 10:56:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 94828277D9 for ; Tue, 13 Nov 2018 10:56:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 88AC8284B1; Tue, 13 Nov 2018 10:56:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E1966277D9 for ; Tue, 13 Nov 2018 10:56:13 +0000 (UTC) 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: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:In-Reply-To:References: List-Owner; bh=zaDasuiRcHZpuTDyPp9Vue5JCz3wnxfJhwzBdtdNR4c=; b=s/UFEaE8sB+mpB rTOnEaxdykAI6fvL3X99alrDdv4PcPGfofy2DxhPXvdT3mkFNqBfI1HIfNtCMnuyGiNnEl6d13BSD HTfXB1ajKOPTiN4kMmrMuEhXGGFa0mRbE9KSHwgs3FrzSmpmpk/j23NbcniyItuhYcoC5qo/fM8og DBdIfQQDliwIzw/7JA4A4mzNwp0DpbV3dqTBUIj55Ha/jlwcIUZGFO8NqenRngmoYEnwEm5QPVuI0 JOTfhbPLtfeo0FA6G0rW0/PoCgkpC7wdbhfX1TZeqR3yyvC2r0/OL+GHiUBtSE5JRNQe9/dNWsWwu vPqIZK90DY/oeR/2ixcQ==; 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 1gMWMf-0000ZR-CP; Tue, 13 Nov 2018 10:56:13 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMWMd-0000YK-1y for linux-amlogic@lists.infradead.org; Tue, 13 Nov 2018 10:56:12 +0000 Received: by mail-wr1-x443.google.com with SMTP id y3-v6so12733323wrh.10 for ; Tue, 13 Nov 2018 02:56:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Wt7pkL3la0ggYXUL0EKhSbI+tOA4s03vVHS9+1Kq4sc=; b=ux6NW9ShhTMAlzNi7lIpe327lxvhDDrySoRcEVsUGo/AjBDtTMNqzb+fKKLzdaMKIN EYuMspC8L3J/fE+srr+RWGopBDsCcfUkSrCFcDf+oEfCUkUFE0CGgIlC/T8bWyY6FdFS hYljbmOqJ36M3Y/rdkDBPWBxMvNptQWRYVANrH/xOXh+NWo0REjDuZkpHaACAyp2okN6 EtegoVwldn/xcWYR4IE46lUKB8kAeDI2g4NJwlHRLSWw9YXuJQERCzqBVGkAkA9iV9WW abdpCmUow+SGBML2TUDdj5ZFAH0T9huWq5KSfd+PRAVwnqdblnDvzsh84HoVLoAOogbR M7Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Wt7pkL3la0ggYXUL0EKhSbI+tOA4s03vVHS9+1Kq4sc=; b=GYdf/RKKer5lreRrOYSf019DW6Pn4IbYiU26oop0qFnyUXIxFnsZie9IzzD5+Lil/S 0ZIDSuhTW7Km/6p6wvaP8SYLm3GS3W+Bi7f0US1QnqUWg7GibRH7pqasRWeGCqRBj5DT 93ltY4Vc8e+gPkOQ4STEAoGgyfKnLnjbXFHmQDHH8Iifv7hTk78lyFz6SflXmRsA/RIN XpJuGJA6TsnJHtxLW641IHJ57uw9q6BvCL4IZNHfksJNfOS/omMZmzujZNqMMMTzp9Qi AY93t7rW+vVnAQnYk50mWClap71RxWfGC7zAY831ropLfeKKwbPS3aOkx3nnZrlDTXzG z58g== X-Gm-Message-State: AGRZ1gJQOr4kaHizuhutlavB7rwna4t2L8KtFsin55h5qoB7uGAE9asu lFCUlr0BaMWm4Ps9GlY3ToJy+g== X-Google-Smtp-Source: AJdET5dcFot088JbpfI+LtMUQon8sNzCV50XCdhWM+2SM9Me5OeYvSjrR8qP1WHEErDBe4mQYyML5Q== X-Received: by 2002:adf:83e3:: with SMTP id 90-v6mr4541797wre.278.1542106558646; Tue, 13 Nov 2018 02:55:58 -0800 (PST) Received: from boomer.local ([2a01:e34:eeb6:4690:106b:bae3:31ed:7561]) by smtp.googlemail.com with ESMTPSA id v9-v6sm20671096wrm.6.2018.11.13.02.55.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Nov 2018 02:55:57 -0800 (PST) From: Jerome Brunet To: Linus Walleij , Kevin Hilman , Carlo Caione Subject: [PATCH] pinctrl: meson: fix pull enable register calculation Date: Tue, 13 Nov 2018 11:55:36 +0100 Message-Id: <20181113105536.6459-1-jbrunet@baylibre.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181113_025611_098241_56EEFA17 X-CRM114-Status: GOOD ( 10.46 ) 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: linux-gpio@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, Jerome Brunet Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 53d449076dee..ea87d739f534 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)