/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
/*
* Include file for the interface to an APM BIOS
* Copyright 1994 - 2001 Stephen Rothwell ( sfr @ canb . auug . org . au )
*
* This program is free software ; you can redistribute it and / or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation ; either version 2 , or ( at your option ) any
* later version .
*
* This program is distributed in the hope that it will be useful , but
* WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the GNU
* General Public License for more details .
*/
#ifndef _UAPI_LINUX_APM_H
#define _UAPI_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;
};
/*
* Power states
*/
#define APM_STATE_READY 0 x0000
#define APM_STATE_STANDBY 0 x0001
#define APM_STATE_SUSPEND 0 x0002
#define APM_STATE_OFF 0 x0003
#define APM_STATE_BUSY 0 x0004
#define APM_STATE_REJECT 0 x0005
#define APM_STATE_OEM_SYS 0 x0020
#define APM_STATE_OEM_DEV 0 x0040
#define APM_STATE_DISABLE 0 x0000
#define APM_STATE_ENABLE 0 x0001
#define APM_STATE_DISENGAGE 0 x0000
#define APM_STATE_ENGAGE 0 x0001
/*
* Events ( results of Get PM Event )
*/
#define APM_SYS_STANDBY 0 x0001
#define APM_SYS_SUSPEND 0 x0002
#define APM_NORMAL_RESUME 0 x0003
#define APM_CRITICAL_RESUME 0 x0004
#define APM_LOW_BATTERY 0 x0005
#define APM_POWER_STATUS_CHANGE 0 x0006
#define APM_UPDATE_TIME 0 x0007
#define APM_CRITICAL_SUSPEND 0 x0008
#define APM_USER_STANDBY 0 x0009
#define APM_USER_SUSPEND 0 x000a
#define APM_STANDBY_RESUME 0 x000b
#define APM_CAPABILITY_CHANGE 0 x000c
#define APM_USER_HIBERNATION 0 x000d
#define APM_HIBERNATION_RESUME 0 x000e
/*
* Error codes
*/
#define APM_SUCCESS 0 x00
#define APM_DISABLED 0 x01
#define APM_CONNECTED 0 x02
#define APM_NOT_CONNECTED 0 x03
#define APM_16_CONNECTED 0 x05
#define APM_16_UNSUPPORTED 0 x06
#define APM_32_CONNECTED 0 x07
#define APM_32_UNSUPPORTED 0 x08
#define APM_BAD_DEVICE 0 x09
#define APM_BAD_PARAM 0 x0a
#define APM_NOT_ENGAGED 0 x0b
#define APM_BAD_FUNCTION 0 x0c
#define APM_RESUME_DISABLED 0 x0d
#define APM_NO_ERROR 0 x53
#define APM_BAD_STATE 0 x60
#define APM_NO_EVENTS 0 x80
#define APM_NOT_PRESENT 0 x86
/*
* APM Device IDs
*/
#define APM_DEVICE_BIOS 0 x0000
#define APM_DEVICE_ALL 0 x0001
#define APM_DEVICE_DISPLAY 0 x0100
#define APM_DEVICE_STORAGE 0 x0200
#define APM_DEVICE_PARALLEL 0 x0300
#define APM_DEVICE_SERIAL 0 x0400
#define APM_DEVICE_NETWORK 0 x0500
#define APM_DEVICE_PCMCIA 0 x0600
#define APM_DEVICE_BATTERY 0 x8000
#define APM_DEVICE_OEM 0 xe000
#define APM_DEVICE_OLD_ALL 0 xffff
#define APM_DEVICE_CLASS 0 x00ff
#define APM_DEVICE_MASK 0 xff00
/*
* Battery status
*/
#define APM_MAX_BATTERIES 2
/*
* APM defined capability bit flags
*/
#define APM_CAP_GLOBAL_STANDBY 0 x0001
#define APM_CAP_GLOBAL_SUSPEND 0 x0002
#define APM_CAP_RESUME_STANDBY_TIMER 0 x0004 /* Timer resume from standby */
#define APM_CAP_RESUME_SUSPEND_TIMER 0 x0008 /* Timer resume from suspend */
#define APM_CAP_RESUME_STANDBY_RING 0 x0010 /* Resume on Ring fr standby */
#define APM_CAP_RESUME_SUSPEND_RING 0 x0020 /* Resume on Ring fr suspend */
#define APM_CAP_RESUME_STANDBY_PCMCIA 0 x0040 /* Resume on PCMCIA Ring */
#define APM_CAP_RESUME_SUSPEND_PCMCIA 0 x0080 /* 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 /* _UAPI_LINUX_APM_H */
Messung V0.5 in Prozent C=97 H=97 G=96
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet am 2026-09-28)
¤
*© Formatika GbR, Deutschland