[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 5/8] gpiolib: Introduce gpiod_set_config()
From: |
Linus Walleij |
Subject: |
Re: [PATCH v6 5/8] gpiolib: Introduce gpiod_set_config() |
Date: |
Thu, 26 Mar 2020 22:26:30 +0100 |
On Tue, Mar 24, 2020 at 2:57 PM Geert Uytterhoeven
<address@hidden> wrote:
> The GPIO Aggregator will need a method to forward a .set_config() call
> to its parent gpiochip. This requires obtaining the gpio_chip and
> offset for a given gpio_desc. While gpiod_to_chip() is public,
> gpio_chip_hwgpio() is not, so there is currently no method to obtain the
> needed GPIO offset parameter.
>
> Hence introduce a public gpiod_set_config() helper, which invokes the
> .set_config() callback through a gpio_desc pointer, like is done for
> most other gpio_chip callbacks.
>
> Rewrite the existing gpiod_set_debounce() helper as a wrapper around
> gpiod_set_config(), to avoid duplication.
>
> Signed-off-by: Geert Uytterhoeven <address@hidden>
> ---
> v6:
> - New.
This is nice, I tried to actually just apply this (you also sent some
two cleanups that I tried to apply) byt Yue's cleanup patch
commit d18fddff061d2796525e6d4a958cb3d30aed8efd
"gpiolib: Remove duplicated function gpio_do_set_config()"
makes none of them apply :/
Yours,
Linus Walleij
- [PATCH v6 1/8] ARM: integrator: impd1: Use GPIO_LOOKUP() helper macro, (continued)
- [PATCH v6 1/8] ARM: integrator: impd1: Use GPIO_LOOKUP() helper macro, Geert Uytterhoeven, 2020/03/24
- [PATCH v6 8/8] MAINTAINERS: Add GPIO Aggregator section, Geert Uytterhoeven, 2020/03/24
- [PATCH v6 7/8] docs: gpio: Add GPIO Aggregator documentation, Geert Uytterhoeven, 2020/03/24
- [PATCH v6 3/8] mfd: sm501: Use GPIO_LOOKUP_IDX() helper macro, Geert Uytterhoeven, 2020/03/24
- [PATCH v6 2/8] i2c: i801: Use GPIO_LOOKUP() helper macro, Geert Uytterhoeven, 2020/03/24
- [PATCH v6 6/8] gpio: Add GPIO Aggregator, Geert Uytterhoeven, 2020/03/24
- [PATCH v6 4/8] gpiolib: Add support for GPIO lookup by line name, Geert Uytterhoeven, 2020/03/24
- [PATCH v6 5/8] gpiolib: Introduce gpiod_set_config(), Geert Uytterhoeven, 2020/03/24
- Re: [PATCH v6 5/8] gpiolib: Introduce gpiod_set_config(), Linus Walleij, 2020/03/27
- Re: [PATCH v6 1/8] ARM: integrator: impd1: Use GPIO_LOOKUP() helper macro, Linus Walleij, 2020/03/26