aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/acpiphp.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/hotplug/acpiphp.h')
-rw-r--r--drivers/pci/hotplug/acpiphp.h35
1 files changed, 15 insertions, 20 deletions
diff --git a/drivers/pci/hotplug/acpiphp.h b/drivers/pci/hotplug/acpiphp.h
index b70ac00a117e..6fdd49c6f0b9 100644
--- a/drivers/pci/hotplug/acpiphp.h
+++ b/drivers/pci/hotplug/acpiphp.h
@@ -73,8 +73,9 @@ static inline const char *slot_name(struct slot *slot)
73 */ 73 */
74struct acpiphp_bridge { 74struct acpiphp_bridge {
75 struct list_head list; 75 struct list_head list;
76 struct list_head slots;
77 struct kref ref;
76 acpi_handle handle; 78 acpi_handle handle;
77 struct acpiphp_slot *slots;
78 79
79 /* Ejectable PCI-to-PCI bridge (PCI bridge and PCI function) */ 80 /* Ejectable PCI-to-PCI bridge (PCI bridge and PCI function) */
80 struct acpiphp_func *func; 81 struct acpiphp_func *func;
@@ -97,7 +98,7 @@ struct acpiphp_bridge {
97 * PCI slot information for each *physical* PCI slot 98 * PCI slot information for each *physical* PCI slot
98 */ 99 */
99struct acpiphp_slot { 100struct acpiphp_slot {
100 struct acpiphp_slot *next; 101 struct list_head node;
101 struct acpiphp_bridge *bridge; /* parent */ 102 struct acpiphp_bridge *bridge; /* parent */
102 struct list_head funcs; /* one slot may have different 103 struct list_head funcs; /* one slot may have different
103 objects (i.e. for each function) */ 104 objects (i.e. for each function) */
@@ -119,7 +120,6 @@ struct acpiphp_slot {
119 */ 120 */
120struct acpiphp_func { 121struct acpiphp_func {
121 struct acpiphp_slot *slot; /* parent */ 122 struct acpiphp_slot *slot; /* parent */
122 struct acpiphp_bridge *bridge; /* Ejectable PCI-to-PCI bridge */
123 123
124 struct list_head sibling; 124 struct list_head sibling;
125 struct notifier_block nb; 125 struct notifier_block nb;
@@ -146,10 +146,6 @@ struct acpiphp_attention_info
146#define ACPI_PCI_HOST_HID "PNP0A03" 146#define ACPI_PCI_HOST_HID "PNP0A03"
147 147
148/* ACPI _STA method value (ignore bit 4; battery present) */ 148/* ACPI _STA method value (ignore bit 4; battery present) */
149#define ACPI_STA_PRESENT (0x00000001)
150#define ACPI_STA_ENABLED (0x00000002)
151#define ACPI_STA_SHOW_IN_UI (0x00000004)
152#define ACPI_STA_FUNCTIONING (0x00000008)
153#define ACPI_STA_ALL (0x0000000f) 149#define ACPI_STA_ALL (0x0000000f)
154 150
155/* bridge flags */ 151/* bridge flags */
@@ -174,25 +170,24 @@ struct acpiphp_attention_info
174/* function prototypes */ 170/* function prototypes */
175 171
176/* acpiphp_core.c */ 172/* acpiphp_core.c */
177extern int acpiphp_register_attention(struct acpiphp_attention_info*info); 173int acpiphp_register_attention(struct acpiphp_attention_info*info);
178extern int acpiphp_unregister_attention(struct acpiphp_attention_info *info); 174int acpiphp_unregister_attention(struct acpiphp_attention_info *info);
179extern int acpiphp_register_hotplug_slot(struct acpiphp_slot *slot); 175int acpiphp_register_hotplug_slot(struct acpiphp_slot *slot);
180extern void acpiphp_unregister_hotplug_slot(struct acpiphp_slot *slot); 176void acpiphp_unregister_hotplug_slot(struct acpiphp_slot *slot);
181 177
182/* acpiphp_glue.c */ 178/* acpiphp_glue.c */
183extern int acpiphp_glue_init (void);
184extern void acpiphp_glue_exit (void);
185typedef int (*acpiphp_callback)(struct acpiphp_slot *slot, void *data); 179typedef int (*acpiphp_callback)(struct acpiphp_slot *slot, void *data);
186 180
187extern int acpiphp_enable_slot (struct acpiphp_slot *slot); 181int acpiphp_enable_slot(struct acpiphp_slot *slot);
188extern int acpiphp_disable_slot (struct acpiphp_slot *slot); 182int acpiphp_disable_slot(struct acpiphp_slot *slot);
189extern int acpiphp_eject_slot (struct acpiphp_slot *slot); 183int acpiphp_eject_slot(struct acpiphp_slot *slot);
190extern u8 acpiphp_get_power_status (struct acpiphp_slot *slot); 184u8 acpiphp_get_power_status(struct acpiphp_slot *slot);
191extern u8 acpiphp_get_attention_status (struct acpiphp_slot *slot); 185u8 acpiphp_get_attention_status(struct acpiphp_slot *slot);
192extern u8 acpiphp_get_latch_status (struct acpiphp_slot *slot); 186u8 acpiphp_get_latch_status(struct acpiphp_slot *slot);
193extern u8 acpiphp_get_adapter_status (struct acpiphp_slot *slot); 187u8 acpiphp_get_adapter_status(struct acpiphp_slot *slot);
194 188
195/* variables */ 189/* variables */
196extern bool acpiphp_debug; 190extern bool acpiphp_debug;
191extern bool acpiphp_disabled;
197 192
198#endif /* _ACPIPHP_H */ 193#endif /* _ACPIPHP_H */