]> git.baikalelectronics.ru Git - kernel.git/commit
spi: Add driver_override SPI device attribute
authorTrent Piepho <tpiepho@impinj.com>
Thu, 20 Sep 2018 19:18:32 +0000 (19:18 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 10 Oct 2018 12:40:45 +0000 (13:40 +0100)
commitc4039fb8d8db9bd6c6c09ed2ab679dabf7a4f2bd
tree61b932c9effd7539770d341e9f62a9706c2c4f6f
parenteb599a2b423f76a41431b1368a93ff3e48ed6ff8
spi: Add driver_override SPI device attribute

This attribute works the same was as the identically named attribute
for PCI, AMBA, and platform devices.  For reference, see:

commit 169487d3392c ("ARM: 8256/1: driver coamba: add device binding
path 'driver_override'")
commit 84e297234a4b ("driver core: platform: add device binding path
'driver_override'")
commit dbb735495ebe ("PCI: Introduce new device binding path using
pci_dev.driver_override")

If the name of a driver is written to this attribute, then the device
will bind to the named driver and only the named driver.

The device will bind to the driver even if the driver does not list the
device in its id table.  This behavior is different than the driver's
bind attribute, which only allows binding to devices that are listed as
supported by the driver.

It can be used to bind a generic driver, like spidev, to a device.

Signed-off-by: Trent Piepho <tpiepho@impinj.com>
Reviewed-by: Jan Kundrát <jan.kundrat@cesnet.cz>
Tested-by: Jan Kundrát <jan.kundrat@cesnet.cz>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c
include/linux/spi/spi.h