Re: [PATCH] pinctrl: mcp23s08: reject devices without match data

From: Linus Walleij

Date: Thu Oct 08 2026 - 09:15:51 EST


On Wed, Oct 7, 2026 at 1:07 PM Danilo Krummrich <dakr@xxxxxxxxxx> wrote:

> >> What I don't get is what this is intended for. What is the use case?
> >> The commit says this is for VFIO. Shouldn't it be opt-in and turned
> >> on only for VFIO then?
>
> I think VFIO could use a different (less generic) mechanism that is more
> integrated with the corresponding bus to e.g. allow userspace to decide to get a
> PF bound to a VFIO driver for passthrough.
>
> The existing driver_override is convinient for this case, but ideally we want to
> express that a driver can only be bound to the corresponding host and VFIO
> drivers.
>
> I think the situation for SPI is pretty similar.
>
> Unfortunately, it is a uAPI already, so we can't really get rid of it.

No, but we *could* make the whole thing a Kconfig option and have it
default n, and selected only for VFIO.

I have a strong urge to cook a patch like that...

> But I agree that we should be more defensive about this and make it a driver
> opt-in. Uwe already prepared a patch for this [1].
>
> [1] https://lore.kernel.org/driver-core/0f7446324f6a0c8f0153d6532d92a6eeecd6a308.1790612298.git.u.kleine-koenig@xxxxxxxxxxxx/

I like what I see.

Yours,
Linus Walleij