mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Nicolas Ferre" <nicolas.ferre@microchip.com>,
	"Arnd Bergmann" <arnd@kernel.org>,
	"Ludovic Desroches" <ludovic.desroches@microchip.com>,
	"Ulf Hansson" <ulf.hansson@linaro.org>,
	"Balamanikandan Gunasundar"
	<Balamanikandan.Gunasundar@microchip.com>
Cc: "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
	"Claudiu Beznea" <claudiu.beznea@microchip.com>,
	linux-kernel@vger.kernel.org,
	"linux-mmc @ vger . kernel . org" <linux-mmc@vger.kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	Netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH] mmc: atmel: convert to gpio descriptos
Date: Fri, 27 Jan 2023 11:49:50 +0100	[thread overview]
Message-ID: <8c0dc833-b61c-4e4f-b4aa-20109fd2ff17@app.fastmail.com> (raw)
In-Reply-To: <8028ffe4-c042-e405-ac64-6707c84d5a1f@microchip.com>

On Fri, Jan 27, 2023, at 11:32, Nicolas Ferre wrote:
> Hi Arnd,
>
> On 26/01/2023 at 14:50, Arnd Bergmann wrote:
>> From: Arnd Bergmann <arnd@arndb.de>
>> 
>> All Atmel (now Microchip) machines boot using DT, so the
>> old platform_data for this driver is no longer used by any
>> boards.
>> 
>> Removing the pdata probe lets us simplify the GPIO handling
>> with the use of the descriptor API.
>
> Thanks for your patch. I would like to know if it's related to the 
> initiative started by Bala in this series:
>
> https://lore.kernel.org/all/20221226073908.17317-1-balamanikandan.gunasundar@microchip.com/
>
> It's true that it didn't come to a conclusion yet...

I hadn't seen that one, my patch was a somewhat older series to
convert a couple of subsystems over from the old of_get_named_gpio(),
with no special interest in this platform.

It looks like the patches are fairly similar, with two differences
I can see immediately:

- I use the normal devm_gpiod_get_optional(), while Bala uses
  the fwnode variant that should not be needed here since the
  fwnode is the one for the platform device itself.
- I use the normal gpiod_get_value(), which will handle polarity
  as specified in DT, while Bala's patch uses gpiod_get_raw_value().
  The difference is what happens when the GPIO_ACTIVE_LOW flag
  is set in the DT, and the possible combinations with the
  "cd-inverted" flag. I did not test my version, so I assume
  Bala is correct here, but it would be good to review this
  carefully either way.

     Arnd

      reply	other threads:[~2023-01-27 10:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-26 13:50 Arnd Bergmann
2023-01-26 23:54 ` Jakub Kicinski
2023-01-27 10:32 ` Nicolas Ferre
2023-01-27 10:49   ` Arnd Bergmann [this message]

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=8c0dc833-b61c-4e4f-b4aa-20109fd2ff17@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=Balamanikandan.Gunasundar@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=arnd@kernel.org \
    --cc=claudiu.beznea@microchip.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --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

Powered by JetHome