Re: [PATCH v3 5/7] pinctrl: add NXP MC33978/MC34978 pinctrl driver

From: Linus Walleij

Date: Tue Mar 10 2026 - 05:24:40 EST


Hi Oleksij,

I'm officially impressed!

On Mon, Mar 9, 2026 at 2:49 PM Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx> wrote:

> From: David Jander <david@xxxxxxxxxxx>
>
> Add pin control and GPIO driver for the NXP MC33978/MC34978 Multiple
> Switch Detection Interface (MSDI) devices.
>
> This driver exposes the 22 mechanical switch detection inputs (14
> Switch-to-Ground, 8 Programmable) as standard GPIOs.
>
> Key features implemented:
> - GPIO read/write: Translates physical switch states (open/closed)
> to logical GPIO levels based on the configured switch topology
> (Switch-to-Ground vs. Switch-to-Battery).
> - Emulated Output: Allows setting pins "high" or "low" by manipulating
> the tri-state registers and hardware pull topologies.
> - Interrupt routing: Proxies GPIO interrupt requests to the irq_domain
> managed by the parent MFD core driver.
>
> Signed-off-by: David Jander <david@xxxxxxxxxxx>
> Co-developed-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
> Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>

v3 solves all issues I pointed out and makes excellent use of
the hierarchical IRQ facility, cut down the number of lines
of code and just overall elegant.

Reviewed-by: Linus Walleij <linusw@xxxxxxxxxx>

Yours,
Linus Walleij