Add patches accepted for 2.6.22-rc4
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / rejected / ibm-acpi_make-non-generic-bay-support-optional.patch
blobb45e60ba7c31123bff0847495d3923c1c99bbc85
1 REJECTED:
2 we shall need acpi bay support in ibm-acpi regardless, to
3 properly supply bay handling for batteries, and suspend/resume
5 From c14ce44ae5d0f9e84733e4e7526bc352604a39fe Mon Sep 17 00:00:00 2001
6 From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
7 Date: Sat, 25 Nov 2006 16:35:09 -0200
8 Subject: [PATCH] ACPI: ibm-acpi: make non-generic bay support optional
10 This patch makes it possible to disable ibm-acpi non-generic bay support,
11 as generic bay support already works well for a number of ThinkPads.
13 Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
14 ---
15 drivers/acpi/Kconfig | 11 +++++++++++
16 drivers/acpi/ibm_acpi.c | 13 ++++++++++++-
17 2 files changed, 23 insertions(+), 1 deletions(-)
19 diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
20 index 113c01b..3a27d58 100644
21 --- a/drivers/acpi/Kconfig
22 +++ b/drivers/acpi/Kconfig
23 @@ -223,6 +223,17 @@ config ACPI_IBM_DOCK
25 If you are not sure, say N here.
27 +config ACPI_IBM_BAY
28 + bool "Legacy Removable Bay Support"
29 + depends on ACPI_IBM
30 + depends on ACPI_BAY=n
31 + default n
32 + ---help---
33 + Allows the ibm_acpi driver to handle removable bays.
34 + This support is obsoleted by CONFIG_ACPI_BAY.
36 + If you are not sure, say N here.
38 config ACPI_TOSHIBA
39 tristate "Toshiba Laptop Extras"
40 depends on X86
41 diff --git a/drivers/acpi/ibm_acpi.c b/drivers/acpi/ibm_acpi.c
42 index 88ec831..23e963a 100644
43 --- a/drivers/acpi/ibm_acpi.c
44 +++ b/drivers/acpi/ibm_acpi.c
45 @@ -157,6 +157,7 @@ IBM_HANDLE(dock, root, "\\_SB.GDCK", /* X30, X31, X40 */
46 "\\_SB.PCI.ISA.SLCE", /* 570 */
47 ); /* A21e,G4x,R30,R31,R32,R40,R40e,R50e */
48 #endif
49 +#ifdef CONFIG_ACPI_IBM_BAY
50 IBM_HANDLE(bay, root, "\\_SB.PCI.IDE.SECN.MAST", /* 570 */
51 "\\_SB.PCI0.IDE0.IDES.IDSM", /* 600e/x, 770e, 770x */
52 "\\_SB.PCI0.SATA.SCND.MSTR", /* T60, X60, Z60, SATA mode? */
53 @@ -175,6 +176,7 @@ IBM_HANDLE(bay2, root, "\\_SB.PCI0.IDE0.PRIM.SLAV", /* A3x, R32 */
54 IBM_HANDLE(bay2_ej, bay2, "_EJ3", /* 600e/x, 770e, A3x */
55 "_EJ0", /* 770x */
56 ); /* all others */
57 +#endif
59 /* don't list other alternatives as we install a notify handler on the 570 */
60 IBM_HANDLE(pci, root, "\\_SB.PCI"); /* 570 */
61 @@ -1041,6 +1043,7 @@ static int light_write(char *buf)
62 return 0;
65 +#if defined(CONFIG_ACPI_IBM_DOCK) || defined(CONFIG_ACPI_IBM_BAY)
66 static int _sta(acpi_handle handle)
68 int status;
69 @@ -1050,7 +1053,7 @@ static int _sta(acpi_handle handle)
71 return status;
74 +#endif
75 #ifdef CONFIG_ACPI_IBM_DOCK
76 #define dock_docked() (_sta(dock_handle) & 1)
78 @@ -1116,6 +1119,7 @@ static void dock_notify(struct ibm_struct *ibm, u32 event)
80 #endif
82 +#ifdef CONFIG_ACPI_IBM_BAY
83 static int bay_status_supported;
84 static int bay_status2_supported;
85 static int bay_eject_supported;
86 @@ -1191,6 +1195,7 @@ static void bay_notify(struct ibm_struct *ibm, u32 event)
88 acpi_bus_generate_event(ibm->device, event, 0);
90 +#endif
92 static int cmos_read(char *p)
94 @@ -2357,6 +2362,7 @@ static struct ibm_struct ibms[] = {
95 .type = ACPI_SYSTEM_NOTIFY,
97 #endif
98 +#ifdef CONFIG_ACPI_IBM_BAY
100 .name = "bay",
101 .init = bay_init,
102 @@ -2366,6 +2372,7 @@ static struct ibm_struct ibms[] = {
103 .handle = &bay_handle,
104 .type = ACPI_SYSTEM_NOTIFY,
106 +#endif
108 .name = "cmos",
109 .read = cmos_read,
110 @@ -2651,7 +2658,9 @@ IBM_PARAM(light);
111 #ifdef CONFIG_ACPI_IBM_DOCK
112 IBM_PARAM(dock);
113 #endif
114 +#ifdef CONFIG_ACPI_IBM_BAY
115 IBM_PARAM(bay);
116 +#endif
117 IBM_PARAM(cmos);
118 IBM_PARAM(led);
119 IBM_PARAM(beep);
120 @@ -2734,12 +2743,14 @@ static int __init acpi_ibm_init(void)
121 IBM_HANDLE_INIT(dock);
122 #endif
123 IBM_HANDLE_INIT(pci);
124 +#ifdef CONFIG_ACPI_IBM_BAY
125 IBM_HANDLE_INIT(bay);
126 if (bay_handle)
127 IBM_HANDLE_INIT(bay_ej);
128 IBM_HANDLE_INIT(bay2);
129 if (bay2_handle)
130 IBM_HANDLE_INIT(bay2_ej);
131 +#endif
132 IBM_HANDLE_INIT(beep);
133 IBM_HANDLE_INIT(ecrd);
134 IBM_HANDLE_INIT(ecwr);
136 1.4.4.4