linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	Balamanikandan Gunasundar 
	<balamanikandan.gunasundar@microchip.com>,
	ludovic.desroches@microchip.com, nicolas.ferre@microchip.com,
	alexandre.belloni@bootlin.com, 3chas3@gmail.com,
	linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org
Subject: Re: [PATCH] mmc: atmel-mci: Convert to gpio descriptors
Date: Thu, 10 Nov 2022 14:33:06 -0800	[thread overview]
Message-ID: <Y218Itfc4wp3XZvt@google.com> (raw)
In-Reply-To: <CACRpkdYeJ0NuJr_RF10oMAEuhYTBfaLfHoZ=b3A2f4BqXkvzOQ@mail.gmail.com>

Hi,

On Wed, Nov 09, 2022 at 03:48:32PM +0100, Linus Walleij wrote:
> On Wed, Nov 9, 2022 at 1:39 PM Ulf Hansson <ulf.hansson@linaro.org> wrote:
> > On Wed, 9 Nov 2022 at 05:39, Balamanikandan Gunasundar
> (...)
> > > --- a/drivers/mmc/host/atmel-mci.c
> > > +++ b/drivers/mmc/host/atmel-mci.c
> > > @@ -19,7 +19,8 @@
> > >  #include <linux/module.h>
> > >  #include <linux/of.h>
> > >  #include <linux/of_device.h>
> > > -#include <linux/of_gpio.h>
> > > +#include <linux/irq.h>
> > > +#include <linux/gpio/consumer.h>
> 
> This is nice, but higher up the driver also #include <linux/gpio.h>
> so delete that line too, <linux/gpio/consumer.h> should be enough.
> 
> > > -                       of_get_named_gpio(cnp, "cd-gpios", 0);
> > > +                       devm_gpiod_get_from_of_node(&pdev->dev, cnp,
> > > +                                                   "cd-gpios",
> > > +                                                   0, GPIOD_IN, "cd-gpios");
> (...)
> > >                 pdata->slot[slot_id].wp_pin =
> > > -                       of_get_named_gpio(cnp, "wp-gpios", 0);
> > > +                       devm_gpiod_get_from_of_node(&pdev->dev, cnp,
> > > +                                                   "wp-gpios",
> > > +                                                   0, GPIOD_IN, "wp-gpios");
> 
> Hm. Dmitry is trying to get rid of of_get_named_gpio() I think.
> 
> But I suppose we can migrate to fwnode later.

I'd much rather we changed this right away to

	devm_fwnode_gpiod_get(&pdev->dev, of_fwnode_handle(cnp),
			      "wp", GPIOD_IN, "wp-gpios");

and not added new users of devm_gpiod_get_from_of_node() which is there
only 2 left.

Thanks!

-- 
Dmitry

  reply	other threads:[~2022-11-10 22:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09  4:38 [PATCH] mmc: atmel-mci: Convert to gpio descriptors Balamanikandan Gunasundar
2022-11-09 12:38 ` Ulf Hansson
2022-11-09 14:48   ` Linus Walleij
2022-11-10 22:33     ` Dmitry Torokhov [this message]
2022-11-09 17:16 ` Andrew Lunn
2022-11-10  8:05   ` Arnd Bergmann
2022-11-10  9:02     ` Arnd Bergmann
2022-11-10 22:41 ` Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y218Itfc4wp3XZvt@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=3chas3@gmail.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=balamanikandan.gunasundar@microchip.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-atm-general@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ludovic.desroches@microchip.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).