Rev 1628 | Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1627 | serge | 1 | |
2 | |||
3 | struct resource *res; |
||
4 | // struct pci_dev *dev; |
||
5 | }; |
||
6 | |||
7 | enum acpi_bus_device_type { |
||
8 | |||
9 | ACPI_BUS_TYPE_POWER, |
||
10 | ACPI_BUS_TYPE_PROCESSOR, |
||
11 | ACPI_BUS_TYPE_THERMAL, |
||
12 | ACPI_BUS_TYPE_POWER_BUTTON, |
||
13 | ACPI_BUS_TYPE_SLEEP_BUTTON, |
||
14 | ACPI_BUS_DEVICE_TYPE_COUNT |
||
15 | }; |
||
16 | |||
17 | /* |
||
18 | |||
19 | * HIDs must conform to ACPI spec(6.1.4) |
||
20 | * KolibriOS specific HIDs do not apply to this and begin with KOS: |
||
21 | */ |
||
22 | |||
23 | |||
24 | |||
25 | |||
26 | #define ACPI_SYSTEM_HID "KLBSYSTM" |
||
27 | #define ACPI_THERMAL_HID "KLBTHERM" |
||
28 | #define ACPI_BUTTON_HID_POWERF "KLBPWRBN" |
||
29 | #define ACPI_BUTTON_HID_SLEEPF "KLBSLPBN" |
||
30 | #define ACPI_VIDEO_HID "KLBVIDEO" |
||
31 | #define ACPI_BAY_HID "KLBIOBAY" |
||
32 | #define ACPI_DOCK_HID "KLBDOCK" |
||
33 | /* Quirk for broken IBM BIOSes */ |
||
34 | #define ACPI_SMBUS_IBM_HID "SMBUSIBM" |
||
35 | |||
36 | |||
37 | |||
38 | |||
39 | u32_t acpi_op_add:1; |
||
40 | u32_t acpi_op_start:1; |
||
41 | }; |
||
42 | |||
43 | |||
44 | |||
45 | |||
46 | |||
47 | struct acpi_device_ids |
||
48 | |||
49 | u8 id[ACPI_ID_LEN]; |
||
50 | u32 driver_data; |
||
51 | }; |
||
52 | |||
53 | struct acpi_device_flags { |
||
54 | |||
55 | u32 bus_address:1; |
||
56 | u32 removable:1; |
||
57 | u32 ejectable:1; |
||
58 | u32 lockable:1; |
||
59 | u32 suprise_removal_ok:1; |
||
60 | u32 power_manageable:1; |
||
61 | u32 performance_manageable:1; |
||
62 | u32 wake_capable:1; /* Wakeup(_PRW) supported? */ |
||
63 | u32 force_power_state:1; |
||
64 | u32 reserved:22; |
||
65 | }; |
||
66 | |||
67 | struct acpi_device_status { |
||
68 | |||
69 | u32 enabled:1; |
||
70 | u32 show_in_ui:1; |
||
71 | u32 functional:1; |
||
72 | u32 battery_present:1; |
||
73 | u32 reserved:27; |
||
74 | }; |
||
75 | typedef char acpi_bus_id[8]; |
||
76 | typedef unsigned long acpi_bus_address; |
||
77 | typedef char acpi_device_name[40]; |
||
78 | typedef char acpi_device_class[20]; |
||
79 | |||
80 | |||
81 | |||
82 | |||
83 | acpi_bus_id bus_id; /* Object name */ |
||
84 | acpi_bus_address bus_address; /* _ADR */ |
||
85 | char *unique_id; /* _UID */ |
||
86 | struct list_head ids; /* _HID and _CIDs */ |
||
87 | acpi_device_name device_name; /* Driver-determined */ |
||
88 | acpi_device_class device_class; /* " */ |
||
89 | }; |
||
90 | |||
91 | |||
92 | |||
93 | |||
94 | int device_type; |
||
95 | ACPI_HANDLE handle; /* no handle for fixed hardware */ |
||
96 | struct acpi_device *parent; |
||
97 | struct list_head children; |
||
98 | struct list_head node; |
||
99 | // struct list_head wakeup_list; |
||
100 | struct acpi_device_status status; |
||
101 | struct acpi_device_flags flags; |
||
102 | struct acpi_device_pnp pnp; |
||
103 | // struct acpi_device_power power; |
||
104 | // struct acpi_device_wakeup wakeup; |
||
105 | // struct acpi_device_perf performance; |
||
106 | // struct acpi_device_dir dir; |
||
107 | // struct acpi_device_ops ops; |
||
108 | // struct acpi_driver *driver; |
||
109 | void *driver_data; |
||
110 | // struct device dev; |
||
111 | struct acpi_bus_ops bus_ops; /* workaround for different code path for hotplug */ |
||
112 | // enum acpi_bus_removal_type removal_type; /* indicate for different removal type */ |
||
113 | }; |
||
114 | |||
115 | |||
116 | |||
117 | |||
118 | |||
119 | char *acpi_device_hid(struct acpi_device *device); |
||
120 | #define acpi_device_name(d) ((d)->pnp.device_name) |
||
121 | #define acpi_device_class(d) ((d)->pnp.device_class) |
||
122 | |||
123 | int acpi_match_device_ids(struct acpi_device *device, |
||
124 | |||
125 | |||
126 | int acpi_pci_irq_add_prt(ACPI_HANDLE handle, struct pci_bus *bus); |
||
127 |