Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

driver-core: improve driver binding documentation

The driver binding documentation (still) mentions that "When a driver is
attached to a device, the device is inserted into the driver's list of
devices.".

While it is true that the driver-core keeps track of all the devices
that are attached to a driver, this is purely for internal purposes
(i.e. it is an implementation detail) and has no relevance for user
facing documentation.

In fact, it is even misleading, since it could be read as if it were
valid for driver implementations to keep track of all the devices bound
to it.

Instead, drivers operate on a per-device basis, with a separate
per-device instance created when the driver is bound to a device.

Hence, remove the mention of a driver's list of devices and instead add
some documentation of the relationship between drivers and devices.

Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260115215718.6405-1-dakr@kernel.org>

authored by

Danilo Krummrich and committed by
Jonathan Corbet
07265c32 89136329

+6 -3
+6 -3
Documentation/driver-api/driver-model/binding.rst
··· 53 53 Driver 54 54 ~~~~~~ 55 55 56 - When a driver is attached to a device, the device is inserted into the 57 - driver's list of devices. 58 - 56 + When a driver is attached to a device, the driver's probe() function is 57 + called. Within probe(), the driver initializes the device and allocates 58 + and initializes per-device data structures. This per-device state is 59 + associated with the device object for as long as the driver remains bound 60 + to it. Conceptually, this per-device data together with the binding to 61 + the device can be thought of as an instance of the driver. 59 62 60 63 sysfs 61 64 ~~~~~