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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4ADA9C433F5 for ; Fri, 22 Oct 2021 09:00:39 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A1424610CB for ; Fri, 22 Oct 2021 09:00:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A1424610CB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F3F17833B1; Fri, 22 Oct 2021 11:00:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 3A16083485; Fri, 22 Oct 2021 11:00:35 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id EBEB283311 for ; Fri, 22 Oct 2021 11:00:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=andre.przywara@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3D908ED1; Fri, 22 Oct 2021 02:00:30 -0700 (PDT) Received: from donnerap.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1EA5E3F70D; Fri, 22 Oct 2021 02:00:29 -0700 (PDT) Date: Fri, 22 Oct 2021 10:00:25 +0100 From: Andre Przywara To: Jaehoon Chung Cc: Samuel Holland , u-boot@lists.denx.de, Jagan Teki , Andy Shevchenko , Icenowy Zheng , Jernej Skrabec , Peng Fan , Simon Glass Subject: Re: [PATCH 4/4] mmc: sunxi: Use DM_GPIO flags to set pull-up Message-ID: <20211022100025.1232eee4@donnerap.cambridge.arm.com> In-Reply-To: <8362c608-dbbf-aa74-38df-a2c23e732ed9@samsung.com> References: <20211021045258.30757-1-samuel@sholland.org> <20211021045258.30757-5-samuel@sholland.org> <8362c608-dbbf-aa74-38df-a2c23e732ed9@samsung.com> Organization: ARM X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On Fri, 22 Oct 2021 06:58:48 +0900 Jaehoon Chung wrote: Hi Jaehoon, thanks for having a look! > Hi, > > On 10/21/21 1:52 PM, Samuel Holland wrote: > > Now that the sunxi_gpio driver handles pull-up/down via the driver > > model, pin configuration does not need a platform-specific function. > > > > Signed-off-by: Samuel Holland > > --- > > > > drivers/mmc/sunxi_mmc.c | 8 ++------ > > 1 file changed, 2 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c > > index c170c16d5a..955b29826f 100644 > > --- a/drivers/mmc/sunxi_mmc.c > > +++ b/drivers/mmc/sunxi_mmc.c > > @@ -700,12 +700,8 @@ static int sunxi_mmc_probe(struct udevice *dev) > > return ret; > > > > /* This GPIO is optional */ > > - if (!gpio_request_by_name(dev, "cd-gpios", 0, &priv->cd_gpio, > > - GPIOD_IS_IN)) { > > - int cd_pin = gpio_get_number(&priv->cd_gpio); > > - > > - sunxi_gpio_set_pull(cd_pin, SUNXI_GPIO_PULL_UP); > > - } > > + gpio_request_by_name(dev, "cd-gpios", 0, &priv->cd_gpio, > > + GPIOD_IS_IN | GPIOD_PULL_UP); > > Is it right to set the pull-up? You mean, unconditionally? I mean it's just copying the current code, which does that (see the "minus" lines just above). But I think you have a point: I don't see any pull up specified in any DT, and I think most (if not all) boards have a discrete pull up resistor on that line. But I don't dare to touch that code - at least for this series, as it works (TM) right now. After the full DM_PINCTRL series this might be another story, though. Cheers, Andre > > Best Regards, > Jaehoon Chung > > > > > upriv->mmc = &plat->mmc; > > > > >