Index Index for
Section 9
Index Alphabetical
listing for C
Bottom of page Bottom of
page

create_controller_struct(9r)

NAME

create_controller_struct - General: Creates a controller structure for the system (hardware) configuration tree

SYNOPSIS

int create_controller_struct( struct controller_config *ctlr_cnfg );

ARGUMENTS

ctlr_cnfg Specifies a pointer to the controller_config structure associated with a specific controller. You set the members of the controller_config structure to appropriate values and then pass the address of the filled-in structure to the create_controller_struct interface.

DESCRIPTION

The create_controller_struct interface creates a controller structure for each instance of a controller that the device driver supports. The interface integrates the controller structure for a specific controller into the list of controller structures that reside in the system configuration tree.

NOTES

Typically, you supply the information needed by the create_controller_struct interface by passing to it the address of the filled-in controller_config structure. However, if any of this information needs to be configurable (that is, you want to give a system manager the ability to dynamically change this information), you must: · Define attributes for the information contained in the controller_config structure in the sysconfigtab file fragment · Define these attributes in the driver's cfg_subsys_attr_t data structure · Check these attribute definitions in the device driver's configure interface and appropriately modify the call to create_controller_struct

RETURN VALUES

Upon successful completion, create_controller_struct returns ESUCCESS. On failure, it returns EINVAL.

EXAMPLES

See Writing Device Drivers: Tutorial for a code example of the create_controller_struct interface.

SEE ALSO

Kernel Interfaces: create_device_struct(9r) Data Structures: controller_config(9s)

Index Index for
Section 9
Index Alphabetical
listing for C
Top of page Top of
page