<div dir="ltr">Hi<div>There is such struct as 'notifier_block'. It has member 'notifier_call' where You assign pointer to your function (handler) and priority. Then You register such notifier block to restart handler list. <br></div><div>Then when You type in linux reboot Your function might be invoked (depends on priority you set and if You don't have registered arm_pm_restart function which is typically done through device tree) .</div><div>My question is should I always return NOTIFY_DONE from my restart handler? Or can I return some error code? In fact this doesn't make sense to return any other code value as Your restart handler has to succeed always in order not to halt system and not to do manually recovery by power off/on.</div></div>