diff options
author | Henrique de Moraes Holschuh <hmh@hmh.eng.br> | 2006-11-25 13:35:09 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-12-07 01:38:45 -0500 |
commit | 2df910b4c3edcce9a0c12394db6f5f4a6e69c712 (patch) | |
tree | 658752b625b083dbad102d34be5a3da9e1be26c5 /drivers/acpi/ibm_acpi.c | |
parent | e0298997acdba929e7f5b5987d305b67b50a3969 (diff) |
ACPI: ibm-acpi: make non-generic bay support optional
This patch makes it possible to disable ibm-acpi non-generic bay support,
as generic bay support already works well for a number of ThinkPads.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Diffstat (limited to 'drivers/acpi/ibm_acpi.c')
-rw-r--r-- | drivers/acpi/ibm_acpi.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/acpi/ibm_acpi.c b/drivers/acpi/ibm_acpi.c index 392abbb7d2dc..fbb4970ce16a 100644 --- a/drivers/acpi/ibm_acpi.c +++ b/drivers/acpi/ibm_acpi.c | |||
@@ -172,6 +172,7 @@ IBM_HANDLE(dock, root, "\\_SB.GDCK", /* X30, X31, X40 */ | |||
172 | "\\_SB.PCI.ISA.SLCE", /* 570 */ | 172 | "\\_SB.PCI.ISA.SLCE", /* 570 */ |
173 | ); /* A21e,G4x,R30,R31,R32,R40,R40e,R50e */ | 173 | ); /* A21e,G4x,R30,R31,R32,R40,R40e,R50e */ |
174 | #endif | 174 | #endif |
175 | #ifdef CONFIG_ACPI_IBM_BAY | ||
175 | IBM_HANDLE(bay, root, "\\_SB.PCI.IDE.SECN.MAST", /* 570 */ | 176 | IBM_HANDLE(bay, root, "\\_SB.PCI.IDE.SECN.MAST", /* 570 */ |
176 | "\\_SB.PCI0.IDE0.IDES.IDSM", /* 600e/x, 770e, 770x */ | 177 | "\\_SB.PCI0.IDE0.IDES.IDSM", /* 600e/x, 770e, 770x */ |
177 | "\\_SB.PCI0.SATA.SCND.MSTR", /* T60, X60, Z60 */ | 178 | "\\_SB.PCI0.SATA.SCND.MSTR", /* T60, X60, Z60 */ |
@@ -189,6 +190,7 @@ IBM_HANDLE(bay2, root, "\\_SB.PCI0.IDE0.PRIM.SLAV", /* A3x, R32 */ | |||
189 | IBM_HANDLE(bay2_ej, bay2, "_EJ3", /* 600e/x, 770e, A3x */ | 190 | IBM_HANDLE(bay2_ej, bay2, "_EJ3", /* 600e/x, 770e, A3x */ |
190 | "_EJ0", /* 770x */ | 191 | "_EJ0", /* 770x */ |
191 | ); /* all others */ | 192 | ); /* all others */ |
193 | #endif | ||
192 | 194 | ||
193 | /* don't list other alternatives as we install a notify handler on the 570 */ | 195 | /* don't list other alternatives as we install a notify handler on the 570 */ |
194 | IBM_HANDLE(pci, root, "\\_SB.PCI"); /* 570 */ | 196 | IBM_HANDLE(pci, root, "\\_SB.PCI"); /* 570 */ |
@@ -1051,6 +1053,7 @@ static int light_write(char *buf) | |||
1051 | return 0; | 1053 | return 0; |
1052 | } | 1054 | } |
1053 | 1055 | ||
1056 | #if defined(CONFIG_ACPI_IBM_DOCK) || defined(CONFIG_ACPI_IBM_BAY) | ||
1054 | static int _sta(acpi_handle handle) | 1057 | static int _sta(acpi_handle handle) |
1055 | { | 1058 | { |
1056 | int status; | 1059 | int status; |
@@ -1060,7 +1063,7 @@ static int _sta(acpi_handle handle) | |||
1060 | 1063 | ||
1061 | return status; | 1064 | return status; |
1062 | } | 1065 | } |
1063 | 1066 | #endif | |
1064 | #ifdef CONFIG_ACPI_IBM_DOCK | 1067 | #ifdef CONFIG_ACPI_IBM_DOCK |
1065 | #define dock_docked() (_sta(dock_handle) & 1) | 1068 | #define dock_docked() (_sta(dock_handle) & 1) |
1066 | 1069 | ||
@@ -1126,6 +1129,7 @@ static void dock_notify(struct ibm_struct *ibm, u32 event) | |||
1126 | } | 1129 | } |
1127 | #endif | 1130 | #endif |
1128 | 1131 | ||
1132 | #ifdef CONFIG_ACPI_IBM_BAY | ||
1129 | static int bay_status_supported; | 1133 | static int bay_status_supported; |
1130 | static int bay_status2_supported; | 1134 | static int bay_status2_supported; |
1131 | static int bay_eject_supported; | 1135 | static int bay_eject_supported; |
@@ -1201,6 +1205,7 @@ static void bay_notify(struct ibm_struct *ibm, u32 event) | |||
1201 | { | 1205 | { |
1202 | acpi_bus_generate_event(ibm->device, event, 0); | 1206 | acpi_bus_generate_event(ibm->device, event, 0); |
1203 | } | 1207 | } |
1208 | #endif | ||
1204 | 1209 | ||
1205 | static int cmos_read(char *p) | 1210 | static int cmos_read(char *p) |
1206 | { | 1211 | { |
@@ -2330,6 +2335,7 @@ static struct ibm_struct ibms[] = { | |||
2330 | .type = ACPI_SYSTEM_NOTIFY, | 2335 | .type = ACPI_SYSTEM_NOTIFY, |
2331 | }, | 2336 | }, |
2332 | #endif | 2337 | #endif |
2338 | #ifdef CONFIG_ACPI_IBM_BAY | ||
2333 | { | 2339 | { |
2334 | .name = "bay", | 2340 | .name = "bay", |
2335 | .init = bay_init, | 2341 | .init = bay_init, |
@@ -2339,6 +2345,7 @@ static struct ibm_struct ibms[] = { | |||
2339 | .handle = &bay_handle, | 2345 | .handle = &bay_handle, |
2340 | .type = ACPI_SYSTEM_NOTIFY, | 2346 | .type = ACPI_SYSTEM_NOTIFY, |
2341 | }, | 2347 | }, |
2348 | #endif | ||
2342 | { | 2349 | { |
2343 | .name = "cmos", | 2350 | .name = "cmos", |
2344 | .read = cmos_read, | 2351 | .read = cmos_read, |
@@ -2624,7 +2631,9 @@ IBM_PARAM(light); | |||
2624 | #ifdef CONFIG_ACPI_IBM_DOCK | 2631 | #ifdef CONFIG_ACPI_IBM_DOCK |
2625 | IBM_PARAM(dock); | 2632 | IBM_PARAM(dock); |
2626 | #endif | 2633 | #endif |
2634 | #ifdef CONFIG_ACPI_IBM_BAY | ||
2627 | IBM_PARAM(bay); | 2635 | IBM_PARAM(bay); |
2636 | #endif | ||
2628 | IBM_PARAM(cmos); | 2637 | IBM_PARAM(cmos); |
2629 | IBM_PARAM(led); | 2638 | IBM_PARAM(led); |
2630 | IBM_PARAM(beep); | 2639 | IBM_PARAM(beep); |
@@ -2717,12 +2726,14 @@ static int __init acpi_ibm_init(void) | |||
2717 | IBM_HANDLE_INIT(dock); | 2726 | IBM_HANDLE_INIT(dock); |
2718 | #endif | 2727 | #endif |
2719 | IBM_HANDLE_INIT(pci); | 2728 | IBM_HANDLE_INIT(pci); |
2729 | #ifdef CONFIG_ACPI_IBM_BAY | ||
2720 | IBM_HANDLE_INIT(bay); | 2730 | IBM_HANDLE_INIT(bay); |
2721 | if (bay_handle) | 2731 | if (bay_handle) |
2722 | IBM_HANDLE_INIT(bay_ej); | 2732 | IBM_HANDLE_INIT(bay_ej); |
2723 | IBM_HANDLE_INIT(bay2); | 2733 | IBM_HANDLE_INIT(bay2); |
2724 | if (bay2_handle) | 2734 | if (bay2_handle) |
2725 | IBM_HANDLE_INIT(bay2_ej); | 2735 | IBM_HANDLE_INIT(bay2_ej); |
2736 | #endif | ||
2726 | IBM_HANDLE_INIT(beep); | 2737 | IBM_HANDLE_INIT(beep); |
2727 | IBM_HANDLE_INIT(ecrd); | 2738 | IBM_HANDLE_INIT(ecrd); |
2728 | IBM_HANDLE_INIT(ecwr); | 2739 | IBM_HANDLE_INIT(ecwr); |