achware.h 4.0 KB
Newer Older
L
Linus Torvalds 已提交
1 2 3 4 5 6 7
/******************************************************************************
 *
 * Name: achware.h -- hardware specific interfaces
 *
 *****************************************************************************/

/*
L
Len Brown 已提交
8
 * Copyright (C) 2000 - 2008, Intel Corp.
L
Linus Torvalds 已提交
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions, and the following disclaimer,
 *    without modification.
 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
 *    substantially similar to the "NO WARRANTY" disclaimer below
 *    ("Disclaimer") and any redistribution must be conditioned upon
 *    including a substantially similar Disclaimer requirement for further
 *    binary redistribution.
 * 3. Neither the names of the above-listed copyright holders nor the names
 *    of any contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * Alternatively, this software may be distributed under the terms of the
 * GNU General Public License ("GPL") version 2 as published by the Free
 * Software Foundation.
 *
 * NO WARRANTY
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGES.
 */

#ifndef __ACHWARE_H__
#define __ACHWARE_H__

47
/* Values for the _SST predefined method */
L
Linus Torvalds 已提交
48

R
Robert Moore 已提交
49 50 51 52 53
#define ACPI_SST_INDICATOR_OFF  0
#define ACPI_SST_WORKING        1
#define ACPI_SST_WAKING         2
#define ACPI_SST_SLEEPING       3
#define ACPI_SST_SLEEP_CONTEXT  4
L
Linus Torvalds 已提交
54

R
Robert Moore 已提交
55 56 57
/*
 * hwacpi - high level functions
 */
L
Len Brown 已提交
58
acpi_status acpi_hw_set_mode(u32 mode);
L
Linus Torvalds 已提交
59

L
Len Brown 已提交
60
u32 acpi_hw_get_mode(void);
L
Linus Torvalds 已提交
61

R
Robert Moore 已提交
62 63 64
/*
 * hwregs - ACPI Register I/O
 */
L
Len Brown 已提交
65
struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id);
L
Linus Torvalds 已提交
66 67

acpi_status
68
acpi_hw_register_read(u32 register_id, u32 * return_value);
L
Linus Torvalds 已提交
69

70
acpi_status acpi_hw_register_write(u32 register_id, u32 value);
L
Linus Torvalds 已提交
71

72
acpi_status acpi_hw_clear_acpi_status(void);
L
Linus Torvalds 已提交
73

R
Robert Moore 已提交
74 75 76
/*
 * hwgpe - GPE support
 */
B
Bob Moore 已提交
77 78
acpi_status acpi_hw_low_disable_gpe(struct acpi_gpe_event_info *gpe_event_info);

L
Linus Torvalds 已提交
79
acpi_status
L
Len Brown 已提交
80
acpi_hw_write_gpe_enable_reg(struct acpi_gpe_event_info *gpe_event_info);
L
Linus Torvalds 已提交
81 82

acpi_status
L
Len Brown 已提交
83
acpi_hw_disable_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
84
			  struct acpi_gpe_block_info *gpe_block, void *context);
L
Linus Torvalds 已提交
85

L
Len Brown 已提交
86
acpi_status acpi_hw_clear_gpe(struct acpi_gpe_event_info *gpe_event_info);
L
Linus Torvalds 已提交
87 88

acpi_status
L
Len Brown 已提交
89
acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
90
			struct acpi_gpe_block_info *gpe_block, void *context);
L
Linus Torvalds 已提交
91 92

acpi_status
L
Len Brown 已提交
93 94
acpi_hw_get_gpe_status(struct acpi_gpe_event_info *gpe_event_info,
		       acpi_event_status * event_status);
L
Linus Torvalds 已提交
95

L
Len Brown 已提交
96
acpi_status acpi_hw_disable_all_gpes(void);
L
Linus Torvalds 已提交
97

L
Len Brown 已提交
98
acpi_status acpi_hw_enable_all_runtime_gpes(void);
L
Linus Torvalds 已提交
99

L
Len Brown 已提交
100
acpi_status acpi_hw_enable_all_wakeup_gpes(void);
L
Linus Torvalds 已提交
101 102

acpi_status
L
Len Brown 已提交
103
acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
104 105
				 struct acpi_gpe_block_info *gpe_block,
				 void *context);
L
Linus Torvalds 已提交
106

R
Robert Moore 已提交
107 108 109 110
#ifdef	ACPI_FUTURE_USAGE
/*
 * hwtimer - ACPI Timer prototypes
 */
L
Len Brown 已提交
111
acpi_status acpi_get_timer_resolution(u32 * resolution);
L
Linus Torvalds 已提交
112

L
Len Brown 已提交
113
acpi_status acpi_get_timer(u32 * ticks);
L
Linus Torvalds 已提交
114 115

acpi_status
L
Len Brown 已提交
116 117
acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed);
#endif				/* ACPI_FUTURE_USAGE */
L
Linus Torvalds 已提交
118

L
Len Brown 已提交
119
#endif				/* __ACHWARE_H__ */