Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
acpiphp.h File Reference
#include <linux/acpi.h>
#include <linux/mutex.h>
#include <linux/pci_hotplug.h>

Go to the source code of this file.

Data Structures

struct  slot
 
struct  acpiphp_bridge
 
struct  acpiphp_slot
 
struct  acpiphp_func
 
struct  acpiphp_attention_info
 

Macros

#define dbg(format, arg...)
 
#define err(format, arg...)   printk(KERN_ERR "%s: " format, MY_NAME , ## arg)
 
#define info(format, arg...)   printk(KERN_INFO "%s: " format, MY_NAME , ## arg)
 
#define warn(format, arg...)   printk(KERN_WARNING "%s: " format, MY_NAME , ## arg)
 
#define ACPI_PCI_HOST_HID   "PNP0A03"
 
#define BRIDGE_TYPE_HOST   0
 
#define BRIDGE_TYPE_P2P   1
 
#define ACPI_STA_PRESENT   (0x00000001)
 
#define ACPI_STA_ENABLED   (0x00000002)
 
#define ACPI_STA_SHOW_IN_UI   (0x00000004)
 
#define ACPI_STA_FUNCTIONING   (0x00000008)
 
#define ACPI_STA_ALL   (0x0000000f)
 
#define BRIDGE_HAS_STA   (0x00000001)
 
#define BRIDGE_HAS_EJ0   (0x00000002)
 
#define BRIDGE_HAS_HPP   (0x00000004)
 
#define BRIDGE_HAS_PS0   (0x00000010)
 
#define BRIDGE_HAS_PS1   (0x00000020)
 
#define BRIDGE_HAS_PS2   (0x00000040)
 
#define BRIDGE_HAS_PS3   (0x00000080)
 
#define SLOT_POWEREDON   (0x00000001)
 
#define SLOT_ENABLED   (0x00000002)
 
#define SLOT_MULTIFUNCTION   (0x00000004)
 
#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)
 

Typedefs

typedef int(* acpiphp_callback )(struct acpiphp_slot *slot, void *data)
 

Functions

int acpiphp_register_attention (struct acpiphp_attention_info *info)
 
int acpiphp_unregister_attention (struct acpiphp_attention_info *info)
 
int acpiphp_register_hotplug_slot (struct acpiphp_slot *slot)
 
void acpiphp_unregister_hotplug_slot (struct acpiphp_slot *slot)
 
int acpiphp_glue_init (void)
 
void acpiphp_glue_exit (void)
 
int acpiphp_get_num_slots (void)
 
int acpiphp_enable_slot (struct acpiphp_slot *slot)
 
int acpiphp_disable_slot (struct acpiphp_slot *slot)
 
int acpiphp_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)
 
u8 acpiphp_get_adapter_status (struct acpiphp_slot *slot)
 

Variables

bool acpiphp_debug
 

Macro Definition Documentation

#define ACPI_PCI_HOST_HID   "PNP0A03"

Definition at line 147 of file acpiphp.h.

#define ACPI_STA_ALL   (0x0000000f)

Definition at line 158 of file acpiphp.h.

#define ACPI_STA_ENABLED   (0x00000002)

Definition at line 155 of file acpiphp.h.

#define ACPI_STA_FUNCTIONING   (0x00000008)

Definition at line 157 of file acpiphp.h.

#define ACPI_STA_PRESENT   (0x00000001)

Definition at line 154 of file acpiphp.h.

#define ACPI_STA_SHOW_IN_UI   (0x00000004)

Definition at line 156 of file acpiphp.h.

#define BRIDGE_HAS_EJ0   (0x00000002)

Definition at line 162 of file acpiphp.h.

#define BRIDGE_HAS_HPP   (0x00000004)

Definition at line 163 of file acpiphp.h.

#define BRIDGE_HAS_PS0   (0x00000010)

Definition at line 164 of file acpiphp.h.

#define BRIDGE_HAS_PS1   (0x00000020)

Definition at line 165 of file acpiphp.h.

#define BRIDGE_HAS_PS2   (0x00000040)

Definition at line 166 of file acpiphp.h.

#define BRIDGE_HAS_PS3   (0x00000080)

Definition at line 167 of file acpiphp.h.

#define BRIDGE_HAS_STA   (0x00000001)

Definition at line 161 of file acpiphp.h.

#define BRIDGE_TYPE_HOST   0

Definition at line 150 of file acpiphp.h.

#define BRIDGE_TYPE_P2P   1

Definition at line 151 of file acpiphp.h.

