Re: [PATCH v15 02/14] gpio: regmap: add GPIO_REGMAP_QUIRK_SET_AFTER_DIR

From: Bartosz Golaszewski

Date: Tue Nov 24 2026 - 08:14:40 EST


On Wed, Nov 18, 2026 at 03:42:19PM +0800, Long Zhao via B4 Relay wrote:
> From: Long Zhao <longzhao@xxxxxxxxxxxxx>
>
> Some controllers ignore output writes while a line is still an
> input. Add a behaviour flag so the output value is written after
> the direction change. This is a legacy quirk. New hardware must not
> use it.
>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> Reviewed-by: Michael Walle <mwalle@xxxxxxxxxx>
> Reviewed-by: Linus Walleij <linusw@xxxxxxxxxx>
> Signed-off-by: Long Zhao <longzhao@xxxxxxxxxxxxx>
> ---

Hi! Sashiko's comment on the return value of gpio_regmap_set() is valid.
You never know what the underlying regmap actually is, it may not be an
mmio regmap.

Thanks,
Bartosz