'\" te .\" Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. .TH pm_busy_component 9F "15 Jul 2011" "SunOS 5.11" "Kernel Functions for Drivers" .SH NAME pm_busy_component, pm_idle_component \- control device component availability for Power Management .SH SYNOPSIS .LP .nf #include #include \fBint\fR \fBpm_busy_component\fR(\fBdev_info_t\fR \fI*dip\fR, \fBint\fR \fIcomponent\fR); .fi .LP .nf \fBint\fR \fBpm_idle_component\fR(\fBdev_info_t\fR \fI*dip\fR, \fBint\fR \fIcomponent\fR); .fi .SH INTERFACE LEVEL .sp .LP Solaris DDI specific (Solaris DDI) .SH PARAMETERS .sp .ne 2 .mk .na \fB\fIdip\fR\fR .ad .RS 13n .rt Pointer to the device's \fBdev_info\fR structure. .RE .sp .ne 2 .mk .na \fB\fIcomponent\fR\fR .ad .RS 13n .rt The number of the component to be power-managed. .RE .SH DESCRIPTION .sp .LP The \fBpm_busy_component()\fR function sets \fIcomponent\fR of \fIdip\fR to be busy. Calls to \fBpm_busy_component()\fR are stacked, requiring a corresponding number of calls to \fBpm_idle_component()\fR to make the component idle again. When a device is busy it will not be power-managed by the system. .sp .LP The \fBpm_idle_component()\fR function marks \fIcomponent\fR idle, recording the time that \fIcomponent\fR went idle. This function must be called once for each call to \fBpm_busy_component()\fR. A component which is idle is available to be power-managed by the system. The \fBpm_idle_component()\fR function has no effect if the component is already idle, except to update the system's notion of when the device went idle. .sp .LP If these functions are called as a result of entry into the driver's \fBattach\fR(9E), \fBdetach\fR(9E) or \fBpower\fR(9E) entry point, these functions must be called from the same thread which entered \fBattach\fR(9E), \fBdetach\fR(9E) or \fBpower\fR(9E). .SH RETURN VALUES .sp .LP The \fBpm_busy_component()\fR and \fBpm_idle_component()\fR functions return: .sp .ne 2 .mk .na \fB\fBDDI_SUCCESS\fR\fR .ad .RS 15n .rt Successfully set the indicated component busy or idle. .RE .sp .ne 2 .mk .na \fB\fBDDI_FAILURE\fR\fR .ad .RS 15n .rt Invalid component number \fIcomponent\fR or the device has no components. .RE .SH CONTEXT .sp .LP These functions can be called from user or kernel context. These functions may also be called from interrupt context, providing they are not the first Power Management function called by the driver. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityCommitted .TE .SH SEE ALSO .sp .LP \fBpm\fR(7D), \fBattach\fR(9E), \fBdetach\fR(9E), \fBpower\fR(9E), \fBpm_raise_power\fR(9F), \fBpm\fR(9P), \fBpm-components\fR(9P) .sp .LP \fIWriting Device Drivers for Oracle Solaris 11.2\fR