lkml.org 
[lkml]   [2021]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] spidev: Make probe to fail early if a spidev compatible is used
On Wed, Nov 10, 2021 at 08:42:47AM +0100, Uwe Kleine-König wrote:

> Up to 6840615f85f6 the choices you had to use the spidev driver were
> (assuing a dt machine):

> a) Use compatible = "spidev" and ignore the warning
> b) Use compatible = $chipname and add $chipname to the list of
> supported devices for the spidev driver. (e.g. "rohm,dh2228fv")
> c) Use compatible = $chipname and force binding the spidev driver using

> echo spidev > /sys/bus/spi/devices/spiX.Y/driver_override
> echo spiX.Y > /sys/bus/spi/drivers/spidev/bind

> Commit 6840615f85f6 changed that in situation a) you had to switch to c)
> (well, or b) adding "spidev" to the spi id list).

> With the change introduced by this patch, you make it impossible to bind
> the spidev driver to such a device (without kernel source changes) even
> using approach c). I wonder if this is too harsh given that changing the
> dtb is difficult on some machines.

Following up from discussion on IRC: it's not clear to me how option c
is affected? The change only causes an error if of_device_is_compatible()
is true and driver_override works with spi_device_id not compatibles (I
didn't actually test, in the middle of some other stuff right now).
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2021-11-18 19:22    [W:0.068 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site