Re: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver
From: Michal Suchanek
Date: Tue Jun 28 2016 - 12:25:48 EST
On 28 June 2016 at 17:51, Mark Brown <broonie@xxxxxxxxxx> wrote:
> On Tue, Jun 28, 2016 at 02:40:41PM +0200, Michal Suchanek wrote:
>
>> There is no hardware other than pin header. You are preparing a
>> factory image for a devboard with a pin header that can be used for
>> connecting SPI devices. Some devices have fine kernel drivers and for
>> these you prepare fine overlays. Some devices have fine userspace
>> drivers and you do NOT want kernel driver for them even if it is
>> available later on. What compatible do you put in the factory image so
>> that the user can just connect an external device and run a
>> corresponding application to use it?
>
> The answer is still the same here: if you've got a plug in module you
> need to load an overlay for that plug in module (see Pantelis' work for
> mechanisms to do that). That overlay should describe the hardware in
> the standard DT fashion. If the current way to support a given bit of
> hardware is with a userspace driver then you should add the compatible
> string for that hardware to spidev or join up the dots to allow that to
> be done at runtime and then do it at runtime.
No, no, no!
This is NOT about loading an overlay. This is about talking on the bus
without loading an overlay.
And this is NOT about adding a compatible for the device. Adding
compatibles for 10 different devices just to use an userspace driver
for them is ridiculous and nobody will do that. If that really turns
out necessary anyone will add the compatible for the fist device so
used and use it for any other device. Which gets us back to generating
random compatible. Which is even better than registering a compatible
that makes sense because then it cannot happen that somebody writes a
kernel driver for your device and you have to unbind it first.
>
> Repeating yourself over and over again is not going to help here, it's
> just going to make people more annoyed. Please stop this.
Then please add something constructive to the debate rather than
repeating that users have to add compatible for devices used with
userspace driver. That's ridiculous from usability point of view and
so will never happen. At best workarounds for kernel obtuseness will
be used.
Thanks
Michal