lkml.org 
[lkml]   [2016]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 3/3] drivers core: allow id match override when manually binding driver
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.

Repeating yourself over and over again is not going to help here, it's
just going to make people more annoyed. Please stop this.

> >> So it would have to be implemented on SPI. How? On PCI new_id is a PCI
> >> id. What is it on SPI? ACPI PnP id? DT compatible? How do you tell?

> > Those sound like sensible ideas.

> There is slight problem that SPI bus can have *both* ACPI PnP IDs and
> DT compatibles. so you cannot tell which one it is. Even if you put in
> all the infra to tell if the particular bus uses one or the other it

The formats of compatible strings and ACPI IDs are both well enough
defined and incompatible with each other, distinguishing them is not
hard.

> still does not solve the basic problem that SPI is generic
> communication bus and users want to just send and receive data on the
> bus.

If there is no hardware connected we can massively optimize this by just
not doing anything to the bus in software.

> > Identifiers are just a useful way of describing what the hardware is,
> > the fact that some of them can be read back from hardware isn't terribly
> > important here.

> Maybe the fact that some buses are useful for just sending random data
> that the kernel does not understand and has no business meddling with
> is important then.

This is not helpful. None of the discussion here is about what is done
with devices once drivers are bound, it's all about how we bind drivers.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2016-06-28 18:21    [W:0.111 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site