platform/x86: asus-wmi: Disable OOBE state after resume from hibernation
[ Upstream commit 77bdac73754e4c0c564c1ca80fe3d9c93b0e715a ] ASUS firmware resets OOBE state during S4 suspend, so the keyboard blinks during resume from hibernation. This patch disables OOBE state after resume from hibernation. Signed-off-by: Pavel Nikulin <pavel@noa-labs.com> Link: https://lore.kernel.org/r/20250418140706.1691-1-pavel@noa-labs.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
00fe4c0e46
commit
2418bf5d38
@@ -304,6 +304,7 @@ struct asus_wmi {
|
|||||||
|
|
||||||
u32 kbd_rgb_dev;
|
u32 kbd_rgb_dev;
|
||||||
bool kbd_rgb_state_available;
|
bool kbd_rgb_state_available;
|
||||||
|
bool oobe_state_available;
|
||||||
|
|
||||||
u8 throttle_thermal_policy_mode;
|
u8 throttle_thermal_policy_mode;
|
||||||
u32 throttle_thermal_policy_dev;
|
u32 throttle_thermal_policy_dev;
|
||||||
@@ -1826,7 +1827,7 @@ static int asus_wmi_led_init(struct asus_wmi *asus)
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_OOBE)) {
|
if (asus->oobe_state_available) {
|
||||||
/*
|
/*
|
||||||
* Disable OOBE state, so that e.g. the keyboard backlight
|
* Disable OOBE state, so that e.g. the keyboard backlight
|
||||||
* works.
|
* works.
|
||||||
@@ -4741,6 +4742,7 @@ static int asus_wmi_add(struct platform_device *pdev)
|
|||||||
asus->egpu_enable_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_EGPU);
|
asus->egpu_enable_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_EGPU);
|
||||||
asus->dgpu_disable_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_DGPU);
|
asus->dgpu_disable_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_DGPU);
|
||||||
asus->kbd_rgb_state_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_TUF_RGB_STATE);
|
asus->kbd_rgb_state_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_TUF_RGB_STATE);
|
||||||
|
asus->oobe_state_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_OOBE);
|
||||||
asus->ally_mcu_usb_switch = acpi_has_method(NULL, ASUS_USB0_PWR_EC0_CSEE)
|
asus->ally_mcu_usb_switch = acpi_has_method(NULL, ASUS_USB0_PWR_EC0_CSEE)
|
||||||
&& dmi_check_system(asus_ally_mcu_quirk);
|
&& dmi_check_system(asus_ally_mcu_quirk);
|
||||||
|
|
||||||
@@ -4994,6 +4996,13 @@ static int asus_hotk_restore(struct device *device)
|
|||||||
}
|
}
|
||||||
if (!IS_ERR_OR_NULL(asus->kbd_led.dev))
|
if (!IS_ERR_OR_NULL(asus->kbd_led.dev))
|
||||||
kbd_led_update(asus);
|
kbd_led_update(asus);
|
||||||
|
if (asus->oobe_state_available) {
|
||||||
|
/*
|
||||||
|
* Disable OOBE state, so that e.g. the keyboard backlight
|
||||||
|
* works.
|
||||||
|
*/
|
||||||
|
asus_wmi_set_devstate(ASUS_WMI_DEVID_OOBE, 1, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
if (asus_wmi_has_fnlock_key(asus))
|
if (asus_wmi_has_fnlock_key(asus))
|
||||||
asus_wmi_fnlock_update(asus);
|
asus_wmi_fnlock_update(asus);
|
||||||
|
|||||||
Reference in New Issue
Block a user