From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Darren Hart <dvhart@infradead.org>, platform-driver-x86@vger.kernel.org
Cc: Matthew Garrett <matthew.garrett@nebula.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] platform/x86: toshiba: re-enable acpi hotkeys after suspend to disk
Date: Tue, 2 Sep 2014 14:04:19 -0400 [thread overview]
Message-ID: <1409681059-6493-1-git-send-email-benjamin.tissoires@redhat.com> (raw)
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 <benjamin.tissoires@redhat.com>
---
Hi guys,
we noticed this problem on a Toshiba Z40. I kind of brute-forced the thing, and
I ended up that calling "ENAB" was making the keys working again (rmmod/insmod
the driver was sufficient, and the only command which was different from the
resume was this ACPI call).
I am really surprised some toshiba laptops do not need this, so I'd prefer that
an ACPI expert (Matthew???) gives its wisdom regarding that.
Cheers,
Benjamin
drivers/platform/x86/toshiba_acpi.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index b062d3d..ba75701 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;
}
--
2.1.0
next reply other threads:[~2014-09-02 18:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-02 18:04 Benjamin Tissoires [this message]
2014-09-02 18:07 ` [PATCH] platform/x86: toshiba: re-enable acpi hotkeys after suspend to disk Matthew Garrett
2014-09-02 22:50 ` Darren Hart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1409681059-6493-1-git-send-email-benjamin.tissoires@redhat.com \
--to=benjamin.tissoires@redhat.com \
--cc=dvhart@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.garrett@nebula.com \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox