diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-13 13:28:32 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-13 13:28:32 -0700 |
commit | 0b381a286e5d748b1fd80095d3dd52326819742f (patch) | |
tree | d72fca56123520b9c78661137f8a02b6ad26f95b /include/linux/apm_bios.h | |
parent | 034b5eeb6bc783e7f60e11299154556e65699e7a (diff) | |
parent | 5921e6f8809b1616932ca4afd40fe449faa8fd88 (diff) |
Merge tag 'disintegrate-main-20121013' of git://git.infradead.org/users/dhowells/linux-headers
Pull UAPI disintegration for include/linux/{,byteorder/}*.h from David Howells:
"The patches contained herein do the following:
(1) Remove kernel-only stuff in linux/ppp-comp.h from the UAPI. I checked
this with Paul Mackerras before I created the patch and he suggested some
extra bits to unexport.
(2) Remove linux/blk_types.h entirely from the UAPI as none of it is userspace
applicable, and remove from the UAPI that part of linux/fs.h that was the
reason for linux/blk_types.h being exported in the first place. I
discussed this with Jens Axboe before creating the patch.
(3) The big patch of the series to disintegrate include/linux/*.h as a unit.
This could be split up, though there would be collisions in moving stuff
between the two Kbuild files when the parts are merged as that file is
sorted alphabetically rather than being grouped by subsystem.
Of this set of headers, 17 files have changed in the UAPI exported region
since the 4th and only 8 since the 9th so there isn't much change in this
area - as one might expect.
It should be pretty obvious and straightforward if it does come to fixing
up: stuff in __KERNEL__ guards stays where it is and stuff outside moves
to the same file in the include/uapi/linux/ directory.
If a new file appears then things get a bit more complicated as the
"headers +=" line has to move to include/uapi/linux/Kbuild. Only one new
file has appeared since the 9th and I judge this type of event relatively
unlikely.
(4) A patch to disintegrate include/linux/byteorder/*.h as a unit.
Signed-off-by: David Howells <dhowells@redhat.com>"
* tag 'disintegrate-main-20121013' of git://git.infradead.org/users/dhowells/linux-headers:
UAPI: (Scripted) Disintegrate include/linux/byteorder
UAPI: (Scripted) Disintegrate include/linux
UAPI: Unexport linux/blk_types.h
UAPI: Unexport part of linux/ppp-comp.h
Diffstat (limited to 'include/linux/apm_bios.h')
-rw-r--r-- | include/linux/apm_bios.h | 125 |
1 files changed, 3 insertions, 122 deletions
diff --git a/include/linux/apm_bios.h b/include/linux/apm_bios.h index 01a6244c9bc..9c3a87184f4 100644 --- a/include/linux/apm_bios.h +++ b/include/linux/apm_bios.h @@ -1,6 +1,3 @@ -#ifndef _LINUX_APM_H -#define _LINUX_APM_H - /* * Include file for the interface to an APM BIOS * Copyright 1994-2001 Stephen Rothwell (sfr@canb.auug.org.au) @@ -15,25 +12,11 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. */ +#ifndef _LINUX_APM_H +#define _LINUX_APM_H -#include <linux/types.h> - -typedef unsigned short apm_event_t; -typedef unsigned short apm_eventinfo_t; - -struct apm_bios_info { - __u16 version; - __u16 cseg; - __u32 offset; - __u16 cseg_16; - __u16 dseg; - __u16 flags; - __u16 cseg_len; - __u16 cseg_16_len; - __u16 dseg_len; -}; +#include <uapi/linux/apm_bios.h> -#ifdef __KERNEL__ #define APM_CS (GDT_ENTRY_APMBIOS_BASE * 8) #define APM_CS_16 (APM_CS + 8) @@ -110,111 +93,9 @@ struct apm_info { */ extern struct apm_info apm_info; -#endif /* __KERNEL__ */ - -/* - * Power states - */ -#define APM_STATE_READY 0x0000 -#define APM_STATE_STANDBY 0x0001 -#define APM_STATE_SUSPEND 0x0002 -#define APM_STATE_OFF 0x0003 -#define APM_STATE_BUSY 0x0004 -#define APM_STATE_REJECT 0x0005 -#define APM_STATE_OEM_SYS 0x0020 -#define APM_STATE_OEM_DEV 0x0040 - -#define APM_STATE_DISABLE 0x0000 -#define APM_STATE_ENABLE 0x0001 - -#define APM_STATE_DISENGAGE 0x0000 -#define APM_STATE_ENGAGE 0x0001 - -/* - * Events (results of Get PM Event) - */ -#define APM_SYS_STANDBY 0x0001 -#define APM_SYS_SUSPEND 0x0002 -#define APM_NORMAL_RESUME 0x0003 -#define APM_CRITICAL_RESUME 0x0004 -#define APM_LOW_BATTERY 0x0005 -#define APM_POWER_STATUS_CHANGE 0x0006 -#define APM_UPDATE_TIME 0x0007 -#define APM_CRITICAL_SUSPEND 0x0008 -#define APM_USER_STANDBY 0x0009 -#define APM_USER_SUSPEND 0x000a -#define APM_STANDBY_RESUME 0x000b -#define APM_CAPABILITY_CHANGE 0x000c - -/* - * Error codes - */ -#define APM_SUCCESS 0x00 -#define APM_DISABLED 0x01 -#define APM_CONNECTED 0x02 -#define APM_NOT_CONNECTED 0x03 -#define APM_16_CONNECTED 0x05 -#define APM_16_UNSUPPORTED 0x06 -#define APM_32_CONNECTED 0x07 -#define APM_32_UNSUPPORTED 0x08 -#define APM_BAD_DEVICE 0x09 -#define APM_BAD_PARAM 0x0a -#define APM_NOT_ENGAGED 0x0b -#define APM_BAD_FUNCTION 0x0c -#define APM_RESUME_DISABLED 0x0d -#define APM_NO_ERROR 0x53 -#define APM_BAD_STATE 0x60 -#define APM_NO_EVENTS 0x80 -#define APM_NOT_PRESENT 0x86 - -/* - * APM Device IDs - */ -#define APM_DEVICE_BIOS 0x0000 -#define APM_DEVICE_ALL 0x0001 -#define APM_DEVICE_DISPLAY 0x0100 -#define APM_DEVICE_STORAGE 0x0200 -#define APM_DEVICE_PARALLEL 0x0300 -#define APM_DEVICE_SERIAL 0x0400 -#define APM_DEVICE_NETWORK 0x0500 -#define APM_DEVICE_PCMCIA 0x0600 -#define APM_DEVICE_BATTERY 0x8000 -#define APM_DEVICE_OEM 0xe000 -#define APM_DEVICE_OLD_ALL 0xffff -#define APM_DEVICE_CLASS 0x00ff -#define APM_DEVICE_MASK 0xff00 - -#ifdef __KERNEL__ /* * This is the "All Devices" ID communicated to the BIOS */ #define APM_DEVICE_BALL ((apm_info.connection_version > 0x0100) ? \ APM_DEVICE_ALL : APM_DEVICE_OLD_ALL) -#endif - -/* - * Battery status - */ -#define APM_MAX_BATTERIES 2 - -/* - * APM defined capability bit flags - */ -#define APM_CAP_GLOBAL_STANDBY 0x0001 -#define APM_CAP_GLOBAL_SUSPEND 0x0002 -#define APM_CAP_RESUME_STANDBY_TIMER 0x0004 /* Timer resume from standby */ -#define APM_CAP_RESUME_SUSPEND_TIMER 0x0008 /* Timer resume from suspend */ -#define APM_CAP_RESUME_STANDBY_RING 0x0010 /* Resume on Ring fr standby */ -#define APM_CAP_RESUME_SUSPEND_RING 0x0020 /* Resume on Ring fr suspend */ -#define APM_CAP_RESUME_STANDBY_PCMCIA 0x0040 /* Resume on PCMCIA Ring */ -#define APM_CAP_RESUME_SUSPEND_PCMCIA 0x0080 /* Resume on PCMCIA Ring */ - -/* - * ioctl operations - */ -#include <linux/ioctl.h> - -#define APM_IOC_STANDBY _IO('A', 1) -#define APM_IOC_SUSPEND _IO('A', 2) - #endif /* LINUX_APM_H */ |