Commit b5fc9453 authored by Kevin Hilman's avatar Kevin Hilman Committed by Ulf Hansson
Browse files

pmdomain: ti_sci: add per-device latency constraint management



For each device in a TI SCI PM domain, check whether the device has
any resume latency constraints set via per-device PM QoS.  If
constraints are set, send them to DM via the new SCI constraints API.

Checking for constraints happen for each device before system-wide
suspend (via ->suspend() hook.)

An important detail here is that the PM domain driver inserts itself
into the path of both the ->suspend() and ->resume() hook path
of *all* devices in the PM domain.  This allows generic PM domain code
to handle the constraint management and communication with TI SCI.

Further, this allows device drivers to use existing PM QoS APIs to
add/update constraints.

DM firmware clears constraints during its resume, so Linux has
to check/update/send constraints each time system suspends.

Also note that the PM QoS framework uses usecs as the units for
latency whereas the TI SCI firmware uses msecs, so a conversion is
needed before passing to TI SCI.

Co-developed-by: default avatarVibhore Vardhan <vibhore@ti.com>
Signed-off-by: default avatarVibhore Vardhan <vibhore@ti.com>
Reviewed-by: default avatarMarkus Schneider-Pargmann <msp@baylibre.com>
Reviewed-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Tested-by: default avatarDhruva Gole <d-gole@ti.com>
Signed-off-by: default avatarKevin Hilman <khilman@baylibre.com>
Reviewed-by: default avatarDhruva Gole <d-gole@ti.com>
Message-ID: <20241206-lpm-v6-10-constraints-pmdomain-v6-1-833980158c68@baylibre.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent e1a87570
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment