Re: [PATCH 05/10] gpiolib: export proper gpio descriptor API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Marco,

On 20.06.23 08:13, Marco Felsch wrote:
> On 23-06-20, Ahmad Fatoum wrote:
>> Hello Marco,
>>
>> On 20.06.23 07:20, Marco Felsch wrote:
>>>> -static unsigned gpioinfo_chip_offset(struct gpio_desc *desc)
>>>> +static unsigned gpioinfo_chip_offset(const struct gpio_desc *desc)
>>>
>>> Why do we stick with gpioinfo_* here? IMHO we could use
>>> gpiodesc_chip_offset() since the gpioinfo is gone.
>>
>> gpioinfo_ is internal. gpiod_ is external. I thought about renaming
>> gpioinfo_ to gpiodesc_, but found it confusing, because they are
>> too similar in name.
> 
> The gpioinfo_ is even more confusing (at least to me) since the struct
> the name is based on is renamed once this series gets merged.

I can send a follow up patch to rename the functions (or a v2
if there's other feedback).

>>> This function should be deleted since we don't support the global 'int'
>>> gpio anymore.
>>
>> We do support it. Lots of code across the tree doesn't use gpiod_ API.
> 
> Argh.. you're right. I thought, that your adaption patches do cover all
> users. Sorry my bad.
> 
>>>>  EXPORT_SYMBOL(gpio_direction_input);
>>>
>>> gpio_direction_input should be deleted as well?
>>
>> Once we have switches all over to use gpiod_ API, we could drop it, yes.
>> Patches to migrate existing users are certainly welcome ;)
> 
> Hm.. we should deprecate this function to make it clear and to encourage
> board maintainers to switch ;)

We can add deprecation warnings, but not before all in-tree users are
switched.

Cheers,
Ahmad



> 
>>
>> Cheers,
>> Ahmad
>>
>> -- 
>> Pengutronix e.K.                           |                             |
>> Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
>> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
>> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
>>
>>
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux