On Tue, Oct 28, 2014 at 08:47:46AM +0000, Russell King - ARM Linux wrote: > On Tue, Oct 28, 2014 at 09:16:16AM +0100, Johan Hovold wrote: > > It looks like we're soon to be having power-off call chains, with > > configurable priorities, to shut of various parts of the hardware > > I really hope that they *don't* get used like that. I guess this is > what happens when people don't read the code before they decide to > implement something. > > All the reboot/power off/halt methods already call into the driver model, > and the driver model then iterates over all bound drivers calling their > "shutdown" method. So, today, as it has been for years, all device > drivers are notified of system power off. > > That's where most device drivers should be cleanly stopping their > hardware. > > The only thing which is left is the actual hardware triggering of the > action, and that should be what's done via the notifier. That's not what I was trying to refer to. But the patch set explicitly allows for multiple, prioritised power-off handlers, which can power off a board in different ways and with various degrees of success. Specifically, it allows for fallback handlers in case one or more power-off handlers fail. So if we allow for that, what is to prevent the final power-off handler from failing? And should this not be logged by arch code in the same way as failure to restart is? Johan -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html