Download C - Oracle Documentation

Transcript
1
Binding a Driver to a Device Node
In addition to constructing the device tree, the kernel must also determine the
drivers that will be used to manage the devices.
Binding a driver to a device node refers to the process by which the system
selects a driver to manage a particular device. The driver binding name is the
name that links a driver to a unique device node in the device information tree.
For each device in the device tree, the system chooses a driver from a list of
drivers.
Each device node has a name property associated with it. This property may be
derived either from an external agent such as the PROM during system boot or
from a driver.conf file. In either case, the name property represents the
node name assigned to a device in the device tree.
device node names
(name property)
Figure 1-3
SUNW, CS4231
fdthree
se
Device node names
A device node may also have a compatible property associated with it. The
compatible property (if it exists) contains an ordered list of one or more possible
driver names for the device.
The system uses both the name and the compatible properties to select a driver
for the device. The system first attempts to match the contents of the device
name property to a driver on the system. If this fails, the system checks for the
existence of a compatible property. The compatible property is simply a listing of
possible driver names from which the system can determine the specific driver
binding name for the device.
The SunOS Kernel and Device Tree
11