/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright 2015 Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
*/
#ifndef _ACPI_DRV_H
#define _ACPI_DRV_H
#ifdef __cplusplus
extern "C" {
#endif
enum acpi_drv_ioctl {
};
typedef struct batt_bay {
/* Total number of bays in the system */
int bay_number;
/*
* Bitmap for each bay and its battery.
* battery_map bit i:
* 1 -- battery inserted to bay i
* 0 -- bay i empty
*/
} batt_bay_t;
typedef struct acpi_bif {
/*
* 0x00000000 - 0x7fffffff
* 0xffffffff - Unknown design capacity in [mWh] or [mAh]
*/
/*
* 0x00000000 - 0x7fffffff
* 0xffffffff - Unknown last full charge capacity in [mWh] or [mAh]
*/
/*
* 0x00000000 - 0x7fffffff
* 0xffffffff - Unknown design voltage in [mV]
*/
/*
* 0x00000000 - 0x7fffffff in [mWh] or [mAh]
*/
/*
* 0x00000000 - 0x7fffffff in [mWh] or [mAh]
*/
} acpi_bif_t;
typedef struct acpi_bst {
/*
* 0x00000000 - 0x7fffffff in [mW] or [mA]
* 0xffffffff - Unknown rate
*/
/*
* 0x00000000 - 0x7fffffff in [mWh] or [mAh]
* 0xffffffff - Unknown capacity
*/
/*
* 0x00000000 - 0x7fffffff in [mV]
* 0xffffffff - Unknown voltage
*/
} acpi_bst_t;
/* Battery warnning levels in percentage */
typedef struct acpi_drv_warn {
typedef struct acpi_drv_power_kstat_s {
typedef struct acpi_drv_warn_kstat_s {
/* BIF kstat */
typedef struct acpi_drv_bif_kstat_s {
/* BST kstat */
typedef struct acpi_drv_bst_kstat_s {
/* acpi device types */
enum acpi_drv_type {
};
struct acpi_drv_output_info {
};
struct acpi_drv_output_status {
int state;
int num_levels;
int cur_level;
int cur_level_index;
};
#define ACPI_DRV_OK 0
#ifdef _KERNEL
(idx))
(idx))
(idx))
| (idx))
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _ACPI_DRV_H */