mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] platform/x86: toshiba: re-enable acpi hotkeys after suspend to disk
@ 2014-09-02 18:04 Benjamin Tissoires
  2014-09-02 18:07 ` Matthew Garrett
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Tissoires @ 2014-09-02 18:04 UTC (permalink / raw)
  To: Darren Hart, platform-driver-x86; +Cc: Matthew Garrett, linux-kernel

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] platform/x86: toshiba: re-enable acpi hotkeys after suspend to disk
  2014-09-02 18:04 [PATCH] platform/x86: toshiba: re-enable acpi hotkeys after suspend to disk Benjamin Tissoires
@ 2014-09-02 18:07 ` Matthew Garrett
  2014-09-02 22:50   ` Darren Hart
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Garrett @ 2014-09-02 18:07 UTC (permalink / raw)
  To: benjamin.tissoires; +Cc: platform-driver-x86, linux-kernel, dvhart

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 810 bytes --]

On Tue, 2014-09-02 at 14:04 -0400, Benjamin Tissoires wrote:

> 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.

Looks good to me. I'd be surprised if this breaks anything.

Acked-by: Matthew Garrett <matthew.garrett@nebula.com>

-- 
Matthew Garrett <matthew.garrett@nebula.com>
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] platform/x86: toshiba: re-enable acpi hotkeys after suspend to disk
  2014-09-02 18:07 ` Matthew Garrett
@ 2014-09-02 22:50   ` Darren Hart
  0 siblings, 0 replies; 3+ messages in thread
From: Darren Hart @ 2014-09-02 22:50 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: benjamin.tissoires, platform-driver-x86, linux-kernel

On Tue, Sep 02, 2014 at 06:07:19PM +0000, Matthew Garrett wrote:
> On Tue, 2014-09-02 at 14:04 -0400, Benjamin Tissoires wrote:
> 
> > 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.
> 
> Looks good to me. I'd be surprised if this breaks anything.
> 
> Acked-by: Matthew Garrett <matthew.garrett@nebula.com>

Queued. Thanks.

--
Darren Hart
Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-02 22:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-02 18:04 [PATCH] platform/x86: toshiba: re-enable acpi hotkeys after suspend to disk Benjamin Tissoires
2014-09-02 18:07 ` Matthew Garrett
2014-09-02 22:50   ` Darren Hart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®