From: "Danilo Krummrich" <dakr@kernel.org>
To: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>
Cc: "Linus Walleij" <linusw@kernel.org>,
"Kim Phillips" <kim.phillips@freescale.com>,
"jiale yao" <19888972804@163.com>,
"Mark Brown" <broonie@kernel.org>, <linux-spi@vger.kernel.org>,
"Biju Das" <biju.das.jz@bp.renesas.com>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
<ukleinek@kernel.org>
Subject: Re: [PATCH] pinctrl: mcp23s08: reject devices without match data
Date: Wed, 07 Oct 2026 13:07:49 +0200 [thread overview]
Message-ID: <DLYK485WJPQ8.349OCC3FOJNFL@kernel.org> (raw)
In-Reply-To: <asILHNE0iDP2jVVR@ashevche-desk.local>
On Sun Oct 4, 2026 at 10:15 AM CEST, Andy Shevchenko wrote:
> +Cc: Danilo
> (as you were involved in cleaning this up in the past and being co-maintainer
> of driver core)
>
> On Sun, Oct 04, 2026 at 01:06:07AM +0200, Linus Walleij wrote:
>> On Fri, Oct 2, 2026 at 12:19 PM Andy Shevchenko
>> <andriy.shevchenko@linux.intel.com> wrote:
>> > On Fri, Oct 02, 2026 at 11:52:41AM +0200, Linus Walleij wrote:
>> > > On Fri, Oct 2, 2026 at 8:59 AM Andy Shevchenko
>
> ...
>
>> > > The entire name of the thing feels like debugfs-footgun
>> > > territory for example.
>> >
>> > Yeah, I can't find neither a thing on LWN.net nor in the in-tree documentation.
>> > The only useful piece of information is (in kernel-doc of struct bus_type):
>> >
>> > driver_override
>> > Set to true if this bus supports the driver_override mechanism, which
>> > allows userspace to force a specific driver to bind to a device via a sysfs
>> > attribute.
>>
>> This whole thing is weird, but OK.
>>
>> Since we have a ton of drivers depending on match data we either
>> have to patch them all to bail out if match data is NULL (like this
>> patch does) or, which is equivalent, opt out of driver_override
>> that much is certain.
>>
>> 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.
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@baylibre.com/
prev parent reply other threads:[~2026-10-07 11:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 13:38 Jiale Yao
2026-09-26 10:07 ` Biju Das
2026-09-26 10:23 ` jiale yao
2026-09-26 10:28 ` jiale yao
2026-09-28 6:03 ` Biju Das
2026-09-28 7:24 ` jiale yao
2026-09-28 7:32 ` Biju Das
2026-09-28 7:54 ` jiale yao
2026-09-28 8:05 ` Biju Das
2026-10-01 20:07 ` Linus Walleij
2026-10-02 6:58 ` Andy Shevchenko
2026-10-02 9:52 ` Linus Walleij
2026-10-02 10:18 ` Andy Shevchenko
2026-10-03 23:06 ` Linus Walleij
2026-10-04 8:15 ` Andy Shevchenko
2026-10-07 11:07 ` Danilo Krummrich [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DLYK485WJPQ8.349OCC3FOJNFL@kernel.org \
--to=dakr@kernel.org \
--cc=19888972804@163.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=broonie@kernel.org \
--cc=kim.phillips@freescale.com \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=ukleinek@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®