diff options
Diffstat (limited to 'drivers/platform/x86/panasonic-laptop.c')
-rw-r--r-- | drivers/platform/x86/panasonic-laptop.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c index 609d38779b26..3f870972247c 100644 --- a/drivers/platform/x86/panasonic-laptop.c +++ b/drivers/platform/x86/panasonic-laptop.c | |||
@@ -449,6 +449,7 @@ static struct attribute_group pcc_attr_group = { | |||
449 | 449 | ||
450 | /* hotkey input device driver */ | 450 | /* hotkey input device driver */ |
451 | 451 | ||
452 | static int sleep_keydown_seen; | ||
452 | static void acpi_pcc_generate_keyinput(struct pcc_acpi *pcc) | 453 | static void acpi_pcc_generate_keyinput(struct pcc_acpi *pcc) |
453 | { | 454 | { |
454 | struct input_dev *hotk_input_dev = pcc->input_dev; | 455 | struct input_dev *hotk_input_dev = pcc->input_dev; |
@@ -462,6 +463,16 @@ static void acpi_pcc_generate_keyinput(struct pcc_acpi *pcc) | |||
462 | "error getting hotkey status\n")); | 463 | "error getting hotkey status\n")); |
463 | return; | 464 | return; |
464 | } | 465 | } |
466 | |||
467 | /* hack: some firmware sends no key down for sleep / hibernate */ | ||
468 | if ((result & 0xf) == 0x7 || (result & 0xf) == 0xa) { | ||
469 | if (result & 0x80) | ||
470 | sleep_keydown_seen = 1; | ||
471 | if (!sleep_keydown_seen) | ||
472 | sparse_keymap_report_event(hotk_input_dev, | ||
473 | result & 0xf, 0x80, false); | ||
474 | } | ||
475 | |||
465 | if (!sparse_keymap_report_event(hotk_input_dev, | 476 | if (!sparse_keymap_report_event(hotk_input_dev, |
466 | result & 0xf, result & 0x80, false)) | 477 | result & 0xf, result & 0x80, false)) |
467 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 478 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, |