From: Benjamin Tissoires Date: Tue, 2 Sep 2014 18:04:19 +0000 (-0400) Subject: platform/x86: toshiba: re-enable acpi hotkeys after suspend to disk X-Git-Tag: v4.13~6729^2~1 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=e7fdb762b9e1e10c3271e47723b2003330829ddf;p=mirror_ubuntu-bionic-kernel.git platform/x86: toshiba: re-enable acpi hotkeys after suspend to disk On the Toshiba Tecra Z40, after a suspend-to-disk, some FN hotkeys driven by toshiba_acpi are not functional. Calling the ACPI object ENAB on resume makes them back alive. Signed-off-by: Benjamin Tissoires Acked-by: Matthew Garrett Signed-off-by: Darren Hart --- diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index b062d3d7b373..ba75701986e5 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/drivers/platform/x86/toshiba_acpi.c @@ -1857,9 +1857,16 @@ static int toshiba_acpi_resume(struct device *device) { struct toshiba_acpi_dev *dev = acpi_driver_data(to_acpi_device(device)); u32 result; + acpi_status status; + + if (dev->hotkey_dev) { + status = acpi_evaluate_object(dev->acpi_dev->handle, "ENAB", + NULL, NULL); + if (ACPI_FAILURE(status)) + pr_info("Unable to re-enable hotkeys\n"); - if (dev->hotkey_dev) hci_write1(dev, HCI_HOTKEY_EVENT, HCI_HOTKEY_ENABLE, &result); + } return 0; }