diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-06-03 17:12:20 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-06-03 17:12:20 -0400 |
commit | b04c58b1ed26317bfb4b33d3a2d16377fc6acd0f (patch) | |
tree | 8b6f65582a8fb3b70a07c16321969af1d06f7afc | |
parent | 864e055f44a5701cb033bf3afa2b6cc37ddba678 (diff) | |
parent | 48459340b92b00ae1a75179f168ef20d3e61f264 (diff) |
Merge branch 'acpi-enumeration'
* acpi-enumeration:
ACPI / scan: use platform bus type by default for _HID enumeration
ACPI / scan: always register ACPI LPSS scan handler
ACPI / scan: always register memory hotplug scan handler
ACPI / scan: always register container scan handler
ACPI / scan: Change the meaning of missing .attach() in scan handlers
ACPI / scan: introduce platform_id device PNP type flag
ACPI / scan: drop unsupported serial IDs from PNP ACPI scan handler ID list
ACPI / scan: drop IDs that do not comply with the ACPI PNP ID rule
ACPI / PNP: use device ID list for PNPACPI device enumeration
ACPI / scan: .match() callback for ACPI scan handlers
-rw-r--r-- | drivers/acpi/Makefile | 7 | ||||
-rw-r--r-- | drivers/acpi/acpi_cmos_rtc.c | 2 | ||||
-rw-r--r-- | drivers/acpi/acpi_lpss.c | 65 | ||||
-rw-r--r-- | drivers/acpi/acpi_memhotplug.c | 31 | ||||
-rw-r--r-- | drivers/acpi/acpi_platform.c | 44 | ||||
-rw-r--r-- | drivers/acpi/acpi_pnp.c | 395 | ||||
-rw-r--r-- | drivers/acpi/container.c | 15 | ||||
-rw-r--r-- | drivers/acpi/internal.h | 15 | ||||
-rw-r--r-- | drivers/acpi/scan.c | 56 | ||||
-rw-r--r-- | drivers/pnp/pnpacpi/core.c | 28 | ||||
-rw-r--r-- | include/acpi/acpi_bus.h | 4 | ||||
-rw-r--r-- | include/linux/acpi.h | 2 |
12 files changed, 556 insertions, 108 deletions
diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile index bce34afadcd0..ea55e0179f81 100644 --- a/drivers/acpi/Makefile +++ b/drivers/acpi/Makefile | |||
@@ -39,8 +39,9 @@ acpi-y += processor_core.o | |||
39 | acpi-y += ec.o | 39 | acpi-y += ec.o |
40 | acpi-$(CONFIG_ACPI_DOCK) += dock.o | 40 | acpi-$(CONFIG_ACPI_DOCK) += dock.o |
41 | acpi-y += pci_root.o pci_link.o pci_irq.o | 41 | acpi-y += pci_root.o pci_link.o pci_irq.o |
42 | acpi-$(CONFIG_X86_INTEL_LPSS) += acpi_lpss.o | 42 | acpi-y += acpi_lpss.o |
43 | acpi-y += acpi_platform.o | 43 | acpi-y += acpi_platform.o |
44 | acpi-y += acpi_pnp.o | ||
44 | acpi-y += power.o | 45 | acpi-y += power.o |
45 | acpi-y += event.o | 46 | acpi-y += event.o |
46 | acpi-y += sysfs.o | 47 | acpi-y += sysfs.o |
@@ -63,9 +64,9 @@ obj-$(CONFIG_ACPI_FAN) += fan.o | |||
63 | obj-$(CONFIG_ACPI_VIDEO) += video.o | 64 | obj-$(CONFIG_ACPI_VIDEO) += video.o |
64 | obj-$(CONFIG_ACPI_PCI_SLOT) += pci_slot.o | 65 | obj-$(CONFIG_ACPI_PCI_SLOT) += pci_slot.o |
65 | obj-$(CONFIG_ACPI_PROCESSOR) += processor.o | 66 | obj-$(CONFIG_ACPI_PROCESSOR) += processor.o |
66 | obj-$(CONFIG_ACPI_CONTAINER) += container.o | 67 | obj-y += container.o |
67 | obj-$(CONFIG_ACPI_THERMAL) += thermal.o | 68 | obj-$(CONFIG_ACPI_THERMAL) += thermal.o |
68 | obj-$(CONFIG_ACPI_HOTPLUG_MEMORY) += acpi_memhotplug.o | 69 | obj-y += acpi_memhotplug.o |
69 | obj-$(CONFIG_ACPI_BATTERY) += battery.o | 70 | obj-$(CONFIG_ACPI_BATTERY) += battery.o |
70 | obj-$(CONFIG_ACPI_SBS) += sbshc.o | 71 | obj-$(CONFIG_ACPI_SBS) += sbshc.o |
71 | obj-$(CONFIG_ACPI_SBS) += sbs.o | 72 | obj-$(CONFIG_ACPI_SBS) += sbs.o |
diff --git a/drivers/acpi/acpi_cmos_rtc.c b/drivers/acpi/acpi_cmos_rtc.c index 961b45d18a5d..2da8660262e5 100644 --- a/drivers/acpi/acpi_cmos_rtc.c +++ b/drivers/acpi/acpi_cmos_rtc.c | |||
@@ -68,7 +68,7 @@ static int acpi_install_cmos_rtc_space_handler(struct acpi_device *adev, | |||
68 | return -ENODEV; | 68 | return -ENODEV; |
69 | } | 69 | } |
70 | 70 | ||
71 | return 0; | 71 | return 1; |
72 | } | 72 | } |
73 | 73 | ||
74 | static void acpi_remove_cmos_rtc_space_handler(struct acpi_device *adev) | 74 | static void acpi_remove_cmos_rtc_space_handler(struct acpi_device *adev) |
diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c index db362a96c38e..51069b260518 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c | |||
@@ -25,6 +25,10 @@ | |||
25 | 25 | ||
26 | ACPI_MODULE_NAME("acpi_lpss"); | 26 | ACPI_MODULE_NAME("acpi_lpss"); |
27 | 27 | ||
28 | #ifdef CONFIG_X86_INTEL_LPSS | ||
29 | |||
30 | #define LPSS_ADDR(desc) ((unsigned long)&desc) | ||
31 | |||
28 | #define LPSS_CLK_SIZE 0x04 | 32 | #define LPSS_CLK_SIZE 0x04 |
29 | #define LPSS_LTR_SIZE 0x18 | 33 | #define LPSS_LTR_SIZE 0x18 |
30 | 34 | ||
@@ -169,40 +173,48 @@ static struct lpss_device_desc byt_i2c_dev_desc = { | |||
169 | .shared_clock = &i2c_clock, | 173 | .shared_clock = &i2c_clock, |
170 | }; | 174 | }; |
171 | 175 | ||
176 | #else | ||
177 | |||
178 | #define LPSS_ADDR(desc) (0UL) | ||
179 | |||
180 | #endif /* CONFIG_X86_INTEL_LPSS */ | ||
181 | |||
172 | static const struct acpi_device_id acpi_lpss_device_ids[] = { | 182 | static const struct acpi_device_id acpi_lpss_device_ids[] = { |
173 | /* Generic LPSS devices */ | 183 | /* Generic LPSS devices */ |
174 | { "INTL9C60", (unsigned long)&lpss_dma_desc }, | 184 | { "INTL9C60", LPSS_ADDR(lpss_dma_desc) }, |
175 | 185 | ||
176 | /* Lynxpoint LPSS devices */ | 186 | /* Lynxpoint LPSS devices */ |
177 | { "INT33C0", (unsigned long)&lpt_dev_desc }, | 187 | { "INT33C0", LPSS_ADDR(lpt_dev_desc) }, |
178 | { "INT33C1", (unsigned long)&lpt_dev_desc }, | 188 | { "INT33C1", LPSS_ADDR(lpt_dev_desc) }, |
179 | { "INT33C2", (unsigned long)&lpt_i2c_dev_desc }, | 189 | { "INT33C2", LPSS_ADDR(lpt_i2c_dev_desc) }, |
180 | { "INT33C3", (unsigned long)&lpt_i2c_dev_desc }, | 190 | { "INT33C3", LPSS_ADDR(lpt_i2c_dev_desc) }, |
181 | { "INT33C4", (unsigned long)&lpt_uart_dev_desc }, | 191 | { "INT33C4", LPSS_ADDR(lpt_uart_dev_desc) }, |
182 | { "INT33C5", (unsigned long)&lpt_uart_dev_desc }, | 192 | { "INT33C5", LPSS_ADDR(lpt_uart_dev_desc) }, |
183 | { "INT33C6", (unsigned long)&lpt_sdio_dev_desc }, | 193 | { "INT33C6", LPSS_ADDR(lpt_sdio_dev_desc) }, |
184 | { "INT33C7", }, | 194 | { "INT33C7", }, |
185 | 195 | ||
186 | /* BayTrail LPSS devices */ | 196 | /* BayTrail LPSS devices */ |
187 | { "80860F09", (unsigned long)&byt_pwm_dev_desc }, | 197 | { "80860F09", LPSS_ADDR(byt_pwm_dev_desc) }, |
188 | { "80860F0A", (unsigned long)&byt_uart_dev_desc }, | 198 | { "80860F0A", LPSS_ADDR(byt_uart_dev_desc) }, |
189 | { "80860F0E", (unsigned long)&byt_spi_dev_desc }, | 199 | { "80860F0E", LPSS_ADDR(byt_spi_dev_desc) }, |
190 | { "80860F14", (unsigned long)&byt_sdio_dev_desc }, | 200 | { "80860F14", LPSS_ADDR(byt_sdio_dev_desc) }, |
191 | { "80860F41", (unsigned long)&byt_i2c_dev_desc }, | 201 | { "80860F41", LPSS_ADDR(byt_i2c_dev_desc) }, |
192 | { "INT33B2", }, | 202 | { "INT33B2", }, |
193 | 203 | ||
194 | { "INT3430", (unsigned long)&lpt_dev_desc }, | 204 | { "INT3430", LPSS_ADDR(lpt_dev_desc) }, |
195 | { "INT3431", (unsigned long)&lpt_dev_desc }, | 205 | { "INT3431", LPSS_ADDR(lpt_dev_desc) }, |
196 | { "INT3432", (unsigned long)&lpt_i2c_dev_desc }, | 206 | { "INT3432", LPSS_ADDR(lpt_i2c_dev_desc) }, |
197 | { "INT3433", (unsigned long)&lpt_i2c_dev_desc }, | 207 | { "INT3433", LPSS_ADDR(lpt_i2c_dev_desc) }, |
198 | { "INT3434", (unsigned long)&lpt_uart_dev_desc }, | 208 | { "INT3434", LPSS_ADDR(lpt_uart_dev_desc) }, |
199 | { "INT3435", (unsigned long)&lpt_uart_dev_desc }, | 209 | { "INT3435", LPSS_ADDR(lpt_uart_dev_desc) }, |
200 | { "INT3436", (unsigned long)&lpt_sdio_dev_desc }, | 210 | { "INT3436", LPSS_ADDR(lpt_sdio_dev_desc) }, |
201 | { "INT3437", }, | 211 | { "INT3437", }, |
202 | 212 | ||
203 | { } | 213 | { } |
204 | }; | 214 | }; |
205 | 215 | ||
216 | #ifdef CONFIG_X86_INTEL_LPSS | ||
217 | |||
206 | static int is_memory(struct acpi_resource *res, void *not_used) | 218 | static int is_memory(struct acpi_resource *res, void *not_used) |
207 | { | 219 | { |
208 | struct resource r; | 220 | struct resource r; |
@@ -695,3 +707,16 @@ void __init acpi_lpss_init(void) | |||
695 | acpi_scan_add_handler(&lpss_handler); | 707 | acpi_scan_add_handler(&lpss_handler); |
696 | } | 708 | } |
697 | } | 709 | } |
710 | |||
711 | #else | ||
712 | |||
713 | static struct acpi_scan_handler lpss_handler = { | ||
714 | .ids = acpi_lpss_device_ids, | ||
715 | }; | ||
716 | |||
717 | void __init acpi_lpss_init(void) | ||
718 | { | ||
719 | acpi_scan_add_handler(&lpss_handler); | ||
720 | } | ||
721 | |||
722 | #endif /* CONFIG_X86_INTEL_LPSS */ | ||
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index b67be85ff0fc..23e2319ead41 100644 --- a/drivers/acpi/acpi_memhotplug.c +++ b/drivers/acpi/acpi_memhotplug.c | |||
@@ -44,6 +44,13 @@ | |||
44 | 44 | ||
45 | ACPI_MODULE_NAME("acpi_memhotplug"); | 45 | ACPI_MODULE_NAME("acpi_memhotplug"); |
46 | 46 | ||
47 | static const struct acpi_device_id memory_device_ids[] = { | ||
48 | {ACPI_MEMORY_DEVICE_HID, 0}, | ||
49 | {"", 0}, | ||
50 | }; | ||
51 | |||
52 | #ifdef CONFIG_ACPI_HOTPLUG_MEMORY | ||
53 | |||
47 | /* Memory Device States */ | 54 | /* Memory Device States */ |
48 | #define MEMORY_INVALID_STATE 0 | 55 | #define MEMORY_INVALID_STATE 0 |
49 | #define MEMORY_POWER_ON_STATE 1 | 56 | #define MEMORY_POWER_ON_STATE 1 |
@@ -53,11 +60,6 @@ static int acpi_memory_device_add(struct acpi_device *device, | |||
53 | const struct acpi_device_id *not_used); | 60 | const struct acpi_device_id *not_used); |
54 | static void acpi_memory_device_remove(struct acpi_device *device); | 61 | static void acpi_memory_device_remove(struct acpi_device *device); |
55 | 62 | ||
56 | static const struct acpi_device_id memory_device_ids[] = { | ||
57 | {ACPI_MEMORY_DEVICE_HID, 0}, | ||
58 | {"", 0}, | ||
59 | }; | ||
60 | |||
61 | static struct acpi_scan_handler memory_device_handler = { | 63 | static struct acpi_scan_handler memory_device_handler = { |
62 | .ids = memory_device_ids, | 64 | .ids = memory_device_ids, |
63 | .attach = acpi_memory_device_add, | 65 | .attach = acpi_memory_device_add, |
@@ -364,9 +366,11 @@ static bool __initdata acpi_no_memhotplug; | |||
364 | 366 | ||
365 | void __init acpi_memory_hotplug_init(void) | 367 | void __init acpi_memory_hotplug_init(void) |
366 | { | 368 | { |
367 | if (acpi_no_memhotplug) | 369 | if (acpi_no_memhotplug) { |
370 | memory_device_handler.attach = NULL; | ||
371 | acpi_scan_add_handler(&memory_device_handler); | ||
368 | return; | 372 | return; |
369 | 373 | } | |
370 | acpi_scan_add_handler_with_hotplug(&memory_device_handler, "memory"); | 374 | acpi_scan_add_handler_with_hotplug(&memory_device_handler, "memory"); |
371 | } | 375 | } |
372 | 376 | ||
@@ -376,3 +380,16 @@ static int __init disable_acpi_memory_hotplug(char *str) | |||
376 | return 1; | 380 | return 1; |
377 | } | 381 | } |
378 | __setup("acpi_no_memhotplug", disable_acpi_memory_hotplug); | 382 | __setup("acpi_no_memhotplug", disable_acpi_memory_hotplug); |
383 | |||
384 | #else | ||
385 | |||
386 | static struct acpi_scan_handler memory_device_handler = { | ||
387 | .ids = memory_device_ids, | ||
388 | }; | ||
389 | |||
390 | void __init acpi_memory_hotplug_init(void) | ||
391 | { | ||
392 | acpi_scan_add_handler(&memory_device_handler); | ||
393 | } | ||
394 | |||
395 | #endif /* CONFIG_ACPI_HOTPLUG_MEMORY */ | ||
diff --git a/drivers/acpi/acpi_platform.c b/drivers/acpi/acpi_platform.c index 3bb89def2292..2bf9082f7523 100644 --- a/drivers/acpi/acpi_platform.c +++ b/drivers/acpi/acpi_platform.c | |||
@@ -22,25 +22,11 @@ | |||
22 | 22 | ||
23 | ACPI_MODULE_NAME("platform"); | 23 | ACPI_MODULE_NAME("platform"); |
24 | 24 | ||
25 | /* | 25 | static const struct acpi_device_id forbidden_id_list[] = { |
26 | * The following ACPI IDs are known to be suitable for representing as | 26 | {"PNP0000", 0}, /* PIC */ |
27 | * platform devices. | 27 | {"PNP0100", 0}, /* Timer */ |
28 | */ | 28 | {"PNP0200", 0}, /* AT DMA Controller */ |
29 | static const struct acpi_device_id acpi_platform_device_ids[] = { | 29 | {"", 0}, |
30 | |||
31 | { "PNP0D40" }, | ||
32 | { "VPC2004" }, | ||
33 | { "BCM4752" }, | ||
34 | { "LNV4752" }, | ||
35 | { "BCM2E1A" }, | ||
36 | { "BCM2E39" }, | ||
37 | { "BCM2E3D" }, | ||
38 | |||
39 | /* Intel Smart Sound Technology */ | ||
40 | { "INT33C8" }, | ||
41 | { "80860F28" }, | ||
42 | |||
43 | { } | ||
44 | }; | 30 | }; |
45 | 31 | ||
46 | /** | 32 | /** |
@@ -67,6 +53,9 @@ struct platform_device *acpi_create_platform_device(struct acpi_device *adev) | |||
67 | if (adev->physical_node_count) | 53 | if (adev->physical_node_count) |
68 | return NULL; | 54 | return NULL; |
69 | 55 | ||
56 | if (!acpi_match_device_ids(adev, forbidden_id_list)) | ||
57 | return ERR_PTR(-EINVAL); | ||
58 | |||
70 | INIT_LIST_HEAD(&resource_list); | 59 | INIT_LIST_HEAD(&resource_list); |
71 | count = acpi_dev_get_resources(adev, &resource_list, NULL, NULL); | 60 | count = acpi_dev_get_resources(adev, &resource_list, NULL, NULL); |
72 | if (count < 0) { | 61 | if (count < 0) { |
@@ -124,20 +113,3 @@ struct platform_device *acpi_create_platform_device(struct acpi_device *adev) | |||
124 | kfree(resources); | 113 | kfree(resources); |
125 | return pdev; | 114 | return pdev; |
126 | } | 115 | } |
127 | |||
128 | static int acpi_platform_attach(struct acpi_device *adev, | ||
129 | const struct acpi_device_id *id) | ||
130 | { | ||
131 | acpi_create_platform_device(adev); | ||
132 | return 1; | ||
133 | } | ||
134 | |||
135 | static struct acpi_scan_handler platform_handler = { | ||
136 | .ids = acpi_platform_device_ids, | ||
137 | .attach = acpi_platform_attach, | ||
138 | }; | ||
139 | |||
140 | void __init acpi_platform_init(void) | ||
141 | { | ||
142 | acpi_scan_add_handler(&platform_handler); | ||
143 | } | ||
diff --git a/drivers/acpi/acpi_pnp.c b/drivers/acpi/acpi_pnp.c new file mode 100644 index 000000000000..6703c1fd993a --- /dev/null +++ b/drivers/acpi/acpi_pnp.c | |||
@@ -0,0 +1,395 @@ | |||
1 | /* | ||
2 | * ACPI support for PNP bus type | ||
3 | * | ||
4 | * Copyright (C) 2014, Intel Corporation | ||
5 | * Authors: Zhang Rui <rui.zhang@intel.com> | ||
6 | * Rafael J. Wysocki <rafael.j.wysocki@intel.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/acpi.h> | ||
14 | #include <linux/module.h> | ||
15 | |||
16 | static const struct acpi_device_id acpi_pnp_device_ids[] = { | ||
17 | /* pata_isapnp */ | ||
18 | {"PNP0600"}, /* Generic ESDI/IDE/ATA compatible hard disk controller */ | ||
19 | /* floppy */ | ||
20 | {"PNP0700"}, | ||
21 | /* ipmi_si */ | ||
22 | {"IPI0001"}, | ||
23 | /* tpm_inf_pnp */ | ||
24 | {"IFX0101"}, /* Infineon TPMs */ | ||
25 | {"IFX0102"}, /* Infineon TPMs */ | ||
26 | /*tpm_tis */ | ||
27 | {"PNP0C31"}, /* TPM */ | ||
28 | {"ATM1200"}, /* Atmel */ | ||
29 | {"IFX0102"}, /* Infineon */ | ||
30 | {"BCM0101"}, /* Broadcom */ | ||
31 | {"BCM0102"}, /* Broadcom */ | ||
32 | {"NSC1200"}, /* National */ | ||
33 | {"ICO0102"}, /* Intel */ | ||
34 | /* ide */ | ||
35 | {"PNP0600"}, /* Generic ESDI/IDE/ATA compatible hard disk controller */ | ||
36 | /* ns558 */ | ||
37 | {"ASB16fd"}, /* AdLib NSC16 */ | ||
38 | {"AZT3001"}, /* AZT1008 */ | ||
39 | {"CDC0001"}, /* Opl3-SAx */ | ||
40 | {"CSC0001"}, /* CS4232 */ | ||
41 | {"CSC000f"}, /* CS4236 */ | ||
42 | {"CSC0101"}, /* CS4327 */ | ||
43 | {"CTL7001"}, /* SB16 */ | ||
44 | {"CTL7002"}, /* AWE64 */ | ||
45 | {"CTL7005"}, /* Vibra16 */ | ||
46 | {"ENS2020"}, /* SoundscapeVIVO */ | ||
47 | {"ESS0001"}, /* ES1869 */ | ||
48 | {"ESS0005"}, /* ES1878 */ | ||
49 | {"ESS6880"}, /* ES688 */ | ||
50 | {"IBM0012"}, /* CS4232 */ | ||
51 | {"OPT0001"}, /* OPTi Audio16 */ | ||
52 | {"YMH0006"}, /* Opl3-SA */ | ||
53 | {"YMH0022"}, /* Opl3-SAx */ | ||
54 | {"PNPb02f"}, /* Generic */ | ||
55 | /* i8042 kbd */ | ||
56 | {"PNP0300"}, | ||
57 | {"PNP0301"}, | ||
58 | {"PNP0302"}, | ||
59 | {"PNP0303"}, | ||
60 | {"PNP0304"}, | ||
61 | {"PNP0305"}, | ||
62 | {"PNP0306"}, | ||
63 | {"PNP0309"}, | ||
64 | {"PNP030a"}, | ||
65 | {"PNP030b"}, | ||
66 | {"PNP0320"}, | ||
67 | {"PNP0343"}, | ||
68 | {"PNP0344"}, | ||
69 | {"PNP0345"}, | ||
70 | {"CPQA0D7"}, | ||
71 | /* i8042 aux */ | ||
72 | {"AUI0200"}, | ||
73 | {"FJC6000"}, | ||
74 | {"FJC6001"}, | ||
75 | {"PNP0f03"}, | ||
76 | {"PNP0f0b"}, | ||
77 | {"PNP0f0e"}, | ||
78 | {"PNP0f12"}, | ||
79 | {"PNP0f13"}, | ||
80 | {"PNP0f19"}, | ||
81 | {"PNP0f1c"}, | ||
82 | {"SYN0801"}, | ||
83 | /* fcpnp */ | ||
84 | {"AVM0900"}, | ||
85 | /* radio-cadet */ | ||
86 | {"MSM0c24"}, /* ADS Cadet AM/FM Radio Card */ | ||
87 | /* radio-gemtek */ | ||
88 | {"ADS7183"}, /* AOpen FX-3D/Pro Radio */ | ||
89 | /* radio-sf16fmr2 */ | ||
90 | {"MFRad13"}, /* tuner subdevice of SF16-FMD2 */ | ||
91 | /* ene_ir */ | ||
92 | {"ENE0100"}, | ||
93 | {"ENE0200"}, | ||
94 | {"ENE0201"}, | ||
95 | {"ENE0202"}, | ||
96 | /* fintek-cir */ | ||
97 | {"FIT0002"}, /* CIR */ | ||
98 | /* ite-cir */ | ||
99 | {"ITE8704"}, /* Default model */ | ||
100 | {"ITE8713"}, /* CIR found in EEEBox 1501U */ | ||
101 | {"ITE8708"}, /* Bridged IT8512 */ | ||
102 | {"ITE8709"}, /* SRAM-Bridged IT8512 */ | ||
103 | /* nuvoton-cir */ | ||
104 | {"WEC0530"}, /* CIR */ | ||
105 | {"NTN0530"}, /* CIR for new chip's pnp id */ | ||
106 | /* Winbond CIR */ | ||
107 | {"WEC1022"}, | ||
108 | /* wbsd */ | ||
109 | {"WEC0517"}, | ||
110 | {"WEC0518"}, | ||
111 | /* Winbond CIR */ | ||
112 | {"TCM5090"}, /* 3Com Etherlink III (TP) */ | ||
113 | {"TCM5091"}, /* 3Com Etherlink III */ | ||
114 | {"TCM5094"}, /* 3Com Etherlink III (combo) */ | ||
115 | {"TCM5095"}, /* 3Com Etherlink III (TPO) */ | ||
116 | {"TCM5098"}, /* 3Com Etherlink III (TPC) */ | ||
117 | {"PNP80f7"}, /* 3Com Etherlink III compatible */ | ||
118 | {"PNP80f8"}, /* 3Com Etherlink III compatible */ | ||
119 | /* nsc-ircc */ | ||
120 | {"NSC6001"}, | ||
121 | {"HWPC224"}, | ||
122 | {"IBM0071"}, | ||
123 | /* smsc-ircc2 */ | ||
124 | {"SMCf010"}, | ||
125 | /* sb1000 */ | ||
126 | {"GIC1000"}, | ||
127 | /* parport_pc */ | ||
128 | {"PNP0400"}, /* Standard LPT Printer Port */ | ||
129 | {"PNP0401"}, /* ECP Printer Port */ | ||
130 | /* apple-gmux */ | ||
131 | {"APP000B"}, | ||
132 | /* fujitsu-laptop.c */ | ||
133 | {"FUJ02bf"}, | ||
134 | {"FUJ02B1"}, | ||
135 | {"FUJ02E3"}, | ||
136 | /* system */ | ||
137 | {"PNP0c02"}, /* General ID for reserving resources */ | ||
138 | {"PNP0c01"}, /* memory controller */ | ||
139 | /* rtc_cmos */ | ||
140 | {"PNP0b00"}, | ||
141 | {"PNP0b01"}, | ||
142 | {"PNP0b02"}, | ||
143 | /* c6xdigio */ | ||
144 | {"PNP0400"}, /* Standard LPT Printer Port */ | ||
145 | {"PNP0401"}, /* ECP Printer Port */ | ||
146 | /* ni_atmio.c */ | ||
147 | {"NIC1900"}, | ||
148 | {"NIC2400"}, | ||
149 | {"NIC2500"}, | ||
150 | {"NIC2600"}, | ||
151 | {"NIC2700"}, | ||
152 | /* serial */ | ||
153 | {"AAC000F"}, /* Archtek America Corp. Archtek SmartLink Modem 3334BT Plug & Play */ | ||
154 | {"ADC0001"}, /* Anchor Datacomm BV. SXPro 144 External Data Fax Modem Plug & Play */ | ||
155 | {"ADC0002"}, /* SXPro 288 External Data Fax Modem Plug & Play */ | ||
156 | {"AEI0250"}, /* PROLiNK 1456VH ISA PnP K56flex Fax Modem */ | ||
157 | {"AEI1240"}, /* Actiontec ISA PNP 56K X2 Fax Modem */ | ||
158 | {"AKY1021"}, /* Rockwell 56K ACF II Fax+Data+Voice Modem */ | ||
159 | {"AZT4001"}, /* AZT3005 PnP SOUND DEVICE */ | ||
160 | {"BDP3336"}, /* Best Data Products Inc. Smart One 336F PnP Modem */ | ||
161 | {"BRI0A49"}, /* Boca Complete Ofc Communicator 14.4 Data-FAX */ | ||
162 | {"BRI1400"}, /* Boca Research 33,600 ACF Modem */ | ||
163 | {"BRI3400"}, /* Boca 33.6 Kbps Internal FD34FSVD */ | ||
164 | {"BRI0A49"}, /* Boca 33.6 Kbps Internal FD34FSVD */ | ||
165 | {"BDP3336"}, /* Best Data Products Inc. Smart One 336F PnP Modem */ | ||
166 | {"CPI4050"}, /* Computer Peripherals Inc. EuroViVa CommCenter-33.6 SP PnP */ | ||
167 | {"CTL3001"}, /* Creative Labs Phone Blaster 28.8 DSVD PnP Voice */ | ||
168 | {"CTL3011"}, /* Creative Labs Modem Blaster 28.8 DSVD PnP Voice */ | ||
169 | {"DAV0336"}, /* Davicom ISA 33.6K Modem */ | ||
170 | {"DMB1032"}, /* Creative Modem Blaster Flash56 DI5601-1 */ | ||
171 | {"DMB2001"}, /* Creative Modem Blaster V.90 DI5660 */ | ||
172 | {"ETT0002"}, /* E-Tech CyberBULLET PC56RVP */ | ||
173 | {"FUJ0202"}, /* Fujitsu 33600 PnP-I2 R Plug & Play */ | ||
174 | {"FUJ0205"}, /* Fujitsu FMV-FX431 Plug & Play */ | ||
175 | {"FUJ0206"}, /* Fujitsu 33600 PnP-I4 R Plug & Play */ | ||
176 | {"FUJ0209"}, /* Fujitsu Fax Voice 33600 PNP-I5 R Plug & Play */ | ||
177 | {"GVC000F"}, /* Archtek SmartLink Modem 3334BT Plug & Play */ | ||
178 | {"GVC0303"}, /* Archtek SmartLink Modem 3334BRV 33.6K Data Fax Voice */ | ||
179 | {"HAY0001"}, /* Hayes Optima 288 V.34-V.FC + FAX + Voice Plug & Play */ | ||
180 | {"HAY000C"}, /* Hayes Optima 336 V.34 + FAX + Voice PnP */ | ||
181 | {"HAY000D"}, /* Hayes Optima 336B V.34 + FAX + Voice PnP */ | ||
182 | {"HAY5670"}, /* Hayes Accura 56K Ext Fax Modem PnP */ | ||
183 | {"HAY5674"}, /* Hayes Accura 56K Ext Fax Modem PnP */ | ||
184 | {"HAY5675"}, /* Hayes Accura 56K Fax Modem PnP */ | ||
185 | {"HAYF000"}, /* Hayes 288, V.34 + FAX */ | ||
186 | {"HAYF001"}, /* Hayes Optima 288 V.34 + FAX + Voice, Plug & Play */ | ||
187 | {"IBM0033"}, /* IBM Thinkpad 701 Internal Modem Voice */ | ||
188 | {"PNP4972"}, /* Intermec CV60 touchscreen port */ | ||
189 | {"IXDC801"}, /* Intertex 28k8 33k6 Voice EXT PnP */ | ||
190 | {"IXDC901"}, /* Intertex 33k6 56k Voice EXT PnP */ | ||
191 | {"IXDD801"}, /* Intertex 28k8 33k6 Voice SP EXT PnP */ | ||
192 | {"IXDD901"}, /* Intertex 33k6 56k Voice SP EXT PnP */ | ||
193 | {"IXDF401"}, /* Intertex 28k8 33k6 Voice SP INT PnP */ | ||
194 | {"IXDF801"}, /* Intertex 28k8 33k6 Voice SP EXT PnP */ | ||
195 | {"IXDF901"}, /* Intertex 33k6 56k Voice SP EXT PnP */ | ||
196 | {"KOR4522"}, /* KORTEX 28800 Externe PnP */ | ||
197 | {"KORF661"}, /* KXPro 33.6 Vocal ASVD PnP */ | ||
198 | {"LAS4040"}, /* LASAT Internet 33600 PnP */ | ||
199 | {"LAS4540"}, /* Lasat Safire 560 PnP */ | ||
200 | {"LAS5440"}, /* Lasat Safire 336 PnP */ | ||
201 | {"MNP0281"}, /* Microcom TravelPorte FAST V.34 Plug & Play */ | ||
202 | {"MNP0336"}, /* Microcom DeskPorte V.34 FAST or FAST+ Plug & Play */ | ||
203 | {"MNP0339"}, /* Microcom DeskPorte FAST EP 28.8 Plug & Play */ | ||
204 | {"MNP0342"}, /* Microcom DeskPorte 28.8P Plug & Play */ | ||
205 | {"MNP0500"}, /* Microcom DeskPorte FAST ES 28.8 Plug & Play */ | ||
206 | {"MNP0501"}, /* Microcom DeskPorte FAST ES 28.8 Plug & Play */ | ||
207 | {"MNP0502"}, /* Microcom DeskPorte 28.8S Internal Plug & Play */ | ||
208 | {"MOT1105"}, /* Motorola BitSURFR Plug & Play */ | ||
209 | {"MOT1111"}, /* Motorola TA210 Plug & Play */ | ||
210 | {"MOT1114"}, /* Motorola HMTA 200 (ISDN) Plug & Play */ | ||
211 | {"MOT1115"}, /* Motorola BitSURFR Plug & Play */ | ||
212 | {"MOT1190"}, /* Motorola Lifestyle 28.8 Internal */ | ||
213 | {"MOT1501"}, /* Motorola V.3400 Plug & Play */ | ||
214 | {"MOT1502"}, /* Motorola Lifestyle 28.8 V.34 Plug & Play */ | ||
215 | {"MOT1505"}, /* Motorola Power 28.8 V.34 Plug & Play */ | ||
216 | {"MOT1509"}, /* Motorola ModemSURFR External 28.8 Plug & Play */ | ||
217 | {"MOT150A"}, /* Motorola Premier 33.6 Desktop Plug & Play */ | ||
218 | {"MOT150F"}, /* Motorola VoiceSURFR 56K External PnP */ | ||
219 | {"MOT1510"}, /* Motorola ModemSURFR 56K External PnP */ | ||
220 | {"MOT1550"}, /* Motorola ModemSURFR 56K Internal PnP */ | ||
221 | {"MOT1560"}, /* Motorola ModemSURFR Internal 28.8 Plug & Play */ | ||
222 | {"MOT1580"}, /* Motorola Premier 33.6 Internal Plug & Play */ | ||
223 | {"MOT15B0"}, /* Motorola OnlineSURFR 28.8 Internal Plug & Play */ | ||
224 | {"MOT15F0"}, /* Motorola VoiceSURFR 56K Internal PnP */ | ||
225 | {"MVX00A1"}, /* Deskline K56 Phone System PnP */ | ||
226 | {"MVX00F2"}, /* PC Rider K56 Phone System PnP */ | ||
227 | {"nEC8241"}, /* NEC 98NOTE SPEAKER PHONE FAX MODEM(33600bps) */ | ||
228 | {"PMC2430"}, /* Pace 56 Voice Internal Plug & Play Modem */ | ||
229 | {"PNP0500"}, /* Generic standard PC COM port */ | ||
230 | {"PNP0501"}, /* Generic 16550A-compatible COM port */ | ||
231 | {"PNPC000"}, /* Compaq 14400 Modem */ | ||
232 | {"PNPC001"}, /* Compaq 2400/9600 Modem */ | ||
233 | {"PNPC031"}, /* Dial-Up Networking Serial Cable between 2 PCs */ | ||
234 | {"PNPC032"}, /* Dial-Up Networking Parallel Cable between 2 PCs */ | ||
235 | {"PNPC100"}, /* Standard 9600 bps Modem */ | ||
236 | {"PNPC101"}, /* Standard 14400 bps Modem */ | ||
237 | {"PNPC102"}, /* Standard 28800 bps Modem */ | ||
238 | {"PNPC103"}, /* Standard Modem */ | ||
239 | {"PNPC104"}, /* Standard 9600 bps Modem */ | ||
240 | {"PNPC105"}, /* Standard 14400 bps Modem */ | ||
241 | {"PNPC106"}, /* Standard 28800 bps Modem */ | ||
242 | {"PNPC107"}, /* Standard Modem */ | ||
243 | {"PNPC108"}, /* Standard 9600 bps Modem */ | ||
244 | {"PNPC109"}, /* Standard 14400 bps Modem */ | ||
245 | {"PNPC10A"}, /* Standard 28800 bps Modem */ | ||
246 | {"PNPC10B"}, /* Standard Modem */ | ||
247 | {"PNPC10C"}, /* Standard 9600 bps Modem */ | ||
248 | {"PNPC10D"}, /* Standard 14400 bps Modem */ | ||
249 | {"PNPC10E"}, /* Standard 28800 bps Modem */ | ||
250 | {"PNPC10F"}, /* Standard Modem */ | ||
251 | {"PNP2000"}, /* Standard PCMCIA Card Modem */ | ||
252 | {"ROK0030"}, /* Rockwell 33.6 DPF Internal PnP, Modular Technology 33.6 Internal PnP */ | ||
253 | {"ROK0100"}, /* KORTEX 14400 Externe PnP */ | ||
254 | {"ROK4120"}, /* Rockwell 28.8 */ | ||
255 | {"ROK4920"}, /* Viking 28.8 INTERNAL Fax+Data+Voice PnP */ | ||
256 | {"RSS00A0"}, /* Rockwell 33.6 DPF External PnP, BT Prologue 33.6 External PnP, Modular Technology 33.6 External PnP */ | ||
257 | {"RSS0262"}, /* Viking 56K FAX INT */ | ||
258 | {"RSS0250"}, /* K56 par,VV,Voice,Speakphone,AudioSpan,PnP */ | ||
259 | {"SUP1310"}, /* SupraExpress 28.8 Data/Fax PnP modem */ | ||
260 | {"SUP1381"}, /* SupraExpress 336i PnP Voice Modem */ | ||
261 | {"SUP1421"}, /* SupraExpress 33.6 Data/Fax PnP modem */ | ||
262 | {"SUP1590"}, /* SupraExpress 33.6 Data/Fax PnP modem */ | ||
263 | {"SUP1620"}, /* SupraExpress 336i Sp ASVD */ | ||
264 | {"SUP1760"}, /* SupraExpress 33.6 Data/Fax PnP modem */ | ||
265 | {"SUP2171"}, /* SupraExpress 56i Sp Intl */ | ||
266 | {"TEX0011"}, /* Phoebe Micro 33.6 Data Fax 1433VQH Plug & Play */ | ||
267 | {"UAC000F"}, /* Archtek SmartLink Modem 3334BT Plug & Play */ | ||
268 | {"USR0000"}, /* 3Com Corp. Gateway Telepath IIvi 33.6 */ | ||
269 | {"USR0002"}, /* U.S. Robotics Sporster 33.6K Fax INT PnP */ | ||
270 | {"USR0004"}, /* Sportster Vi 14.4 PnP FAX Voicemail */ | ||
271 | {"USR0006"}, /* U.S. Robotics 33.6K Voice INT PnP */ | ||
272 | {"USR0007"}, /* U.S. Robotics 33.6K Voice EXT PnP */ | ||
273 | {"USR0009"}, /* U.S. Robotics Courier V.Everything INT PnP */ | ||
274 | {"USR2002"}, /* U.S. Robotics 33.6K Voice INT PnP */ | ||
275 | {"USR2070"}, /* U.S. Robotics 56K Voice INT PnP */ | ||
276 | {"USR2080"}, /* U.S. Robotics 56K Voice EXT PnP */ | ||
277 | {"USR3031"}, /* U.S. Robotics 56K FAX INT */ | ||
278 | {"USR3050"}, /* U.S. Robotics 56K FAX INT */ | ||
279 | {"USR3070"}, /* U.S. Robotics 56K Voice INT PnP */ | ||
280 | {"USR3080"}, /* U.S. Robotics 56K Voice EXT PnP */ | ||
281 | {"USR3090"}, /* U.S. Robotics 56K Voice INT PnP */ | ||
282 | {"USR9100"}, /* U.S. Robotics 56K Message */ | ||
283 | {"USR9160"}, /* U.S. Robotics 56K FAX EXT PnP */ | ||
284 | {"USR9170"}, /* U.S. Robotics 56K FAX INT PnP */ | ||
285 | {"USR9180"}, /* U.S. Robotics 56K Voice EXT PnP */ | ||
286 | {"USR9190"}, /* U.S. Robotics 56K Voice INT PnP */ | ||
287 | {"WACFXXX"}, /* Wacom tablets */ | ||
288 | {"FPI2002"}, /* Compaq touchscreen */ | ||
289 | {"FUJ02B2"}, /* Fujitsu Stylistic touchscreens */ | ||
290 | {"FUJ02B3"}, | ||
291 | {"FUJ02B4"}, /* Fujitsu Stylistic LT touchscreens */ | ||
292 | {"FUJ02B6"}, /* Passive Fujitsu Stylistic touchscreens */ | ||
293 | {"FUJ02B7"}, | ||
294 | {"FUJ02B8"}, | ||
295 | {"FUJ02B9"}, | ||
296 | {"FUJ02BC"}, | ||
297 | {"FUJ02E5"}, /* Fujitsu Wacom Tablet PC device */ | ||
298 | {"FUJ02E6"}, /* Fujitsu P-series tablet PC device */ | ||
299 | {"FUJ02E7"}, /* Fujitsu Wacom 2FGT Tablet PC device */ | ||
300 | {"FUJ02E9"}, /* Fujitsu Wacom 1FGT Tablet PC device */ | ||
301 | {"LTS0001"}, /* LG C1 EXPRESS DUAL (C1-PB11A3) touch screen (actually a FUJ02E6 in disguise) */ | ||
302 | {"WCI0003"}, /* Rockwell's (PORALiNK) 33600 INT PNP */ | ||
303 | {"WEC1022"}, /* Winbond CIR port, should not be probed. We should keep track of it to prevent the legacy serial driver from probing it */ | ||
304 | /* scl200wdt */ | ||
305 | {"NSC0800"}, /* National Semiconductor PC87307/PC97307 watchdog component */ | ||
306 | /* mpu401 */ | ||
307 | {"PNPb006"}, | ||
308 | /* cs423x-pnpbios */ | ||
309 | {"CSC0100"}, | ||
310 | {"CSC0000"}, | ||
311 | {"GIM0100"}, /* Guillemot Turtlebeach something appears to be cs4232 compatible */ | ||
312 | /* es18xx-pnpbios */ | ||
313 | {"ESS1869"}, | ||
314 | {"ESS1879"}, | ||
315 | /* snd-opl3sa2-pnpbios */ | ||
316 | {"YMH0021"}, | ||
317 | {"NMX2210"}, /* Gateway Solo 2500 */ | ||
318 | {""}, | ||
319 | }; | ||
320 | |||
321 | static bool is_hex_digit(char c) | ||
322 | { | ||
323 | return (c >= 0 && c <= '9') || (c >= 'A' && c <= 'F'); | ||
324 | } | ||
325 | |||
326 | static bool matching_id(char *idstr, char *list_id) | ||
327 | { | ||
328 | int i; | ||
329 | |||
330 | if (memcmp(idstr, list_id, 3)) | ||
331 | return false; | ||
332 | |||
333 | for (i = 3; i < 7; i++) { | ||
334 | char c = toupper(idstr[i]); | ||
335 | |||
336 | if (!is_hex_digit(c) | ||
337 | || (list_id[i] != 'X' && c != toupper(list_id[i]))) | ||
338 | return false; | ||
339 | } | ||
340 | return true; | ||
341 | } | ||
342 | |||
343 | static bool acpi_pnp_match(char *idstr, const struct acpi_device_id **matchid) | ||
344 | { | ||
345 | const struct acpi_device_id *devid; | ||
346 | |||
347 | for (devid = acpi_pnp_device_ids; devid->id[0]; devid++) | ||
348 | if (matching_id(idstr, (char *)devid->id)) { | ||
349 | if (matchid) | ||
350 | *matchid = devid; | ||
351 | |||
352 | return true; | ||
353 | } | ||
354 | |||
355 | return false; | ||
356 | } | ||
357 | |||
358 | static int acpi_pnp_attach(struct acpi_device *adev, | ||
359 | const struct acpi_device_id *id) | ||
360 | { | ||
361 | return 1; | ||
362 | } | ||
363 | |||
364 | static struct acpi_scan_handler acpi_pnp_handler = { | ||
365 | .ids = acpi_pnp_device_ids, | ||
366 | .match = acpi_pnp_match, | ||
367 | .attach = acpi_pnp_attach, | ||
368 | }; | ||
369 | |||
370 | /* | ||
371 | * For CMOS RTC devices, the PNP ACPI scan handler does not work, because | ||
372 | * there is a CMOS RTC ACPI scan handler installed already, so we need to | ||
373 | * check those devices and enumerate them to the PNP bus directly. | ||
374 | */ | ||
375 | static int is_cmos_rtc_device(struct acpi_device *adev) | ||
376 | { | ||
377 | struct acpi_device_id ids[] = { | ||
378 | { "PNP0B00" }, | ||
379 | { "PNP0B01" }, | ||
380 | { "PNP0B02" }, | ||
381 | {""}, | ||
382 | }; | ||
383 | return !acpi_match_device_ids(adev, ids); | ||
384 | } | ||
385 | |||
386 | bool acpi_is_pnp_device(struct acpi_device *adev) | ||
387 | { | ||
388 | return adev->handler == &acpi_pnp_handler || is_cmos_rtc_device(adev); | ||
389 | } | ||
390 | EXPORT_SYMBOL_GPL(acpi_is_pnp_device); | ||
391 | |||
392 | void __init acpi_pnp_init(void) | ||
393 | { | ||
394 | acpi_scan_add_handler(&acpi_pnp_handler); | ||
395 | } | ||
diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c index 63119d09b354..76f7cff64594 100644 --- a/drivers/acpi/container.c +++ b/drivers/acpi/container.c | |||
@@ -41,6 +41,8 @@ static const struct acpi_device_id container_device_ids[] = { | |||
41 | {"", 0}, | 41 | {"", 0}, |
42 | }; | 42 | }; |
43 | 43 | ||
44 | #ifdef CONFIG_ACPI_CONTAINER | ||
45 | |||
44 | static int acpi_container_offline(struct container_dev *cdev) | 46 | static int acpi_container_offline(struct container_dev *cdev) |
45 | { | 47 | { |
46 | struct acpi_device *adev = ACPI_COMPANION(&cdev->dev); | 48 | struct acpi_device *adev = ACPI_COMPANION(&cdev->dev); |
@@ -109,5 +111,18 @@ static struct acpi_scan_handler container_handler = { | |||
109 | 111 | ||
110 | void __init acpi_container_init(void) | 112 | void __init acpi_container_init(void) |
111 | { | 113 | { |
114 | acpi_scan_add_handler(&container_handler); | ||
115 | } | ||
116 | |||
117 | #else | ||
118 | |||
119 | static struct acpi_scan_handler container_handler = { | ||
120 | .ids = container_device_ids, | ||
121 | }; | ||
122 | |||
123 | void __init acpi_container_init(void) | ||
124 | { | ||
112 | acpi_scan_add_handler_with_hotplug(&container_handler, "container"); | 125 | acpi_scan_add_handler_with_hotplug(&container_handler, "container"); |
113 | } | 126 | } |
127 | |||
128 | #endif /* CONFIG_ACPI_CONTAINER */ | ||
diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h index bb7de413d06d..7de5b603f272 100644 --- a/drivers/acpi/internal.h +++ b/drivers/acpi/internal.h | |||
@@ -30,12 +30,10 @@ void acpi_pci_root_init(void); | |||
30 | void acpi_pci_link_init(void); | 30 | void acpi_pci_link_init(void); |
31 | void acpi_processor_init(void); | 31 | void acpi_processor_init(void); |
32 | void acpi_platform_init(void); | 32 | void acpi_platform_init(void); |
33 | void acpi_pnp_init(void); | ||
33 | int acpi_sysfs_init(void); | 34 | int acpi_sysfs_init(void); |
34 | #ifdef CONFIG_ACPI_CONTAINER | ||
35 | void acpi_container_init(void); | 35 | void acpi_container_init(void); |
36 | #else | 36 | void acpi_memory_hotplug_init(void); |
37 | static inline void acpi_container_init(void) {} | ||
38 | #endif | ||
39 | #ifdef CONFIG_ACPI_DOCK | 37 | #ifdef CONFIG_ACPI_DOCK |
40 | void register_dock_dependent_device(struct acpi_device *adev, | 38 | void register_dock_dependent_device(struct acpi_device *adev, |
41 | acpi_handle dshandle); | 39 | acpi_handle dshandle); |
@@ -47,11 +45,6 @@ static inline void register_dock_dependent_device(struct acpi_device *adev, | |||
47 | static inline int dock_notify(struct acpi_device *adev, u32 event) { return -ENODEV; } | 45 | static inline int dock_notify(struct acpi_device *adev, u32 event) { return -ENODEV; } |
48 | static inline void acpi_dock_add(struct acpi_device *adev) {} | 46 | static inline void acpi_dock_add(struct acpi_device *adev) {} |
49 | #endif | 47 | #endif |
50 | #ifdef CONFIG_ACPI_HOTPLUG_MEMORY | ||
51 | void acpi_memory_hotplug_init(void); | ||
52 | #else | ||
53 | static inline void acpi_memory_hotplug_init(void) {} | ||
54 | #endif | ||
55 | #ifdef CONFIG_X86 | 48 | #ifdef CONFIG_X86 |
56 | void acpi_cmos_rtc_init(void); | 49 | void acpi_cmos_rtc_init(void); |
57 | #else | 50 | #else |
@@ -72,11 +65,7 @@ int acpi_debugfs_init(void); | |||
72 | #else | 65 | #else |
73 | static inline void acpi_debugfs_init(void) { return; } | 66 | static inline void acpi_debugfs_init(void) { return; } |
74 | #endif | 67 | #endif |
75 | #ifdef CONFIG_X86_INTEL_LPSS | ||
76 | void acpi_lpss_init(void); | 68 | void acpi_lpss_init(void); |
77 | #else | ||
78 | static inline void acpi_lpss_init(void) {} | ||
79 | #endif | ||
80 | 69 | ||
81 | acpi_status acpi_hotplug_schedule(struct acpi_device *adev, u32 src); | 70 | acpi_status acpi_hotplug_schedule(struct acpi_device *adev, u32 src); |
82 | bool acpi_queue_hotplug_work(struct work_struct *work); | 71 | bool acpi_queue_hotplug_work(struct work_struct *work); |
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 31c99f7148d0..f775fa0d850f 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -84,7 +84,7 @@ EXPORT_SYMBOL_GPL(acpi_initialize_hp_context); | |||
84 | 84 | ||
85 | int acpi_scan_add_handler(struct acpi_scan_handler *handler) | 85 | int acpi_scan_add_handler(struct acpi_scan_handler *handler) |
86 | { | 86 | { |
87 | if (!handler || !handler->attach) | 87 | if (!handler) |
88 | return -EINVAL; | 88 | return -EINVAL; |
89 | 89 | ||
90 | list_add_tail(&handler->list_node, &acpi_scan_handlers_list); | 90 | list_add_tail(&handler->list_node, &acpi_scan_handlers_list); |
@@ -1797,8 +1797,10 @@ static void acpi_set_pnp_ids(acpi_handle handle, struct acpi_device_pnp *pnp, | |||
1797 | return; | 1797 | return; |
1798 | } | 1798 | } |
1799 | 1799 | ||
1800 | if (info->valid & ACPI_VALID_HID) | 1800 | if (info->valid & ACPI_VALID_HID) { |
1801 | acpi_add_id(pnp, info->hardware_id.string); | 1801 | acpi_add_id(pnp, info->hardware_id.string); |
1802 | pnp->type.platform_id = 1; | ||
1803 | } | ||
1802 | if (info->valid & ACPI_VALID_CID) { | 1804 | if (info->valid & ACPI_VALID_CID) { |
1803 | cid_list = &info->compatible_id_list; | 1805 | cid_list = &info->compatible_id_list; |
1804 | for (i = 0; i < cid_list->count; i++) | 1806 | for (i = 0; i < cid_list->count; i++) |
@@ -1977,6 +1979,9 @@ static bool acpi_scan_handler_matching(struct acpi_scan_handler *handler, | |||
1977 | { | 1979 | { |
1978 | const struct acpi_device_id *devid; | 1980 | const struct acpi_device_id *devid; |
1979 | 1981 | ||
1982 | if (handler->match) | ||
1983 | return handler->match(idstr, matchid); | ||
1984 | |||
1980 | for (devid = handler->ids; devid->id[0]; devid++) | 1985 | for (devid = handler->ids; devid->id[0]; devid++) |
1981 | if (!strcmp((char *)devid->id, idstr)) { | 1986 | if (!strcmp((char *)devid->id, idstr)) { |
1982 | if (matchid) | 1987 | if (matchid) |
@@ -2065,6 +2070,44 @@ static acpi_status acpi_bus_check_add(acpi_handle handle, u32 lvl_not_used, | |||
2065 | return AE_OK; | 2070 | return AE_OK; |
2066 | } | 2071 | } |
2067 | 2072 | ||
2073 | static int acpi_check_spi_i2c_slave(struct acpi_resource *ares, void *data) | ||
2074 | { | ||
2075 | bool *is_spi_i2c_slave_p = data; | ||
2076 | |||
2077 | if (ares->type != ACPI_RESOURCE_TYPE_SERIAL_BUS) | ||
2078 | return 1; | ||
2079 | |||
2080 | /* | ||
2081 | * devices that are connected to UART still need to be enumerated to | ||
2082 | * platform bus | ||
2083 | */ | ||
2084 | if (ares->data.common_serial_bus.type != ACPI_RESOURCE_SERIAL_TYPE_UART) | ||
2085 | *is_spi_i2c_slave_p = true; | ||
2086 | |||
2087 | /* no need to do more checking */ | ||
2088 | return -1; | ||
2089 | } | ||
2090 | |||
2091 | static void acpi_default_enumeration(struct acpi_device *device) | ||
2092 | { | ||
2093 | struct list_head resource_list; | ||
2094 | bool is_spi_i2c_slave = false; | ||
2095 | |||
2096 | if (!device->pnp.type.platform_id || device->handler) | ||
2097 | return; | ||
2098 | |||
2099 | /* | ||
2100 | * Do not enemerate SPI/I2C slaves as they will be enuerated by their | ||
2101 | * respective parents. | ||
2102 | */ | ||
2103 | INIT_LIST_HEAD(&resource_list); | ||
2104 | acpi_dev_get_resources(device, &resource_list, acpi_check_spi_i2c_slave, | ||
2105 | &is_spi_i2c_slave); | ||
2106 | acpi_dev_free_resource_list(&resource_list); | ||
2107 | if (!is_spi_i2c_slave) | ||
2108 | acpi_create_platform_device(device); | ||
2109 | } | ||
2110 | |||
2068 | static int acpi_scan_attach_handler(struct acpi_device *device) | 2111 | static int acpi_scan_attach_handler(struct acpi_device *device) |
2069 | { | 2112 | { |
2070 | struct acpi_hardware_id *hwid; | 2113 | struct acpi_hardware_id *hwid; |
@@ -2076,6 +2119,10 @@ static int acpi_scan_attach_handler(struct acpi_device *device) | |||
2076 | 2119 | ||
2077 | handler = acpi_scan_match_handler(hwid->id, &devid); | 2120 | handler = acpi_scan_match_handler(hwid->id, &devid); |
2078 | if (handler) { | 2121 | if (handler) { |
2122 | if (!handler->attach) { | ||
2123 | device->pnp.type.platform_id = 0; | ||
2124 | continue; | ||
2125 | } | ||
2079 | device->handler = handler; | 2126 | device->handler = handler; |
2080 | ret = handler->attach(device, devid); | 2127 | ret = handler->attach(device, devid); |
2081 | if (ret > 0) | 2128 | if (ret > 0) |
@@ -2086,6 +2133,9 @@ static int acpi_scan_attach_handler(struct acpi_device *device) | |||
2086 | break; | 2133 | break; |
2087 | } | 2134 | } |
2088 | } | 2135 | } |
2136 | if (!ret) | ||
2137 | acpi_default_enumeration(device); | ||
2138 | |||
2089 | return ret; | 2139 | return ret; |
2090 | } | 2140 | } |
2091 | 2141 | ||
@@ -2245,11 +2295,11 @@ int __init acpi_scan_init(void) | |||
2245 | acpi_pci_root_init(); | 2295 | acpi_pci_root_init(); |
2246 | acpi_pci_link_init(); | 2296 | acpi_pci_link_init(); |
2247 | acpi_processor_init(); | 2297 | acpi_processor_init(); |
2248 | acpi_platform_init(); | ||
2249 | acpi_lpss_init(); | 2298 | acpi_lpss_init(); |
2250 | acpi_cmos_rtc_init(); | 2299 | acpi_cmos_rtc_init(); |
2251 | acpi_container_init(); | 2300 | acpi_container_init(); |
2252 | acpi_memory_hotplug_init(); | 2301 | acpi_memory_hotplug_init(); |
2302 | acpi_pnp_init(); | ||
2253 | 2303 | ||
2254 | mutex_lock(&acpi_scan_lock); | 2304 | mutex_lock(&acpi_scan_lock); |
2255 | /* | 2305 | /* |
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c index c31aa07b3ba5..b81448b2c75d 100644 --- a/drivers/pnp/pnpacpi/core.c +++ b/drivers/pnp/pnpacpi/core.c | |||
@@ -30,26 +30,6 @@ | |||
30 | 30 | ||
31 | static int num; | 31 | static int num; |
32 | 32 | ||
33 | /* We need only to blacklist devices that have already an acpi driver that | ||
34 | * can't use pnp layer. We don't need to blacklist device that are directly | ||
35 | * used by the kernel (PCI root, ...), as it is harmless and there were | ||
36 | * already present in pnpbios. But there is an exception for devices that | ||
37 | * have irqs (PIC, Timer) because we call acpi_register_gsi. | ||
38 | * Finally, only devices that have a CRS method need to be in this list. | ||
39 | */ | ||
40 | static struct acpi_device_id excluded_id_list[] __initdata = { | ||
41 | {"PNP0C09", 0}, /* EC */ | ||
42 | {"PNP0C0F", 0}, /* Link device */ | ||
43 | {"PNP0000", 0}, /* PIC */ | ||
44 | {"PNP0100", 0}, /* Timer */ | ||
45 | {"", 0}, | ||
46 | }; | ||
47 | |||
48 | static inline int __init is_exclusive_device(struct acpi_device *dev) | ||
49 | { | ||
50 | return (!acpi_match_device_ids(dev, excluded_id_list)); | ||
51 | } | ||
52 | |||
53 | /* | 33 | /* |
54 | * Compatible Device IDs | 34 | * Compatible Device IDs |
55 | */ | 35 | */ |
@@ -266,7 +246,7 @@ static int __init pnpacpi_add_device(struct acpi_device *device) | |||
266 | if (!pnpid) | 246 | if (!pnpid) |
267 | return 0; | 247 | return 0; |
268 | 248 | ||
269 | if (is_exclusive_device(device) || !device->status.present) | 249 | if (!device->status.present) |
270 | return 0; | 250 | return 0; |
271 | 251 | ||
272 | dev = pnp_alloc_dev(&pnpacpi_protocol, num, pnpid); | 252 | dev = pnp_alloc_dev(&pnpacpi_protocol, num, pnpid); |
@@ -326,10 +306,10 @@ static acpi_status __init pnpacpi_add_device_handler(acpi_handle handle, | |||
326 | { | 306 | { |
327 | struct acpi_device *device; | 307 | struct acpi_device *device; |
328 | 308 | ||
329 | if (!acpi_bus_get_device(handle, &device)) | 309 | if (acpi_bus_get_device(handle, &device)) |
330 | pnpacpi_add_device(device); | ||
331 | else | ||
332 | return AE_CTRL_DEPTH; | 310 | return AE_CTRL_DEPTH; |
311 | if (acpi_is_pnp_device(device)) | ||
312 | pnpacpi_add_device(device); | ||
333 | return AE_OK; | 313 | return AE_OK; |
334 | } | 314 | } |
335 | 315 | ||
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index fb6e00dcce74..b5714580801a 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -131,6 +131,7 @@ static inline struct acpi_hotplug_profile *to_acpi_hotplug_profile( | |||
131 | struct acpi_scan_handler { | 131 | struct acpi_scan_handler { |
132 | const struct acpi_device_id *ids; | 132 | const struct acpi_device_id *ids; |
133 | struct list_head list_node; | 133 | struct list_head list_node; |
134 | bool (*match)(char *idstr, const struct acpi_device_id **matchid); | ||
134 | int (*attach)(struct acpi_device *dev, const struct acpi_device_id *id); | 135 | int (*attach)(struct acpi_device *dev, const struct acpi_device_id *id); |
135 | void (*detach)(struct acpi_device *dev); | 136 | void (*detach)(struct acpi_device *dev); |
136 | void (*bind)(struct device *phys_dev); | 137 | void (*bind)(struct device *phys_dev); |
@@ -232,7 +233,8 @@ struct acpi_hardware_id { | |||
232 | struct acpi_pnp_type { | 233 | struct acpi_pnp_type { |
233 | u32 hardware_id:1; | 234 | u32 hardware_id:1; |
234 | u32 bus_address:1; | 235 | u32 bus_address:1; |
235 | u32 reserved:30; | 236 | u32 platform_id:1; |
237 | u32 reserved:29; | ||
236 | }; | 238 | }; |
237 | 239 | ||
238 | struct acpi_device_pnp { | 240 | struct acpi_device_pnp { |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 2ecdfcf98c0f..358c01b971db 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -185,6 +185,8 @@ extern int ec_transaction(u8 command, | |||
185 | u8 *rdata, unsigned rdata_len); | 185 | u8 *rdata, unsigned rdata_len); |
186 | extern acpi_handle ec_get_handle(void); | 186 | extern acpi_handle ec_get_handle(void); |
187 | 187 | ||
188 | extern bool acpi_is_pnp_device(struct acpi_device *); | ||
189 | |||
188 | #if defined(CONFIG_ACPI_WMI) || defined(CONFIG_ACPI_WMI_MODULE) | 190 | #if defined(CONFIG_ACPI_WMI) || defined(CONFIG_ACPI_WMI_MODULE) |
189 | 191 | ||
190 | typedef void (*wmi_notify_handler) (u32 value, void *context); | 192 | typedef void (*wmi_notify_handler) (u32 value, void *context); |