NAME | SYNOPSIS | DESCRIPTION | IOCTLS | ERRORS | FILES | ATTRIBUTES | SEE ALSO
SUNW,pmc@slot,offset:pmc
The Platform Management Chip driver provides a number of miscellaneous platform-specific functions. These functions provide power control for devices that cannot manage their own power control and provide information about the connection status of the machine. Not all functions are supported on all platforms.
The user interface is provided through ioctl(2) commands. The pmc driver can be accessed using /dev/pmc. The pmc device is accessed by the system using the platform-pm property of the root node.
These ioctl requests fall into three categories: connection status, power control, and miscellaneous. The connection status can be used to determine whether the keyboard, ethernet, and ISDN devices are plugged in. The power control function controls the removal of the platform power. Miscellaneous functions enable reading of the digital to analog converter.
The following ioctl(2) requests require only an open file descriptor for the pmc device and an ioctl command. The arg argument is not used. Refer to ioctl(2) for more information. The following pmc ioctl commands are defined in <sys/pmcio.h>.
This command returns the connection status of the keyboard. If the keyboard is connected PMC_KBD_STAT is returned; otherwise, 0 is returned.
This command returns the connection status of the ethernet. If the ethernet is connected PMC_ENET_STAT is returned; otherwise, 0 is returned.
This command returns the connection status of the ISDN channels. The return value is a bit map of the connected channels: PMC_ISDN_ST0 for NT and PMC_ISDN_ST1 for TE.
This command returns the result of an 8-bit analog-to-digital conversion. The meaning of the returned data is platform-specific.
This command is available only to the super-user. It turns off all power to the system. Note that critical data may be lost if proper preparation prior to power removal is not performed.
The poll(2) interface is supported. It can be used to poll for connection status changes. A process wishing to detect such connection changes should use the POLLIN event flag. When any connection status changes, the poll(2) mechanism will be notified. It is up to the user to verify whether the connection status change is of interest.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Architecture | SUN4m, SPARCstation Voyager |
NAME | SYNOPSIS | DESCRIPTION | IOCTLS | ERRORS | FILES | ATTRIBUTES | SEE ALSO