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

From: Michael Walle

Date: Wed Nov 25 2026 - 03:14:20 EST


On Tue Nov 24, 2026 at 2:14 PM CET, Bartosz Golaszewski wrote:
> 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.

Agreed, but it should be a separate patch because it was missing
since day one. Not something this patch introduced. I tried to find
out why I did it that way, but couldn't find anyting. Probably
because back then gpiolib did it the same, not sure.

Btw. is it on purpose that sashiko is only answering the patch
author and the list? FWIW I'm usually not subscribed to the lists
and thus I didn't get the feedback.

-michael