Platform-driver-x86 Archive on lore.kernel.org
 help / color / Atom feed
From: Benjamin Berg <benjamin@sipsolutions.net>
To: Hans de Goede <hdegoede@redhat.com>,
	Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>
Cc: ibm-acpi-devel@lists.sourceforge.net,
	platform-driver-x86@vger.kernel.org,
	Benjamin Berg <bberg@redhat.com>
Subject: [PATCH] platform/x86: thinkpad_acpi: Send tablet mode switch at wakeup time
Date: Mon, 23 Nov 2020 14:21:57 +0100
Message-ID: <20201123132157.866303-1-benjamin@sipsolutions.net> (raw)

From: Benjamin Berg <bberg@redhat.com>

The lid state may change while the machine is suspended. As such, we may
need to re-check the state at wake-up time (at least when waking up from
hibernation).
Add the appropriate call to the resume handler in order to sync the
SW_TABLET_MODE switch state with the hardware state.

Fixes: dda3ec0aa631 ("platform/x86: thinkpad_acpi: Implement tablet mode using GMMS method")
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=210269
Signed-off-by: Benjamin Berg <bberg@redhat.com>
---
 drivers/platform/x86/thinkpad_acpi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index e3810675090a..9104e0ee37cd 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -4228,6 +4228,7 @@ static void hotkey_resume(void)
 		pr_err("error while attempting to reset the event firmware interface\n");
 
 	tpacpi_send_radiosw_update();
+	tpacpi_input_send_tabletsw();
 	hotkey_tablet_mode_notify_change();
 	hotkey_wakeup_reason_notify_change();
 	hotkey_wakeup_hotunplug_complete_notify_change();
-- 
2.26.2


             reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-23 13:21 Benjamin Berg [this message]
2020-11-23 22:43 ` ibm-acpi
2020-11-24 12:10 ` Hans de Goede

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=20201123132157.866303-1-benjamin@sipsolutions.net \
    --to=benjamin@sipsolutions.net \
    --cc=bberg@redhat.com \
    --cc=hdegoede@redhat.com \
    --cc=ibm-acpi-devel@lists.sourceforge.net \
    --cc=ibm-acpi@hmh.eng.br \
    --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

Platform-driver-x86 Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/platform-driver-x86/0 platform-driver-x86/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 platform-driver-x86 platform-driver-x86/ https://lore.kernel.org/platform-driver-x86 \
		platform-driver-x86@vger.kernel.org
	public-inbox-index platform-driver-x86

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.platform-driver-x86


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git