Go to the documentation of this file.
32 #include <linux/types.h>
33 #include <linux/pci.h>
36 #include <linux/sched.h>
41 #define MY_NAME "pciehp"
49 #define dbg(format, arg...) \
52 printk(KERN_DEBUG "%s: " format, MY_NAME , ## arg); \
54 #define err(format, arg...) \
55 printk(KERN_ERR "%s: " format, MY_NAME , ## arg)
56 #define info(format, arg...) \
57 printk(KERN_INFO "%s: " format, MY_NAME , ## arg)
58 #define warn(format, arg...) \
59 printk(KERN_WARNING "%s: " format, MY_NAME , ## arg)
61 #define ctrl_dbg(ctrl, format, arg...) \
64 dev_printk(KERN_DEBUG, &ctrl->pcie->device, \
67 #define ctrl_err(ctrl, format, arg...) \
68 dev_err(&ctrl->pcie->device, format, ## arg)
69 #define ctrl_info(ctrl, format, arg...) \
70 dev_info(&ctrl->pcie->device, format, ## arg)
71 #define ctrl_warn(ctrl, format, arg...) \
72 dev_warn(&ctrl->pcie->device, format, ## arg)
74 #define SLOT_NAME_SIZE 10
103 #define INT_BUTTON_IGNORE 0
104 #define INT_PRESENCE_ON 1
105 #define INT_PRESENCE_OFF 2
106 #define INT_SWITCH_CLOSE 3
107 #define INT_SWITCH_OPEN 4
108 #define INT_POWER_FAULT 5
109 #define INT_POWER_FAULT_CLEAR 6
110 #define INT_BUTTON_PRESS 7
111 #define INT_BUTTON_RELEASE 8
112 #define INT_BUTTON_CANCEL 9
114 #define STATIC_STATE 0
115 #define BLINKINGON_STATE 1
116 #define BLINKINGOFF_STATE 2
117 #define POWERON_STATE 3
118 #define POWEROFF_STATE 4
120 #define ATTN_BUTTN(ctrl) ((ctrl)->slot_cap & PCI_EXP_SLTCAP_ABP)
121 #define POWER_CTRL(ctrl) ((ctrl)->slot_cap & PCI_EXP_SLTCAP_PCP)
122 #define MRL_SENS(ctrl) ((ctrl)->slot_cap & PCI_EXP_SLTCAP_MRLSP)
123 #define ATTN_LED(ctrl) ((ctrl)->slot_cap & PCI_EXP_SLTCAP_AIP)
124 #define PWR_LED(ctrl) ((ctrl)->slot_cap & PCI_EXP_SLTCAP_PIP)
125 #define HP_SUPR_RM(ctrl) ((ctrl)->slot_cap & PCI_EXP_SLTCAP_HPS)
126 #define EMI(ctrl) ((ctrl)->slot_cap & PCI_EXP_SLTCAP_EIP)
127 #define NO_CMD_CMPL(ctrl) ((ctrl)->slot_cap & PCI_EXP_SLTCAP_NCCS)
128 #define PSN(ctrl) ((ctrl)->slot_cap >> 19)
159 static inline const char *slot_name(
struct slot *
slot)
177 #define pciehp_firmware_init() do {} while (0)