1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 /* 22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 */ 25 26 #ifndef _SYS_SYSEVENT_PWRCTL_H 27 #define _SYS_SYSEVENT_PWRCTL_H 28 29 #ifdef __cplusplus 30 extern "C" { 31 #endif 32 33 /* 34 * Event type schema for EC_PWRCTL: 35 * Event Class - EC_PWRCTL 36 * Event Sub-Class - ESC_PWRCTL_ADD | 37 * ESC_PWRCTL_REMOVE | 38 * ESC_PWRCTL_WARN | 39 * ESC_PWRCTL_LOW | 40 * ESC_PWRCTL_STATE_CHANGE | 41 * ESC_PWRCTL_POWER_BUTTON | 42 * ESC_PWRCTL_BRIGHTNESS_UP | 43 * ESC_PWRCTL_BRIGHTNESS_DOWN 44 * Event Publisher - SUNW:kern:[environmental monitor name] 45 * Attribute Name - PWRCTL_VERSION 46 * Attribute Type - SE_DATA_TYPE_UINT32 47 * Attribute Value - [version of the schema] 48 * Attribute Name - PWRCTL_DEV_HID 49 * Attribute Type - SE_DATA_TYPE_STRING 50 * Attribute Value - [Label identifying the ACPI hardware] 51 * Attribute Name - PWRCTL_DEV_UID 52 * Attribute Type - SE_DATA_TYPE_STRING 53 * Attribute Value - [Both the _HID and _UID values can be of either type 54 * STRING or NUMBER in the ACPI tables. In order to 55 * provide a consistent data type in the external 56 * interface, these values are always returned as NULL 57 * terminated strings, regardless of the original data 58 * type in the source ACPI table.] 59 * Attribute Name - PWRCTL_DEV_INDEX 60 * Attribute Type - SE_DATA_TYPE_UINT32 61 * Attribute Value - [Device index] 62 * 63 * ESC_PWRCTL_WARN, ESC_PWRCTL_LOW only field: 64 * Attribute Name - PWRCTL_CHARGE_LEVEL 65 * Attribute Type - SE_DATA_TYPE_UINT32 66 * Attribute Value - [charge level] 67 */ 68 69 #define PWRCTL_VERSION "pwrctl_version" /* Version of the schema */ 70 #define PWRCTL_DEV_PHYS_PATH "pwrctl_dev_phys_path" /* Physical Path */ 71 #define PWRCTL_DEV_HID "pwrctl_dev_hid" /* ACPI device Hardware Id */ 72 #define PWRCTL_DEV_UID "pwrctl_dev_uid" /* ACPI device Unique Id */ 73 #define PWRCTL_DEV_INDEX "pwrctl_dev_index" /* Device index */ 74 #define PWRCTL_CHARGE_LEVEL "pwrctl_charge_level" /* Event related state */ 75 #define PWRCTL_BRIGHTNESS_LEVEL "pwrctl_brightness_level" 76 77 #ifdef __cplusplus 78 } 79 #endif 80 81 #endif /* _SYS_SYSEVENT_PWRCTL_H */ 82