lkml.org 
[lkml]   [2023]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@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

\
 
 \ /
  Last update: 2023-03-26 23:58    [W:0.457 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site