lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <8c0dc833-b61c-4e4f-b4aa-20109fd2ff17@app.fastmail.com>
Date:   Fri, 27 Jan 2023 11:49:50 +0100
From:   "Arnd Bergmann" <arnd@...db.de>
To:     "Nicolas Ferre" <nicolas.ferre@...rochip.com>,
        "Arnd Bergmann" <arnd@...nel.org>,
        "Ludovic Desroches" <ludovic.desroches@...rochip.com>,
        "Ulf Hansson" <ulf.hansson@...aro.org>,
        "Balamanikandan Gunasundar" <Balamanikandan.Gunasundar@...rochip.com>
Cc:     "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        "Alexandre Belloni" <alexandre.belloni@...tlin.com>,
        "Claudiu Beznea" <claudiu.beznea@...rochip.com>,
        linux-kernel@...r.kernel.org,
        "linux-mmc @ vger . kernel . org" <linux-mmc@...r.kernel.org>,
        linux-arm-kernel@...ts.infradead.org,
        Netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH] mmc: atmel: convert to gpio descriptos

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@...db.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