On Mon, Oct 26, 2020 at 08:55:31PM +0000, Cristian Marussi wrote: > Add an SCMI System Power control driver to handle platform's requests > carried by SYSTEM_POWER_STATE_NOTIFIER notifications: such platform > requested system power state transitions are handled accordingly, > gracefully or forcefully, depending on the notifications' message flags. > > Graceful requests are by default relayed to userspace using the same > Kernel API used to handle ACPI Shutdown bus events: alternatively, instead, > a few available module parameters can be used to tunnel instead such > requests to userspace via signals addressed to CAD pid. > > When handling graceful requests, grant userspace processes a maximum > (configurable) time to perform their duties and then revert to a forceful > transition, so avoiding completely timing out platform's maximum grace time > and hitting possible abrupt power-cuts. > > Signed-off-by: Cristian Marussi <cristian.maru...@arm.com> > --- > drivers/firmware/Kconfig | 12 + > drivers/firmware/arm_scmi/Makefile | 1 + > .../firmware/arm_scmi/scmi_power_control.c | 387 ++++++++++++++++++ > 3 files changed, 400 insertions(+) > create mode 100644 drivers/firmware/arm_scmi/scmi_power_control.c >
[nit] Since you have just one patch, it is generally preferred to place all the extra non commit messages here after diff stat to have a single thread of discussion. Anyways, probably ccing Arnd/Greg/or anyone who has made some feature changes in this area(e.g. kernel/reboot.c) might help to get some useful feedback here. -- Regards, Sudeep