 |
Index for Section 9 |
|
 |
Alphabetical listing for C |
|
 |
Bottom of page |
|
configure_driver(9r)
NAME
configure_driver - General: Configures a device driver that is in the
dynamic state
SYNOPSIS
int configure_driver(
char *driver_name,
int bus_num,
char *bus_name,
struct driver *driver_struct );
ARGUMENTS
driver_name
Specifies the name of the device driver. This name is a string that
matches the string you specified for the entry_name item in the
/etc/sysconfigtab database. Typically, third-party driver writers
specify the driver name (followed by a colon) in the sysconfigtab file
fragment, which gets appended to the /etc/sysconfigtab database during
the driver product installation.
bus_num
Specifies the number of the bus to connect to in the list of controller
structures. You should pass the constant DRIVER_WILDNUM to allow the
bus configuration code to actually assign the bus number.
bus_name
Specifies the name of the bus to connect to in the list of bus
structures. You should pass the constant DRIVER_WILDNAME to allow the
bus configuration code to actually assign the bus name.
driver_struct
Specifies the address of the driver structure associated with the
controlling device driver. The driver structure name is typically based
on the device driver name. For example, the driver structure for the
/dev/none driver is nonedriver. The device driver writer initializes
this driver structure, usually in the Declarations Section of the
device driver.
DESCRIPTION
The configure_driver interface configures a device driver into the system
(hardware) configuration tree. The configuration tasks consist of
incorporating the bus, controller, and device structures associated with
the specific device driver into the system (hardware) configuration tree.
RETURN VALUES
The configure_driver interface can return the following value defined in
/usr/sys/include/io/common/devdriver_loadable.h:
LDBL_ENOBUS
The bus you specified in the bus_name argument does not exist in
the system (hardware) configuration tree.
The configure_driver interface can also return one of the following status
values defined in /usr/sys/include/sys/errno.h. This value is actually
returned from the bus-specific controller_configure interface:
ESUCCESS
The bus-specific controller_configure interface successfully
completed the autoconfiguration request.
ENODEV The driver's probe interface did not successfully complete.
EXAMPLES
See Writing Device Drivers: Tutorial for a code example of the
configure_driver interface.
SEE ALSO
Kernel Interfaces: unconfigure_driver(9r)
Date Structures: driver(9s)
 |
Index for Section 9 |
|
 |
Alphabetical listing for C |
|
 |
Top of page |
|