@@ -142,6 +142,7 @@ struct platform_s2idle_ops {
void (*restore_early)(void);
void (*restore)(void);
void (*end)(void);
+ int (*turn_on_display)(void);
int (*sleep_exit)(void);
int (*display_on)(void);
};
@@ -264,6 +264,13 @@ static int platform_standby_sleep_entry(void)
return s2idle_ops && s2idle_ops->sleep_entry ? s2idle_ops->sleep_entry() : 0;
}
+static int platform_standby_turn_on_display(void)
+{
+ return s2idle_ops && s2idle_ops->turn_on_display ?
+ s2idle_ops->turn_on_display() :
+ 0;
+}
+
static int platform_standby_sleep_exit(void)
{
return s2idle_ops && s2idle_ops->sleep_exit ? s2idle_ops->sleep_exit() : 0;
The Turn On Display callback was introduced in Windows 22H2, to allow devices to resume faster from sleep. Essentially, if the device lowers its power limit (PLx) while it is in the Sleep state, this might lengthen the suspend sequence in an undesirable manner. Therefore, this callback can be used to restore PLx while still remaining in the sleep state. Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev> --- include/linux/suspend.h | 1 + kernel/power/suspend.c | 7 +++++++ 2 files changed, 8 insertions(+)