Contained Within
Find More Documentation
Featured Support Resources
| Download this book in PDF
NAME
- pmc - Platform Management Chip driver
SYNOPSIS
-
#include <sys/pmcio.h>
-
int ioctl(int fildes, int command, int arg);
AVAILABILITY
-
SUNWpmc
PLATFORM
-
SPARCstation Voyager
DESCRIPTION
- The Platform Management Chip driver provides a number of miscellaneous platform specific functions. Principally these are to provide power control for devices which cannot manage their own power control (see ddi_power (9F) ) and to 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 may be accessed using /dev/pmc. The system interface (to power manage devices) is provided by registering its power function (using the "platform-pm" property of the root node).
-
fildes is an open file descriptor that refers to the pmc driver. command determines the control function to be performed as described below. arg is not used and may be any value.
COMMAND FUNCTIONS
- These functions fall into three categories: connection status, power control and miscellaneous. Connection status can be used to find out whether the following devices are plugged in: keyboard, ethernet and ISDN.
- The power control function controls the removal of the platform power. Miscellaneous functions enable the reading of the digital to analog converter.
-
PMC_GET_KBD:
- This command returns the connection status of the keyboard. When the keyboard is connected it will return PMC_KB_STAT, and zero when it is not connected.
-
PMC_GET_ENET:
- This command returns the connection status of the ethernet. When the ethernet is connected it will return PMC_ENET_STAT, and zero when it is not connected.
-
PMC_GET_ISDN:
- 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, PMC_ISDN_ST1 for TE.
-
PMC_GET_A2D:
- This command returns the result of an eight bit analog to digital conversion. The meaning of the reading is platform specific.
-
PMC_POWER_OFF:
- This command is only available 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 may 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.
ERRORS
-
-
EPERM
- Must be privileged user to use PMC_POWER_OFF.
SEE ALSO
-
ddi_power(9F), intro(2), ioctl(2), open(2), pm (7),poll(2)
|
|