mbox series

[v6,0/3] SCMI System Power Support

Message ID 20200907174657.32466-1-cristian.marussi@arm.com (mailing list archive)
Headers show
Series SCMI System Power Support | expand

Message

Cristian Marussi Sept. 7, 2020, 5:46 p.m. UTC
Hi all,

this series wants to add the core SCMI System Power support and related
events' handling logic: the protocol support itself is trivial and boils
down to some bare initializations and supporting one SCMI System Power
notification event meant to carry platform-originated System transition
requests. This is patch [1/3].

Patch [2/3] simply adds a new System Power device name to the core driver.

On top of this a new SCMI driver has been developed which registers for
such System Power notification and acts accordingly to satisfy such plaform
system-state transition requests that can be of forceful or graceful kind.

In order to comply with such graceful requests, and co-operate with
userspace entities to drive a clean shutdown/reboot, the logic of the
driver relies on the same orderly_* API methods used by ACPI when handling
ACPI Shutdown bus events.
As an alternative method to tunnel graceful requests to userspace it is
possible to configure, via available module parameters, a specific signal
to be sent to CAD pid. This is patch [3/3].

Based on v5.9-rc4
(which now includes needed SCMI Notifications Core Support)

Thanks

Cristian

----
v5 --> v6
- rebased on v5.9-rc4
- removed DEBUG Juno dts example
- split out "syspower" device definition from System Power Control driver
  into its own patch
- fixe ret usage in syspower_control _probe/_remove

v4 --> v5
- rebased on v5.9-rc1 


Cristian Marussi (3):
  firmware: arm_scmi: Add System Power Protocol support
  firmware: arm_scmi: add SCMI System Power devname
  firmware: arm_scmi: Add SCMI System Power Control driver

 drivers/firmware/Kconfig                      |  12 +
 drivers/firmware/arm_scmi/Makefile            |   3 +-
 drivers/firmware/arm_scmi/driver.c            |   1 +
 .../firmware/arm_scmi/scmi_power_control.c    | 387 ++++++++++++++++++
 drivers/firmware/arm_scmi/system.c            | 136 ++++++
 include/linux/scmi_protocol.h                 |  18 +
 6 files changed, 556 insertions(+), 1 deletion(-)
 create mode 100644 drivers/firmware/arm_scmi/scmi_power_control.c
 create mode 100644 drivers/firmware/arm_scmi/system.c

Comments

Sudeep Holla Sept. 14, 2020, 6:36 a.m. UTC | #1
On Mon, 7 Sep 2020 18:46:54 +0100, Cristian Marussi wrote:
> this series wants to add the core SCMI System Power support and related
> events' handling logic: the protocol support itself is trivial and boils
> down to some bare initializations and supporting one SCMI System Power
> notification event meant to carry platform-originated System transition
> requests. This is patch [1/3].
> 
> Patch [2/3] simply adds a new System Power device name to the core driver.
> 
> [...]

As mentioned earlier, I am picking up only scmi firmware driver related
changes, we need more review or feedback on the user interface part.

Applied to sudeep.holla/linux (for-next/scmi), thanks!

[1/2] firmware: arm_scmi: Add system power protocol support
      https://git.kernel.org/sudeep.holla/c/a880305512
[2/2] firmware: arm_scmi: Add SCMI device for system power protocol
      https://git.kernel.org/sudeep.holla/c/481f6ccf39

--

Regards,
Sudeep