aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/driver-model
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.com>2016-02-15 03:25:06 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2016-02-16 11:28:51 -0500
commit656b8035b0eebcac0172b24ca04e448c70dd047f (patch)
tree9310d64d29e0130957ef33362d34c46392f6b42f /Documentation/driver-model
parent17f29d36e4732b91ae299a163d34ed1954500f42 (diff)
ARM: 8524/1: driver cohandle -EPROBE_DEFER from bus_type.match()
Allow implementations of the match() callback in struct bus_type to return errors and if it's -EPROBE_DEFER then queue the device for deferred probing. This is useful to buses such as AMBA in which devices are registered before their matching information can be retrieved from the HW (typically because a clock driver hasn't probed yet). [changed if-else code structure, adjusted documentation to match the code, extended comments] Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'Documentation/driver-model')
-rw-r--r--Documentation/driver-model/porting.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/Documentation/driver-model/porting.txt b/Documentation/driver-model/porting.txt
index 92d86f7271b4..453053f1661f 100644
--- a/Documentation/driver-model/porting.txt
+++ b/Documentation/driver-model/porting.txt
@@ -340,8 +340,10 @@ comparison:
340 340
341 int (*match)(struct device * dev, struct device_driver * drv); 341 int (*match)(struct device * dev, struct device_driver * drv);
342 342
343match should return '1' if the driver supports the device, and '0' 343match should return positive value if the driver supports the device,
344otherwise. 344and zero otherwise. It may also return error code (for example
345-EPROBE_DEFER) if determining that given driver supports the device is
346not possible.
345 347
346When a device is registered, the bus's list of drivers is iterated 348When a device is registered, the bus's list of drivers is iterated
347over. bus->match() is called for each one until a match is found. 349over. bus->match() is called for each one until a match is found.