cpuidle: psci: Attach CPU devices to their PM domains
authorUlf Hansson <ulf.hansson@linaro.org>
Thu, 10 Oct 2019 10:01:48 +0000 (12:01 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 2 Jan 2020 15:50:28 +0000 (16:50 +0100)
commit8554951a4dd3d3a1a0efeba8eb5543eee7533be4
tree7d1b89c25982de4d4ee09d43d63e6a3290f6b925
parenta5e0454cf3920f1e5ec1fae71783e576ea9b1318
cpuidle: psci: Attach CPU devices to their PM domains

In order to enable a CPU to be power managed through its PM domain, let's
try to attach it by calling psci_dt_attach_cpu() during the cpuidle
initialization.

psci_dt_attach_cpu() returns a pointer to the attached struct device, which
later should be used for runtime PM, hence we need to store it somewhere.
Rather than adding yet another per CPU variable, let's create a per CPU
struct to collect the relevant per CPU variables.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Rafael J. Wysocki <rafael@kernel.org>
drivers/cpuidle/cpuidle-psci.c