]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/pci/hotplug/acpiphp.h
Merge branch 'acpi-processor'
[karo-tx-linux.git] / drivers / pci / hotplug / acpiphp.h
index 31c84bdd2bef51c1c09e15b5fedb1bb59c1e339f..f4e0289246672c0a9157927303945f0934e26d31 100644 (file)
@@ -77,7 +77,6 @@ struct acpiphp_bridge {
        struct list_head list;
        struct list_head slots;
        struct kref ref;
-       acpi_handle handle;
 
        struct acpiphp_context *context;
 
@@ -98,7 +97,7 @@ struct acpiphp_bridge {
  */
 struct acpiphp_slot {
        struct list_head node;
-       struct acpiphp_bridge *bridge;  /* parent */
+       struct pci_bus *bus;
        struct list_head funcs;         /* one slot may have different
                                           objects (i.e. for each function) */
        struct slot *slot;
@@ -116,10 +115,10 @@ struct acpiphp_slot {
  * typically 8 objects per slot (i.e. for each PCI function)
  */
 struct acpiphp_func {
-       struct acpiphp_slot *slot;      /* parent */
+       struct acpiphp_bridge *parent;
+       struct acpiphp_slot *slot;
 
        struct list_head sibling;
-       acpi_handle     handle;
 
        u8              function;       /* pci function# */
        u32             flags;          /* see below */
@@ -137,6 +136,11 @@ static inline struct acpiphp_context *func_to_context(struct acpiphp_func *func)
        return container_of(func, struct acpiphp_context, func);
 }
 
+static inline acpi_handle func_to_handle(struct acpiphp_func *func)
+{
+       return func_to_context(func)->handle;
+}
+
 /*
  * struct acpiphp_attention_info - device specific attention registration
  *
@@ -150,27 +154,18 @@ struct acpiphp_attention_info
        struct module *owner;
 };
 
-/* PCI bus bridge HID */
-#define ACPI_PCI_HOST_HID              "PNP0A03"
-
 /* ACPI _STA method value (ignore bit 4; battery present) */
 #define ACPI_STA_ALL                   (0x0000000f)
 
 /* slot flags */
 
-#define SLOT_POWEREDON         (0x00000001)
-#define SLOT_ENABLED           (0x00000002)
-#define SLOT_MULTIFUNCTION     (0x00000004)
+#define SLOT_ENABLED           (0x00000001)
 
 /* function flags */
 
 #define FUNC_HAS_STA           (0x00000001)
 #define FUNC_HAS_EJ0           (0x00000002)
-#define FUNC_HAS_PS0           (0x00000010)
-#define FUNC_HAS_PS1           (0x00000020)
-#define FUNC_HAS_PS2           (0x00000040)
-#define FUNC_HAS_PS3           (0x00000080)
-#define FUNC_HAS_DCK            (0x00000100)
+#define FUNC_HAS_DCK            (0x00000004)
 
 /* function prototypes */
 
@@ -184,8 +179,7 @@ void acpiphp_unregister_hotplug_slot(struct acpiphp_slot *slot);
 typedef int (*acpiphp_callback)(struct acpiphp_slot *slot, void *data);
 
 int acpiphp_enable_slot(struct acpiphp_slot *slot);
-int acpiphp_disable_slot(struct acpiphp_slot *slot);
-int acpiphp_eject_slot(struct acpiphp_slot *slot);
+int acpiphp_disable_and_eject_slot(struct acpiphp_slot *slot);
 u8 acpiphp_get_power_status(struct acpiphp_slot *slot);
 u8 acpiphp_get_attention_status(struct acpiphp_slot *slot);
 u8 acpiphp_get_latch_status(struct acpiphp_slot *slot);