aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>2010-02-25 19:28:56 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-15 12:06:46 -0400
commitba0b9eadb8d5cb3679359c1064fa22de1bec393a (patch)
treefd277237437efe28120dbb19a9d30df37c86dbb5 /drivers
parent119725c3b36b64a668776dbb33e08ed90b6ed993 (diff)
thinkpad-acpi: document HKEY event 3006
commit bf8b29c8f7f8269e99eca8b19048ed5b34b51810 upstream. Event 0x3006 is used to help power management of the ODD in the UltraBay. The EC generates this event when the ODD eject button is pressed (even if the bay is powered down). Normally, Linux doesn't need this as we keep the SATA link powered up (which wastes power). The EC powers up the bay by itself when the ODD eject button is pressed, and the SATA PHY reports the hotplug. However, we could also power that SATA link down (and for that matter, also power down the Ultrabay) if the ODD is left idle for a while with no disk inside, and use event 0x3006 to know when we need that SATA link powered back up. For now, just stop asking for more information when event 0x3006 is seen, there is no point in pestering users about it anymore. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 395234bbaeaa..05f0689fef8c 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -3650,13 +3650,19 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event)
3650 break; 3650 break;
3651 case 3: 3651 case 3:
3652 /* 0x3000-0x3FFF: bay-related wakeups */ 3652 /* 0x3000-0x3FFF: bay-related wakeups */
3653 if (hkey == TP_HKEY_EV_BAYEJ_ACK) { 3653 switch (hkey) {
3654 case TP_HKEY_EV_BAYEJ_ACK:
3654 hotkey_autosleep_ack = 1; 3655 hotkey_autosleep_ack = 1;
3655 printk(TPACPI_INFO 3656 printk(TPACPI_INFO
3656 "bay ejected\n"); 3657 "bay ejected\n");
3657 hotkey_wakeup_hotunplug_complete_notify_change(); 3658 hotkey_wakeup_hotunplug_complete_notify_change();
3658 known_ev = true; 3659 known_ev = true;
3659 } else { 3660 break;
3661 case TP_HKEY_EV_OPTDRV_EJ:
3662 /* FIXME: kick libata if SATA link offline */
3663 known_ev = true;
3664 break;
3665 default:
3660 known_ev = false; 3666 known_ev = false;
3661 } 3667 }
3662 break; 3668 break;