Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
apm-emulation.h File Reference
#include <linux/apm_bios.h>

Go to the source code of this file.

Data Structures

struct  apm_power_info
 

Macros

#define APM_AC_OFFLINE   0
 
#define APM_AC_ONLINE   1
 
#define APM_AC_BACKUP   2
 
#define APM_AC_UNKNOWN   0xff
 
#define APM_BATTERY_STATUS_HIGH   0
 
#define APM_BATTERY_STATUS_LOW   1
 
#define APM_BATTERY_STATUS_CRITICAL   2
 
#define APM_BATTERY_STATUS_CHARGING   3
 
#define APM_BATTERY_STATUS_NOT_PRESENT   4
 
#define APM_BATTERY_STATUS_UNKNOWN   0xff
 
#define APM_BATTERY_FLAG_HIGH   (1 << 0)
 
#define APM_BATTERY_FLAG_LOW   (1 << 1)
 
#define APM_BATTERY_FLAG_CRITICAL   (1 << 2)
 
#define APM_BATTERY_FLAG_CHARGING   (1 << 3)
 
#define APM_BATTERY_FLAG_NOT_PRESENT   (1 << 7)
 
#define APM_BATTERY_FLAG_UNKNOWN   0xff
 
#define APM_UNITS_MINS   0
 
#define APM_UNITS_SECS   1
 
#define APM_UNITS_UNKNOWN   -1
 

Functions

void apm_queue_event (apm_event_t event)
 

Variables

void(* apm_get_power_status )(struct apm_power_info *)
 

Macro Definition Documentation

#define APM_AC_BACKUP   2

Definition at line 24 of file apm-emulation.h.

#define APM_AC_OFFLINE   0

Definition at line 22 of file apm-emulation.h.

#define APM_AC_ONLINE   1

Definition at line 23 of file apm-emulation.h.

#define APM_AC_UNKNOWN   0xff

Definition at line 25 of file apm-emulation.h.

#define APM_BATTERY_FLAG_CHARGING   (1 << 3)

Definition at line 39 of file apm-emulation.h.

#define APM_BATTERY_FLAG_CRITICAL   (1 << 2)

Definition at line 38 of file apm-emulation.h.

#define APM_BATTERY_FLAG_HIGH   (1 << 0)

Definition at line 36 of file apm-emulation.h.

#define APM_BATTERY_FLAG_LOW   (1 << 1)

Definition at line 37 of file apm-emulation.h.

#define APM_BATTERY_FLAG_NOT_PRESENT   (1 << 7)

Definition at line 40 of file apm-emulation.h.

#define APM_BATTERY_FLAG_UNKNOWN   0xff

Definition at line 41 of file apm-emulation.h.

#define APM_BATTERY_STATUS_CHARGING   3

Definition at line 31 of file apm-emulation.h.

#define APM_BATTERY_STATUS_CRITICAL   2

Definition at line 30 of file apm-emulation.h.

#define APM_BATTERY_STATUS_HIGH   0

Definition at line 28 of file apm-emulation.h.

#define APM_BATTERY_STATUS_LOW   1

Definition at line 29 of file apm-emulation.h.

#define APM_BATTERY_STATUS_NOT_PRESENT   4

Definition at line 32 of file apm-emulation.h.

#define APM_BATTERY_STATUS_UNKNOWN   0xff

Definition at line 33 of file apm-emulation.h.

#define APM_UNITS_MINS   0

Definition at line 46 of file apm-emulation.h.

#define APM_UNITS_SECS   1

Definition at line 47 of file apm-emulation.h.

#define APM_UNITS_UNKNOWN   -1

Definition at line 48 of file apm-emulation.h.

Function Documentation

void apm_queue_event ( apm_event_t  event)

apm_queue_event - queue an APM event for kapmd : APM event

Queue an APM event for kapmd to process and ultimately take the appropriate action. Only a subset of events are handled: APM_LOW_BATTERY APM_POWER_STATUS_CHANGE APM_USER_SUSPEND APM_SYS_SUSPEND APM_CRITICAL_SUSPEND

Definition at line 728 of file apm-emulation.c.

Variable Documentation

void(* apm_get_power_status)(struct apm_power_info *)

Definition at line 165 of file apm-emulation.c.