#define dbg (   format,
  arg... 
)
Value:
do { \
printk(KERN_DEBUG "%s: " format, \
MY_NAME , ## arg); \
} while (0)

Definition at line 42 of file acpiphp.h.

#define err (   format,
  arg... 
)    printk(KERN_ERR "%s: " format, MY_NAME , ## arg)

Definition at line 48 of file acpiphp.h.

#define FUNC_HAS_DCK   (0x00000100)

Definition at line 183 of file acpiphp.h.

#define FUNC_HAS_EJ0   (0x00000002)

Definition at line 178 of file acpiphp.h.

#define FUNC_HAS_PS0   (0x00000010)

Definition at line 179 of file acpiphp.h.

#define FUNC_HAS_PS1   (0x00000020)

Definition at line 180 of file acpiphp.h.

#define FUNC_HAS_PS2   (0x00000040)

Definition at line 181 of file acpiphp.h.

#define FUNC_HAS_PS3   (0x00000080)

Definition at line 182 of file acpiphp.h.

#define FUNC_HAS_STA   (0x00000001)

Definition at line 177 of file acpiphp.h.

#define info (   format,
  arg... 
)    printk(KERN_INFO "%s: " format, MY_NAME , ## arg)

Definition at line 49 of file acpiphp.h.

#define SLOT_ENABLED   (0x00000002)

Definition at line 172 of file acpiphp.h.

#define SLOT_MULTIFUNCTION   (0x00000004)

Definition at line 173 of file acpiphp.h.

#define SLOT_POWEREDON   (0x00000001)

Definition at line 171 of file acpiphp.h.

#define warn (   format,
  arg... 
)    printk(KERN_WARNING "%s: " format, MY_NAME , ## arg)

Definition at line 50 of file acpiphp.h.

Typedef Documentation

typedef int(* acpiphp_callback)(struct acpiphp_slot *slot, void *data)

Definition at line 197 of file acpiphp.h.

Function Documentation

int acpiphp_disable_slot ( struct acpiphp_slot slot)

acpiphp_disable_slot - power off slot : ACPI PHP slot

Definition at line 1521 of file acpiphp_glue.c.

int acpiphp_eject_slot ( struct acpiphp_slot slot)

acpiphp_eject_slot - physically eject the slot : ACPI PHP slot

Definition at line 1004 of file acpiphp_glue.c.

int acpiphp_enable_slot ( struct acpiphp_slot slot)

acpiphp_enable_slot - power on slot : ACPI PHP slot

Definition at line 1491 of file acpiphp_glue.c.

u8 acpiphp_get_adapter_status ( struct acpiphp_slot slot)

Definition at line 1571 of file acpiphp_glue.c.

u8 acpiphp_get_attention_status ( struct acpiphp_slot slot)
u8 acpiphp_get_latch_status ( struct acpiphp_slot slot)

Definition at line 1557 of file acpiphp_glue.c.

int acpiphp_get_num_slots ( void  )

acpiphp_get_num_slots - count number of slots in a system

Definition at line 1469 of file acpiphp_glue.c.

u8 acpiphp_get_power_status ( struct acpiphp_slot slot)

Definition at line 1547 of file acpiphp_glue.c.

void acpiphp_glue_exit ( void  )

acpiphp_glue_exit - terminates all PCI hotplug - ACPI glue data structures

This function frees all data allocated in acpiphp_glue_init().

Definition at line 1460 of file acpiphp_glue.c.

int acpiphp_glue_init ( void  )

acpiphp_glue_init - initializes all PCI hotplug - ACPI glue data structures

Definition at line 1439 of file acpiphp_glue.c.

int acpiphp_register_attention ( struct acpiphp_attention_info info)

acpiphp_register_attention - set attention LED callback : must be completely filled with LED callbacks

Description: This is used to register a hardware specific ACPI driver that manipulates the attention LED. All the fields in info must be set.

Definition at line 96 of file acpiphp_core.c.

int acpiphp_register_hotplug_slot ( struct acpiphp_slot slot)

Definition at line 309 of file acpiphp_core.c.

int acpiphp_unregister_attention ( struct acpiphp_attention_info info)

acpiphp_unregister_attention - unset attention LED callback : must match the pointer used to register

Description: This is used to un-register a hardware specific acpi driver that manipulates the attention LED. The pointer to the info struct must be the same as the one used to set it.

Definition at line 117 of file acpiphp_core.c.

void acpiphp_unregister_hotplug_slot ( struct acpiphp_slot slot)

Definition at line 361 of file acpiphp_core.c.

Variable Documentation

bool acpiphp_debug

Definition at line 50 of file acpiphp_core.c.