Commit f8829362 authored by Ulf Hansson's avatar Ulf Hansson Committed by Anant Goel
Browse files

UPSTREAM: PM: domains: Add helper functions to attach/detach multiple PM domains



Attaching/detaching of a device to multiple PM domains has started to
become a common operation for many drivers, typically during ->probe() and
->remove(). In most cases, this has lead to lots of boilerplate code in the
drivers.

To fixup up the situation, let's introduce a pair of helper functions,
dev_pm_domain_attach|detach_list(), that driver can use instead of the
open-coding. Note that, it seems reasonable to limit the support for these
helpers to DT based platforms, at it's the only valid use case for now.

Suggested-by: default avatarDaniel Baluta <daniel.baluta@nxp.com>
Tested-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Tested-by: default avatarIuliana Prodan <iuliana.prodan@nxp.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20240130123951.236243-2-ulf.hansson@linaro.org



Bug: 323966425
Change-Id: Ib0cc368d9eac3a9615b75ca5954d81ab6b14b4b2
(cherry picked from commit 161e16a5)
Signed-off-by: default avatarNikunj Kela <quic_nkela@quicinc.com>
Signed-off-by: default avatarAnant Goel <quic_anantg@quicinc.com>
parent 7b1e2d97
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment