mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 05/10] gpiolib: export proper gpio descriptor API
Date: Tue, 20 Jun 2023 08:18:15 +0200	[thread overview]
Message-ID: <ca3946ba-916e-7714-8b2d-9a9c27cbcb3e@pengutronix.de> (raw)
In-Reply-To: <20230620061335.y3fs5wulabyetp7f@pengutronix.de>

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 |




  reply	other threads:[~2023-06-20  6:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-14 13:54 [PATCH 00/10] gpio: add proper gpiod API and gpio-mux support Ahmad Fatoum
2023-06-14 13:54 ` [PATCH 01/10] driver: include dev_print and family from <driver.h> Ahmad Fatoum
2023-06-14 13:54 ` [PATCH 02/10] include: linux/printk: define new dev_errp_probe Ahmad Fatoum
2023-06-14 13:54 ` [PATCH 03/10] gpio: have gpiod_ functions return and accept pointers Ahmad Fatoum
2023-06-14 13:54 ` [PATCH 04/10] gpio: gpiolib: rename struct gpio_info to gpio_desc Ahmad Fatoum
2023-06-14 13:54 ` [PATCH 05/10] gpiolib: export proper gpio descriptor API Ahmad Fatoum
2023-06-20  5:20   ` Marco Felsch
2023-06-20  5:55     ` Ahmad Fatoum
2023-06-20  6:13       ` Marco Felsch
2023-06-20  6:18         ` Ahmad Fatoum [this message]
2023-06-14 13:54 ` [PATCH 06/10] bitmap: implement bitmap_{to,from}_arr{32,64} Ahmad Fatoum
2023-06-14 13:54 ` [PATCH 07/10] commands: help: ignore options after first regular argument Ahmad Fatoum
2023-06-14 13:54 ` [PATCH 08/10] gpiolib: factor out finding gpio property Ahmad Fatoum
2023-06-14 13:54 ` [PATCH 09/10] gpiolib: add support for requesting and setting gpiod arrays Ahmad Fatoum
2023-06-14 13:54 ` [PATCH 10/10] drivers: port Linux mux framework and gpio-mux driver Ahmad Fatoum
2023-06-14 15:21   ` Ahmad Fatoum
2023-06-20  5:51 ` [PATCH 00/10] gpio: add proper gpiod API and gpio-mux support Marco Felsch
2023-06-21  9:27 ` Sascha Hauer

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=ca3946ba-916e-7714-8b2d-9a9c27cbcb3e@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=m.felsch@pengutronix.de \
    /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