Deleted Added
full compact
acpiio.h (170976) acpiio.h (216503)
1/*-
2 * Copyright (c) 1999 Takanori Watanabe <takawata@jp.freebsd.org>
3 * Copyright (c) 1999 Mitsuru IWASAKI <iwasaki@FreeBSD.org>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 10 unchanged lines hidden (view full) ---

19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
1/*-
2 * Copyright (c) 1999 Takanori Watanabe <takawata@jp.freebsd.org>
3 * Copyright (c) 1999 Mitsuru IWASAKI <iwasaki@FreeBSD.org>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 10 unchanged lines hidden (view full) ---

19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * $FreeBSD: head/sys/dev/acpica/acpiio.h 170976 2007-06-21 22:50:37Z njl $
27 * $FreeBSD: head/sys/dev/acpica/acpiio.h 216503 2010-12-17 16:21:30Z avg $
28 */
29
30#ifndef _ACPIIO_H_
31#define _ACPIIO_H_
32
33/*
34 * Core ACPI subsystem ioctls
35 */

--- 33 unchanged lines hidden (view full) ---

69
70struct acpi_bst {
71 uint32_t state; /* Battery State */
72 uint32_t rate; /* Present Rate */
73 uint32_t cap; /* Remaining Capacity */
74 uint32_t volt; /* Present Voltage */
75};
76
28 */
29
30#ifndef _ACPIIO_H_
31#define _ACPIIO_H_
32
33/*
34 * Core ACPI subsystem ioctls
35 */

--- 33 unchanged lines hidden (view full) ---

69
70struct acpi_bst {
71 uint32_t state; /* Battery State */
72 uint32_t rate; /* Present Rate */
73 uint32_t cap; /* Remaining Capacity */
74 uint32_t volt; /* Present Voltage */
75};
76
77/*
78 * Note that the following definitions represent status bits for internal
79 * driver state. The first three of them (charging, discharging and critical)
80 * conveninetly conform to ACPI specification of status returned by _BST
81 * method. Other definitions (not present, etc) are synthetic.
82 * Also note that according to the specification the charging and discharging
83 * status bits must not be set at the same time.
84 */
77#define ACPI_BATT_STAT_DISCHARG 0x0001
78#define ACPI_BATT_STAT_CHARGING 0x0002
79#define ACPI_BATT_STAT_CRITICAL 0x0004
85#define ACPI_BATT_STAT_DISCHARG 0x0001
86#define ACPI_BATT_STAT_CHARGING 0x0002
87#define ACPI_BATT_STAT_CRITICAL 0x0004
80#define ACPI_BATT_STAT_NOT_PRESENT 0x0007
81#define ACPI_BATT_STAT_MAX 0x0007
88#define ACPI_BATT_STAT_INVALID \
89 (ACPI_BATT_STAT_DISCHARG | ACPI_BATT_STAT_CHARGING)
90#define ACPI_BATT_STAT_BST_MASK \
91 (ACPI_BATT_STAT_INVALID | ACPI_BATT_STAT_CRITICAL)
92#define ACPI_BATT_STAT_NOT_PRESENT ACPI_BATT_STAT_BST_MASK
82
83union acpi_battery_ioctl_arg {
84 int unit; /* Device unit or ACPI_BATTERY_ALL_UNITS. */
85
86 struct acpi_battinfo battinfo;
87
88 struct acpi_bif bif;
89 struct acpi_bst bst;

--- 25 unchanged lines hidden ---
93
94union acpi_battery_ioctl_arg {
95 int unit; /* Device unit or ACPI_BATTERY_ALL_UNITS. */
96
97 struct acpi_battinfo battinfo;
98
99 struct acpi_bif bif;
100 struct acpi_bst bst;

--- 25 unchanged lines hidden ---