On Thu, 08 Jun 2023, Jerome Neanne wrote: > Use new API for power-off mode support: > Link: https://lwn.net/Articles/894511/ > Link: https://lore.kernel.org/all/7hfseqa7l0.fsf@xxxxxxxxxxxx/ > > sys-off API allows support of shutdown handler and restart handler. > > Shutdown was not supported before that enhancement. > This is required for platform that are not using PSCI. > > Test: > - restart: > # reboot > Default is cold reset: > # cat /sys/kernel/reboot/mode > Switch boot mode to warm reset: > # echo warm > /sys/kernel/reboot/mode > - power-off: > # halt > > Tested on AM62-LP-SK board. > > Signed-off-by: Jerome Neanne <jneanne@xxxxxxxxxxxx> > Suggested-by: Andrew Davis <afd@xxxxxx> > Reviewed-by: Andrew Davis <afd@xxxxxx> > --- > > Notes: > Change-log v3 to v2 > v2: Link: https://lore.kernel.org/lkml/20230511122100.2225417-1-jneanne@xxxxxxxxxxxx/ > Lee Jones Review: > nits: rm not needed line wraps and restore a cr deleted not related with the patch. > > Change-log v2 to v1 > v1: Link: https://lore.kernel.org/all/20230203140150.13071-1-jneanne@xxxxxxxxxxxx/ > Andrew Davis Review: > - Use new helpers devm_register_restart_handler and devm_register_power_off_handler > Vignesh Raghavendra: > - Fix typo on board name in commit message > > drivers/mfd/tps65219.c | 38 ++++++++++++++++++++++++++++---------- > 1 file changed, 28 insertions(+), 10 deletions(-) Applied, thanks -- Lee Jones [李琼斯]