From patchwork Wed Jul 17 21:16:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 11048247 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 09A58112C for ; Wed, 17 Jul 2019 21:17:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC244285EE for ; Wed, 17 Jul 2019 21:17:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF4A128785; Wed, 17 Jul 2019 21:17:23 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 44A32285EE for ; Wed, 17 Jul 2019 21:17:23 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=VOHp/cJZHev2xNkL/uHaJKZYQsIwgYIbFFNkd4/55gc=; b=H7g R9jXi2EUg4dCZ7HBybDf6ukUMucT8hJGZiFeWs4D/ThnplB0r2iKkChIIBv8gkB0cftIAS6Wmq2DZ cErNTDlwl5H7H02aQ6r2q+CM+BKqRJdbiWh9Pco/utYYeiTUKBrxMNoXGQwU6of/lnLhFiihgJ0mk LNQIbKf4YmjAYUd35PTIAwGng6T3J1P3eW8rCKaoIyALpZFHMxWSGPhpo9AMhTIsH1Y9Az+zgo37O ZF1JHJ5Olz69dDn2LTCq3V+O4AGJar4BG/qnN1KqPwFegdtAarPB6cag6vMftqQqp+FNjBx2z+FqS a7FJ4viKSQfy1pZ0qlgezuC9q10u7Dg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hnrIg-0001QG-BQ; Wed, 17 Jul 2019 21:17:22 +0000 Received: from mout.gmx.net ([212.227.17.21]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hnrIN-0001Dd-EB; Wed, 17 Jul 2019 21:17:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1563398201; bh=WCvMKXDBWKXwnYHjZMMZNVbZNpb2SQ/h74IatwOILpk=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=RYXo/GhcP+xozWXeTehL1uwbCDeDlTOaSV14YnuDlhIJldgkr31zreeYY/MBWiDI2 RW9Bjjn6Gqpkk9yf6XKvauY5ZTSe6tKELH4SFWDaM1F/ZYsiHqR7N1q7s89s6ra0aS TC7AIUqDGpyrR9D8ljnmD8Nca4wVejQ96F+D3q2I= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([37.4.249.103]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MHGCu-1hjTYm3k6S-00DJu3; Wed, 17 Jul 2019 23:16:41 +0200 From: Stefan Wahren To: Eric Anholt , Florian Fainelli , Ray Jui , Scott Branden , Nicolas Saenz Julienne , Rob Herring , Mark Rutland , Linus Walleij , Michael Turquette , Stephen Boyd , Ulf Hansson , Adrian Hunter , Mark Brown Subject: [PATCH RFC 14/18] HACK: pinctrl: bcm2835: Implement legacy pull for BCM7211 Date: Wed, 17 Jul 2019 23:16:00 +0200 Message-Id: <1563398164-2679-1-git-send-email-wahrenst@gmx.net> X-Mailer: git-send-email 2.7.4 X-Provags-ID: V03:K1:3Te/qeP21f9Rlc/FvaGmfk05uRVCEXdDCLUdyTOaML1i2CWISmx XsU6ceFsnjyCWvHrPFjmeN5YEbj6ypngSKgMDbdNYO0EST/XX4/0zWfBDUzm0kY9sVuIyVZ etPg0G6Gzbm6zWI7aezIyQbQFzRZPRsAuz7OnIZ8Def+486AOqMEPNk/6jr6KYO53Mw6/8A Sw8ZgS1ywrYcvSoLFRwbw== X-UI-Out-Filterresults: notjunk:1;V03:K0:YQPbP2QatIQ=:jAgQW5+YLaCVzPLRmLvRXZ HQVphSNed/dOaajpvSpFRpjyvabuS7tokZHaSH4QI1nx5Ukgvgm0A6IFmiMLLZbZNwjKwYktg JEf4uzGEQ12wXteboPRpHHwl9Oi8Wn4gKg9OkCZsZ2srH3cn9+WSCmUrXnLJXUddG3DW1KzL1 VCqqf179CwpyRSy9UrmlHIeKClcg7as4EAKBy+IpBiiry2zi1J/7TheWvrRlPyXSutpTNmYoR Xkg7EyeLehQGcgXUguPBOBH7GHpp64xNECZnNaoyHEgycxrXelt/H+/9fXVMdEWl/3MWcCVeI K7tr4WyPZNziH2NCIHkTpDTaZfS7fgR5woJCnXKaOoDXaq5i5/snax0I1fgUCaXQUlJQcKbMZ lNuBFuHLaTmuccQJra7xP3eUDaOtDKBg9hFqn23gpbVsnUVEXMzbTFZd2ooM+GITBg3vdglcm 8WBs4F1GxC+qCDWamXLIzEGjFBEZ5suz3cmetGEofocxNdwXjrDvm06H9asSKnzd8gktYWdAv Xmd9zhwrK68AF6gwm16hu78TCXtgUbM32MgRm/rKG0CAnaK5aJtcTO7wdWIo+2UmlYhfbqI7w kzX1b2l1cdGR8HmxiyrseE248yuhV6HyCMki8zVBrYm0zOwpNbXU9UrMizgyIfgsDalRLpU9n jlrGSHn6t6KBeGSH5KnLRRJcKLd9aDa5LdnfsJSaQQHa90S622Y2BgXPeI040W/QwV8HZfz7+ D2vmkxwuEADRtrYcP3ZKK3lXxeIBJyClQF9350VQ9o0ZlU7/Kgo4u30+YVDMdMAh0CLaeUaIa yLIVznRpuYoBySsmivoObLoGD0F7yKwGJjCFDB0rpAbuFDHTgierIvME8So3+ojb4ibUO2Qet Pc5GM9clwdcmGRwQPYojLS7jXz10LFB1eGDEKxuHb4mTCYdgQy1mUhijKg60KLrCYim5klt0Q PjazMync97qId3f1O3U0oYCmEJPYZyF8b3BU7lND2uwLvCxjbDDF8XlMWjZOhWzFTy1/3E4QY cUiB2sM+yZokwxfgZTeOtiBVw4Vg/Noru1+y9vdHojUa0c3s16g15G2kJXXTquK22THEWrytj FqIZ4RrDtCGQj0= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190717_141703_799940_B4EB6B4B X-CRM114-Status: GOOD ( 11.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This temporay hack is necessary to make the BCM2838/7211 work with the legacy pull configuration. The better approach is to convert all affected DTS files to the generic bias control. Signed-off-by: Stefan Wahren --- drivers/pinctrl/bcm/pinctrl-bcm2835.c | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.7.4 diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c index 7f7cc5c..56161b6 100644 --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c @@ -1003,6 +1003,13 @@ static int bcm7211_pinconf_set(struct pinctrl_dev *pctldev, /* convert to 7211 value */ switch (param) { + case BCM2835_PINCONF_PARAM_PULL: + /* convert legacy brcm,pull */ + if (arg == BCM2835_PUD_UP) + arg = BCM7211_PINCONFIG_PULL_UP; + else if (arg == BCM2835_PUD_DOWN) + arg = BCM7211_PINCONFIG_PULL_DOWN; + break; case PIN_CONFIG_BIAS_DISABLE: arg = BCM7211_PINCONFIG_PULL_NONE; break;