Re: [PATCH 0/4] gpio: kempld: Support get/set multiple and interrupts

From: Linus Walleij

Date: Thu Mar 19 2026 - 09:32:12 EST


On Wed, Mar 18, 2026 at 9:20 AM Alban Bedel <alban.bedel@xxxxxxxxxx> wrote:

> As far as I can tell, to use the regmap GPIO/IRQ those would first need
> to support locking the device accross whole operations. Or they would
> need to expose more of their own implementation to allow driver like
> this one to wrap it with their own locking.

Well regmap supports custom regmap_lock() regmap_unlock()
operations...

See drivers/gpio/gpio-104-dio-48e.c for example.
This one used a raw spinlock, but I'm pretty sure you can just
shunt in your hardware mutex there.

Yours,
Linus Walleij