Re: [PATCH v2 0/2] gpio: realtek-otto: make the driver work with SWAP_IO_SPACE

From: Rustam Adilov

Date: Sat Oct 10 2026 - 10:18:57 EST


On 2026-10-01 20:14, Linus Walleij wrote:
> On Mon, Sep 28, 2026 at 11:51 AM Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxx> wrote:
>> On Sat, Aug 15, 2026 at 02:44:49PM +0500, Rustam Adilov wrote:
>> > This patch series changes gpio-realtek-otto to be functional around
>> > SWAP_IO_SPACE config.
> (...)
>> Convert the driver to use regmap MMIO and most of the code in this series won't
>> be needed. Also it will give some benefits (like register caching and debugfs
>> monitoring).
>
> Andy is right.
>
> Make an attempt on top of the merged patches to convert this to regmap MMIO
> and see what happens, and if that works consider regmap GPIO as
> well.
>
> Everyone will be happier, because less code.

As far as i remember, i thought of using regmap earlier but got stuck because
the regmap has to not swap in realtek_gpio_update_line_imr() but potentially
swap in other places by bank_read/write.
Maybe i am missing something but i just couldn't figure it out.

Best,
Rustam