17b840e52Sphitran /* 27b840e52Sphitran * CDDL HEADER START 37b840e52Sphitran * 47b840e52Sphitran * The contents of this file are subject to the terms of the 57b840e52Sphitran * Common Development and Distribution License (the "License"). 67b840e52Sphitran * You may not use this file except in compliance with the License. 77b840e52Sphitran * 87b840e52Sphitran * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97b840e52Sphitran * or http://www.opensolaris.org/os/licensing. 107b840e52Sphitran * See the License for the specific language governing permissions 117b840e52Sphitran * and limitations under the License. 127b840e52Sphitran * 137b840e52Sphitran * When distributing Covered Code, include this CDDL HEADER in each 147b840e52Sphitran * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157b840e52Sphitran * If applicable, add the following below this CDDL HEADER, with the 167b840e52Sphitran * fields enclosed by brackets "[]" replaced with your own identifying 177b840e52Sphitran * information: Portions Copyright [yyyy] [name of copyright owner] 187b840e52Sphitran * 197b840e52Sphitran * CDDL HEADER END 207b840e52Sphitran */ 217b840e52Sphitran /* 22*d2ec54f7Sphitran * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 237b840e52Sphitran * Use is subject to license terms. 247b840e52Sphitran */ 257b840e52Sphitran 26*d2ec54f7Sphitran #ifndef _SYS_SYSEVENT_PWRCTL_H 27*d2ec54f7Sphitran #define _SYS_SYSEVENT_PWRCTL_H 287b840e52Sphitran 297b840e52Sphitran #ifdef __cplusplus 307b840e52Sphitran extern "C" { 317b840e52Sphitran #endif 327b840e52Sphitran 337b840e52Sphitran /* 34*d2ec54f7Sphitran * Event type schema for EC_PWRCTL: 35*d2ec54f7Sphitran * Event Class - EC_PWRCTL 36*d2ec54f7Sphitran * Event Sub-Class - ESC_PWRCTL_ADD | 37*d2ec54f7Sphitran * ESC_PWRCTL_REMOVE | 38*d2ec54f7Sphitran * ESC_PWRCTL_WARN | 39*d2ec54f7Sphitran * ESC_PWRCTL_LOW | 40*d2ec54f7Sphitran * ESC_PWRCTL_STATE_CHANGE | 41*d2ec54f7Sphitran * ESC_PWRCTL_POWER_BUTTON | 42*d2ec54f7Sphitran * ESC_PWRCTL_BRIGHTNESS_UP | 43*d2ec54f7Sphitran * ESC_PWRCTL_BRIGHTNESS_DOWN 447b840e52Sphitran * Event Publisher - SUNW:kern:[environmental monitor name] 45*d2ec54f7Sphitran * Attribute Name - PWRCTL_VERSION 467b840e52Sphitran * Attribute Type - SE_DATA_TYPE_UINT32 477b840e52Sphitran * Attribute Value - [version of the schema] 48*d2ec54f7Sphitran * Attribute Name - PWRCTL_DEV_HID 497b840e52Sphitran * Attribute Type - SE_DATA_TYPE_STRING 507b840e52Sphitran * Attribute Value - [Label identifying the ACPI hardware] 51*d2ec54f7Sphitran * Attribute Name - PWRCTL_DEV_UID 527b840e52Sphitran * Attribute Type - SE_DATA_TYPE_STRING 537b840e52Sphitran * Attribute Value - [Both the _HID and _UID values can be of either type 547b840e52Sphitran * STRING or NUMBER in the ACPI tables. In order to 557b840e52Sphitran * provide a consistent data type in the external 567b840e52Sphitran * interface, these values are always returned as NULL 577b840e52Sphitran * terminated strings, regardless of the original data 587b840e52Sphitran * type in the source ACPI table.] 59*d2ec54f7Sphitran * Attribute Name - PWRCTL_DEV_INDEX 607b840e52Sphitran * Attribute Type - SE_DATA_TYPE_UINT32 617b840e52Sphitran * Attribute Value - [Device index] 627b840e52Sphitran * 63*d2ec54f7Sphitran * ESC_PWRCTL_WARN, ESC_PWRCTL_LOW only field: 64*d2ec54f7Sphitran * Attribute Name - PWRCTL_CHARGE_LEVEL 657b840e52Sphitran * Attribute Type - SE_DATA_TYPE_UINT32 667b840e52Sphitran * Attribute Value - [charge level] 677b840e52Sphitran */ 687b840e52Sphitran 69*d2ec54f7Sphitran #define PWRCTL_VERSION "pwrctl_version" /* Version of the schema */ 70*d2ec54f7Sphitran #define PWRCTL_DEV_PHYS_PATH "pwrctl_dev_phys_path" /* Physical Path */ 71*d2ec54f7Sphitran #define PWRCTL_DEV_HID "pwrctl_dev_hid" /* ACPI device Hardware Id */ 72*d2ec54f7Sphitran #define PWRCTL_DEV_UID "pwrctl_dev_uid" /* ACPI device Unique Id */ 73*d2ec54f7Sphitran #define PWRCTL_DEV_INDEX "pwrctl_dev_index" /* Device index */ 74*d2ec54f7Sphitran #define PWRCTL_CHARGE_LEVEL "pwrctl_charge_level" /* Event related state */ 75*d2ec54f7Sphitran #define PWRCTL_BRIGHTNESS_LEVEL "pwrctl_brightness_level" 767b840e52Sphitran 777b840e52Sphitran #ifdef __cplusplus 787b840e52Sphitran } 797b840e52Sphitran #endif 807b840e52Sphitran 81*d2ec54f7Sphitran #endif /* _SYS_SYSEVENT_PWRCTL_H */ 82