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 #pragma ident "%Z%%M% %I% %E% SMI" 30 31 #ifdef __cplusplus 32 extern "C" { 33 #endif 34 35 /* 36 * Event type schema for EC_PWRCTL: 37 * Event Class - EC_PWRCTL 38 * Event Sub-Class - ESC_PWRCTL_ADD | 39 * ESC_PWRCTL_REMOVE | 40 * ESC_PWRCTL_WARN | 41 * ESC_PWRCTL_LOW | 42 * ESC_PWRCTL_STATE_CHANGE | 43 * ESC_PWRCTL_POWER_BUTTON | 44 * ESC_PWRCTL_BRIGHTNESS_UP | 45 * ESC_PWRCTL_BRIGHTNESS_DOWN 46 * Event Publisher - SUNW:kern:[environmental monitor name] 47 * Attribute Name - PWRCTL_VERSION 48 * Attribute Type - SE_DATA_TYPE_UINT32 49 * Attribute Value - [version of the schema] 50 * Attribute Name - PWRCTL_DEV_HID 51 * Attribute Type - SE_DATA_TYPE_STRING 52 * Attribute Value - [Label identifying the ACPI hardware] 53 * Attribute Name - PWRCTL_DEV_UID 54 * Attribute Type - SE_DATA_TYPE_STRING 55 * Attribute Value - [Both the _HID and _UID values can be of either type 56 * STRING or NUMBER in the ACPI tables. In order to 57 * provide a consistent data type in the external 58 * interface, these values are always returned as NULL 59 * terminated strings, regardless of the original data 60 * type in the source ACPI table.] 61 * Attribute Name - PWRCTL_DEV_INDEX 62 * Attribute Type - SE_DATA_TYPE_UINT32 63 * Attribute Value - [Device index] 64 * 65 * ESC_PWRCTL_WARN, ESC_PWRCTL_LOW only field: 66 * Attribute Name - PWRCTL_CHARGE_LEVEL 67 * Attribute Type - SE_DATA_TYPE_UINT32 68 * Attribute Value - [charge level] 69 */ 70 71 #define PWRCTL_VERSION "pwrctl_version" /* Version of the schema */ 72 #define PWRCTL_DEV_PHYS_PATH "pwrctl_dev_phys_path" /* Physical Path */ 73 #define PWRCTL_DEV_HID "pwrctl_dev_hid" /* ACPI device Hardware Id */ 74 #define PWRCTL_DEV_UID "pwrctl_dev_uid" /* ACPI device Unique Id */ 75 #define PWRCTL_DEV_INDEX "pwrctl_dev_index" /* Device index */ 76 #define PWRCTL_CHARGE_LEVEL "pwrctl_charge_level" /* Event related state */ 77 #define PWRCTL_BRIGHTNESS_LEVEL "pwrctl_brightness_level" 78 79 #ifdef __cplusplus 80 } 81 #endif 82 83 #endif /* _SYS_SYSEVENT_PWRCTL_H */ 84