Skip to content
Snippets Groups Projects
Select Git revision
  • 977a7a15231f6c510229f616dd0c24632fcbee4d
  • master default protected
  • android-msm-bullhead-3.10-nougat_kgdb_less_changes
  • android-msm-bullhead-3.10-nougat_kgdb
  • android-msm-bullhead-3.10-nougat_klist
  • android-4.4
  • android-msm-vega-4.4-oreo-daydream
  • android-msm-wahoo-4.4-p-preview-5
  • android-msm-wahoo-4.4-pie
  • android-msm-marlin-3.18-p-preview-5
  • android-msm-marlin-3.18-pie
  • android-msm-wahoo-2018.07-oreo-m2
  • android-msm-wahoo-2018.07-oreo-m4
  • android-msm-wahoo-4.4-p-preview-4
  • android-msm-bullhead-3.10-oreo-m6
  • android-msm-angler-3.10-oreo-m6
  • android-msm-marlin-3.18-p-preview-4
  • android-msm-stargazer-3.18-oreo-wear-dr
  • android-msm-catshark-3.18-oreo-wear-dr
  • android-msm-wahoo-4.4-oreo-m2
  • android-msm-wahoo-4.4-oreo-m4
  • android-daydreamos-8.0.0_r0.5
  • android-8.1.0_r0.92
  • android-8.1.0_r0.91
  • android-daydreamos-8.0.0_r0.4
  • android-p-preview-5_r0.2
  • android-p-preview-5_r0.1
  • android-9.0.0_r0.5
  • android-9.0.0_r0.4
  • android-9.0.0_r0.2
  • android-9.0.0_r0.1
  • android-8.1.0_r0.81
  • android-8.1.0_r0.80
  • android-8.1.0_r0.78
  • android-8.1.0_r0.76
  • android-8.1.0_r0.75
  • android-8.1.0_r0.72
  • android-8.1.0_r0.70
  • android-p-preview-4_r0.2
  • android-p-preview-4_r0.1
  • android-wear-8.0.0_r0.30
41 results

apm_bios.h

Blame
  • apm_bios.h 2.68 KiB
    /*
     * 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 _LINUX_APM_H
    #define _LINUX_APM_H
    
    #include <uapi/linux/apm_bios.h>
    
    
    #define APM_CS		(GDT_ENTRY_APMBIOS_BASE * 8)
    #define APM_CS_16	(APM_CS + 8)
    #define APM_DS		(APM_CS_16 + 8)
    
    /* Results of APM Installation Check */
    #define APM_16_BIT_SUPPORT	0x0001
    #define APM_32_BIT_SUPPORT	0x0002
    #define APM_IDLE_SLOWS_CLOCK	0x0004
    #define APM_BIOS_DISABLED      	0x0008
    #define APM_BIOS_DISENGAGED     0x0010
    
    /*
     * Data for APM that is persistent across module unload/load
     */
    struct apm_info {
    	struct apm_bios_info	bios;
    	unsigned short		connection_version;
    	int			get_power_status_broken;
    	int			get_power_status_swabinminutes;
    	int			allow_ints;
    	int			forbid_idle;
    	int			realmode_power_off;
    	int			disabled;
    };
    
    /*
     * The APM function codes
     */
    #define	APM_FUNC_INST_CHECK	0x5300
    #define	APM_FUNC_REAL_CONN	0x5301
    #define	APM_FUNC_16BIT_CONN	0x5302
    #define	APM_FUNC_32BIT_CONN	0x5303
    #define	APM_FUNC_DISCONN	0x5304
    #define	APM_FUNC_IDLE		0x5305
    #define	APM_FUNC_BUSY		0x5306
    #define	APM_FUNC_SET_STATE	0x5307
    #define	APM_FUNC_ENABLE_PM	0x5308
    #define	APM_FUNC_RESTORE_BIOS	0x5309
    #define	APM_FUNC_GET_STATUS	0x530a
    #define	APM_FUNC_GET_EVENT	0x530b
    #define	APM_FUNC_GET_STATE	0x530c
    #define	APM_FUNC_ENABLE_DEV_PM	0x530d
    #define	APM_FUNC_VERSION	0x530e
    #define	APM_FUNC_ENGAGE_PM	0x530f
    #define	APM_FUNC_GET_CAP	0x5310
    #define	APM_FUNC_RESUME_TIMER	0x5311
    #define	APM_FUNC_RESUME_ON_RING	0x5312
    #define	APM_FUNC_TIMER		0x5313
    
    /*
     * Function code for APM_FUNC_RESUME_TIMER
     */
    #define	APM_FUNC_DISABLE_TIMER	0
    #define	APM_FUNC_GET_TIMER	1
    #define	APM_FUNC_SET_TIMER	2
    
    /*
     * Function code for APM_FUNC_RESUME_ON_RING
     */
    #define	APM_FUNC_DISABLE_RING	0
    #define	APM_FUNC_ENABLE_RING	1
    #define	APM_FUNC_GET_RING	2
    
    /*
     * Function code for APM_FUNC_TIMER_STATUS
     */
    #define	APM_FUNC_TIMER_DISABLE	0
    #define	APM_FUNC_TIMER_ENABLE	1
    #define	APM_FUNC_TIMER_GET	2
    
    /*
     * in arch/i386/kernel/setup.c
     */
    extern struct apm_info	apm_info;
    
    /*
     * 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	/* LINUX_APM_H */