Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44975
b: refs/heads/master
c: 2df910b
h: refs/heads/master
i:
  44973: 2ab20d2
  44971: d8331a8
  44967: 0772551
  44959: f2093fb
v: v3
  • Loading branch information
Henrique de Moraes Holschuh authored and Len Brown committed Dec 7, 2006
1 parent 5c382f9 commit 0893a14
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e0298997acdba929e7f5b5987d305b67b50a3969
refs/heads/master: 2df910b4c3edcce9a0c12394db6f5f4a6e69c712
11 changes: 11 additions & 0 deletions trunk/drivers/acpi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,17 @@ config ACPI_IBM_DOCK

If you are not sure, say N here.

config ACPI_IBM_BAY
bool "Legacy Removable Bay Support"
depends on ACPI_IBM
depends on ACPI_BAY=n
default n
---help---
Allows the ibm_acpi driver to handle removable bays.
This support is obsoleted by CONFIG_ACPI_BAY.

If you are not sure, say N here.

config ACPI_TOSHIBA
tristate "Toshiba Laptop Extras"
depends on X86
Expand Down
13 changes: 12 additions & 1 deletion trunk/drivers/acpi/ibm_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ IBM_HANDLE(dock, root, "\\_SB.GDCK", /* X30, X31, X40 */
"\\_SB.PCI.ISA.SLCE", /* 570 */
); /* A21e,G4x,R30,R31,R32,R40,R40e,R50e */
#endif
#ifdef CONFIG_ACPI_IBM_BAY
IBM_HANDLE(bay, root, "\\_SB.PCI.IDE.SECN.MAST", /* 570 */
"\\_SB.PCI0.IDE0.IDES.IDSM", /* 600e/x, 770e, 770x */
"\\_SB.PCI0.SATA.SCND.MSTR", /* T60, X60, Z60 */
Expand All @@ -189,6 +190,7 @@ IBM_HANDLE(bay2, root, "\\_SB.PCI0.IDE0.PRIM.SLAV", /* A3x, R32 */
IBM_HANDLE(bay2_ej, bay2, "_EJ3", /* 600e/x, 770e, A3x */
"_EJ0", /* 770x */
); /* all others */
#endif

/* don't list other alternatives as we install a notify handler on the 570 */
IBM_HANDLE(pci, root, "\\_SB.PCI"); /* 570 */
Expand Down Expand Up @@ -1051,6 +1053,7 @@ static int light_write(char *buf)
return 0;
}

#if defined(CONFIG_ACPI_IBM_DOCK) || defined(CONFIG_ACPI_IBM_BAY)
static int _sta(acpi_handle handle)
{
int status;
Expand All @@ -1060,7 +1063,7 @@ static int _sta(acpi_handle handle)

return status;
}

#endif
#ifdef CONFIG_ACPI_IBM_DOCK
#define dock_docked() (_sta(dock_handle) & 1)

Expand Down Expand Up @@ -1126,6 +1129,7 @@ static void dock_notify(struct ibm_struct *ibm, u32 event)
}
#endif

#ifdef CONFIG_ACPI_IBM_BAY
static int bay_status_supported;
static int bay_status2_supported;
static int bay_eject_supported;
Expand Down Expand Up @@ -1201,6 +1205,7 @@ static void bay_notify(struct ibm_struct *ibm, u32 event)
{
acpi_bus_generate_event(ibm->device, event, 0);
}
#endif

static int cmos_read(char *p)
{
Expand Down Expand Up @@ -2330,6 +2335,7 @@ static struct ibm_struct ibms[] = {
.type = ACPI_SYSTEM_NOTIFY,
},
#endif
#ifdef CONFIG_ACPI_IBM_BAY
{
.name = "bay",
.init = bay_init,
Expand All @@ -2339,6 +2345,7 @@ static struct ibm_struct ibms[] = {
.handle = &bay_handle,
.type = ACPI_SYSTEM_NOTIFY,
},
#endif
{
.name = "cmos",
.read = cmos_read,
Expand Down Expand Up @@ -2624,7 +2631,9 @@ IBM_PARAM(light);
#ifdef CONFIG_ACPI_IBM_DOCK
IBM_PARAM(dock);
#endif
#ifdef CONFIG_ACPI_IBM_BAY
IBM_PARAM(bay);
#endif
IBM_PARAM(cmos);
IBM_PARAM(led);
IBM_PARAM(beep);
Expand Down Expand Up @@ -2717,12 +2726,14 @@ static int __init acpi_ibm_init(void)
IBM_HANDLE_INIT(dock);
#endif
IBM_HANDLE_INIT(pci);
#ifdef CONFIG_ACPI_IBM_BAY
IBM_HANDLE_INIT(bay);
if (bay_handle)
IBM_HANDLE_INIT(bay_ej);
IBM_HANDLE_INIT(bay2);
if (bay2_handle)
IBM_HANDLE_INIT(bay2_ej);
#endif
IBM_HANDLE_INIT(beep);
IBM_HANDLE_INIT(ecrd);
IBM_HANDLE_INIT(ecwr);
Expand Down

0 comments on commit 0893a14

Please sign in to comment.