kernel/reboot: Add register_platform_power_off()

Add platform-level registration helpers that will ease transition of the
arch/platform power-off callbacks to the new sys-off based API, allowing
us to remove the global pm_power_off variable in the future.

Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Dmitry Osipenko
2022-05-10 02:32:16 +03:00
committed by Rafael J. Wysocki
parent 0e2110d2e9
commit fb61375ecf
2 changed files with 58 additions and 0 deletions

View File

@@ -141,6 +141,9 @@ int devm_register_sys_off_handler(struct device *dev,
int (*callback)(struct sys_off_data *data),
void *cb_data);
int register_platform_power_off(void (*power_off)(void));
void unregister_platform_power_off(void (*power_off)(void));
/*
* Architecture independent implemenations of sys_reboot commands.
*/