platform/x86: thinkpad_acpi: Send tablet mode switch at wakeup time
PATCH 1/1 platform/x86: thinkpad_acpi: Send tablet mode switch at wakeup time
From: Benjamin Berg <[email protected]>
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.
--- drivers/platform/x86/thinkpad_acpi.c | 1 + 1 file changed, 1 insertion(+)
drivers/platform/x86/thinkpad_acpi.c +1 -0
@@ -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 ();
Signature · 1 line
2.26.2
Quoted 34 lines · Benjamin Berg
From: Benjamin Berg <[email protected]>
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 theSW_TABLET_MODEswitch state with the hardware state.Fixes dda3ec0aa631 ("platform/x86: thinkpad_acpi: Implement tabletmode using GMMS method")
Signed-off-by Benjamin Berg <[email protected]>--- drivers/platform/x86/thinkpad_acpi.c | 1 + 1 file changed, 1 insertion(+)drivers/platform/x86/thinkpad_acpi.c +1
-0@@ -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();Signature · 1 line
2.26.2
Hi,
Quoted 11 lines · Benjamin Berg
From: Benjamin Berg <[email protected]>
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 theSW_TABLET_MODEswitch state with the hardware state.Fixes dda3ec0aa631 ("platform/x86: thinkpad_acpi: Implement tablet mode using GMMS method")Signed-off-by Benjamin Berg <[email protected]>
Thank you for your patch, I've applied this patch to my review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans
Note it will show up in my review-hans branch once I've pushed my local branch there, which might take a while.
Once I've run some tests on this branch the patches there will be added to the platform-drivers-x86/for-next branch and eventually will be included in the pdx86 pull-request to Linus for the next merge-window.
Regards,
Hans
Quoted 17 lines
--- drivers/platform/x86/thinkpad_acpi.c | 1 + 1 file changed, 1 insertion(+)drivers/platform/x86/thinkpad_acpi.c +1
-0@@ -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 ();