pm_create_components(9F)
NAME
pm_create_components, pm_destroy_components − create or destroy power-manageable components
SYNOPSIS
#include <sys/ddi.h>
#include <sys/sunddi.h>
int pm_create_components(dev_info_t ∗dip, int components);
void pm_destroy_components(dev_info_t ∗dip);
INTERFACE LEVEL
Solaris DDI specific (Solaris DDI).
ARGUMENTS
pm_create_components()
dip Pointer to the device’s dev_info structure.
components The number of components to create.
pm_destroy_components()
dip Pointer to the device’s dev_info structure.
DESCRIPTION
The pm_create_components() function creates power-manageable components for a device. It should be called from the driver’s attach(9E) entry point if the device has power-manageable components.
The correspondence of components to parts of the physical device controlled by the driver are the responsibility of the driver. Component 0 must represent the entire device. Components 1-n are driver-defined.
The pm_destroy_components() function removes all components from the device. It should be called from the driver’s detach(9E) entry point.
RETURN VALUES
The pm_create_components() function returns:
DDI_SUCCESS
Components are successfully created.
DDI_FAILURE
The device already has components.
CONTEXT
These functions may be called from user or kernel context.
SEE ALSO
power.conf(4), pm(7D), attach(9E), detach(9E), pm(9E), pm_busy_component(9F), pm_idle_component(9F)
Writing Device Drivers
SunOS 5.6 — Last change: 28 Oct 1996