|
Linux Kernel
3.7.1
|
#include <linux/module.h>#include <linux/poll.h>#include <linux/types.h>#include <linux/stddef.h>#include <linux/timer.h>#include <linux/fcntl.h>#include <linux/slab.h>#include <linux/stat.h>#include <linux/proc_fs.h>#include <linux/seq_file.h>#include <linux/miscdevice.h>#include <linux/apm_bios.h>#include <linux/init.h>#include <linux/time.h>#include <linux/sched.h>#include <linux/pm.h>#include <linux/capability.h>#include <linux/device.h>#include <linux/kernel.h>#include <linux/freezer.h>#include <linux/smp.h>#include <linux/dmi.h>#include <linux/suspend.h>#include <linux/kthread.h>#include <linux/jiffies.h>#include <linux/acpi.h>#include <linux/syscore_ops.h>#include <linux/i8253.h>#include <asm/uaccess.h>#include <asm/desc.h>#include <asm/olpc.h>#include <asm/paravirt.h>#include <asm/reboot.h>#include <asm/apm.h>Go to the source code of this file.
Data Structures | |
| struct | apm_user |
| struct | lookup_t |
| struct | apm_bios_call |
Macros | |
| #define | pr_fmt(fmt) "apm: " fmt |
| #define | APM_MINOR_DEV 134 |
| #define | ALWAYS_CALL_BUSY 1 |
| #define | APM_ZERO_SEGS |
| #define | APM_CHECK_TIMEOUT (HZ) |
| #define | DEFAULT_BOUNCE_INTERVAL (3 * HZ) |
| #define | APM_MAX_EVENTS 20 |
| #define | APM_BIOS_MAGIC 0x4101 |
| #define | DEFAULT_IDLE_THRESHOLD 100 |
| #define | DEFAULT_IDLE_PERIOD (100 / 3) |
| #define | NR_APM_EVENT_NAME ARRAY_SIZE(apm_event_name) |
| #define | ERROR_COUNT ARRAY_SIZE(error_table) |
| #define | apm_irq_save(flags) do { flags = __apm_irq_save(); } while (0) |
| #define | APM_DECL_SEGS unsigned int saved_fs; unsigned int saved_gs; |
| #define | APM_DO_SAVE_SEGS savesegment(fs, saved_fs); savesegment(gs, saved_gs) |
| #define | APM_DO_RESTORE_SEGS loadsegment(fs, saved_fs); loadsegment(gs, saved_gs) |
| #define | IDLE_CALC_LIMIT (HZ * 100) |
| #define | IDLE_LEAKY_MAX 16 |
Typedefs | |
| typedef struct lookup_t | lookup_t |
Functions | |
| __setup ("apm=", apm_setup) | |
| module_init (apm_init) | |
| module_exit (apm_exit) | |
| MODULE_AUTHOR ("Stephen Rothwell") | |
| MODULE_DESCRIPTION ("Advanced Power Management") | |
| MODULE_LICENSE ("GPL") | |
| module_param (debug, bool, 0644) | |
| MODULE_PARM_DESC (debug,"Enable debug mode") | |
| module_param (power_off, bool, 0444) | |
| MODULE_PARM_DESC (power_off,"Enable power off") | |
| module_param (bounce_interval, int, 0444) | |
| MODULE_PARM_DESC (bounce_interval,"Set the number of ticks to ignore suspend bounces") | |
| module_param (allow_ints, bool, 0444) | |
| MODULE_PARM_DESC (allow_ints,"Allow interrupts during BIOS calls") | |
| module_param (broken_psr, bool, 0444) | |
| MODULE_PARM_DESC (broken_psr,"BIOS has a broken GetPowerStatus call") | |
| module_param (realmode_power_off, bool, 0444) | |
| MODULE_PARM_DESC (realmode_power_off,"Switch to real mode before powering off") | |
| module_param (idle_threshold, int, 0444) | |
| MODULE_PARM_DESC (idle_threshold,"System idle percentage above which to make APM BIOS idle calls") | |
| module_param (idle_period, int, 0444) | |
| MODULE_PARM_DESC (idle_period,"Period (in sec/100) over which to caculate the idle percentage") | |
| module_param (smp, bool, 0444) | |
| MODULE_PARM_DESC (smp,"Set this to enable APM use on an SMP platform. Use with caution on older systems") | |
| MODULE_ALIAS_MISCDEV (APM_MINOR_DEV) | |
| #define ERROR_COUNT ARRAY_SIZE(error_table) |
| #define NR_APM_EVENT_NAME ARRAY_SIZE(apm_event_name) |
| __setup | ( | ) |
| MODULE_ALIAS_MISCDEV | ( | APM_MINOR_DEV | ) |
| MODULE_AUTHOR | ( | "Stephen Rothwell" | ) |
| MODULE_DESCRIPTION | ( | "Advanced Power Management" | ) |
| module_exit | ( | apm_exit | ) |
| module_init | ( | apm_init | ) |
| MODULE_LICENSE | ( | "GPL" | ) |
| module_param | ( | power_off | , |
| bool | , | ||
| 0444 | |||
| ) |
| module_param | ( | bounce_interval | , |
| int | , | ||
| 0444 | |||
| ) |
| module_param | ( | allow_ints | , |
| bool | , | ||
| 0444 | |||
| ) |
| module_param | ( | broken_psr | , |
| bool | , | ||
| 0444 | |||
| ) |
| module_param | ( | realmode_power_off | , |
| bool | , | ||
| 0444 | |||
| ) |
| module_param | ( | idle_threshold | , |
| int | , | ||
| 0444 | |||
| ) |
| module_param | ( | idle_period | , |
| int | , | ||
| 0444 | |||
| ) |
| MODULE_PARM_DESC | ( | power_off | , |
| "Enable power off" | |||
| ) |
| MODULE_PARM_DESC | ( | allow_ints | , |
| "Allow interrupts during BIOS calls" | |||
| ) |
| MODULE_PARM_DESC | ( | broken_psr | , |
| "BIOS has a broken GetPowerStatus call" | |||
| ) |
| MODULE_PARM_DESC | ( | realmode_power_off | , |
| "Switch to real mode before powering off" | |||
| ) |
| MODULE_PARM_DESC | ( | idle_threshold | , |
| "System idle percentage above which to make APM BIOS idle calls" | |||
| ) |
| MODULE_PARM_DESC | ( | smp | , |
| "Set this to enable APM use on an SMP platform. Use with caution on older systems" | |||
| ) |
1.8.2