|
@@ -449,6 +449,7 @@ static struct attribute_group pcc_attr_group = {
|
|
|
|
|
|
/* hotkey input device driver */
|
|
/* hotkey input device driver */
|
|
|
|
|
|
|
|
+static int sleep_keydown_seen;
|
|
static void acpi_pcc_generate_keyinput(struct pcc_acpi *pcc)
|
|
static void acpi_pcc_generate_keyinput(struct pcc_acpi *pcc)
|
|
{
|
|
{
|
|
struct input_dev *hotk_input_dev = pcc->input_dev;
|
|
struct input_dev *hotk_input_dev = pcc->input_dev;
|
|
@@ -462,6 +463,16 @@ static void acpi_pcc_generate_keyinput(struct pcc_acpi *pcc)
|
|
"error getting hotkey status\n"));
|
|
"error getting hotkey status\n"));
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /* hack: some firmware sends no key down for sleep / hibernate */
|
|
|
|
+ if ((result & 0xf) == 0x7 || (result & 0xf) == 0xa) {
|
|
|
|
+ if (result & 0x80)
|
|
|
|
+ sleep_keydown_seen = 1;
|
|
|
|
+ if (!sleep_keydown_seen)
|
|
|
|
+ sparse_keymap_report_event(hotk_input_dev,
|
|
|
|
+ result & 0xf, 0x80, false);
|
|
|
|
+ }
|
|
|
|
+
|
|
if (!sparse_keymap_report_event(hotk_input_dev,
|
|
if (!sparse_keymap_report_event(hotk_input_dev,
|
|
result & 0xf, result & 0x80, false))
|
|
result & 0xf, result & 0x80, false))
|
|
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
|
|
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
|