Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

clk: qcom: common: Add support for power-domain attachment

Right now we support one power-domain per clock controller.
These single power-domains are switched on by the driver platform logic.

However when we have multiple power-domains attached to a clock-controller
that list of power-domains must be handled outside of driver platform
logic.

Use devm_pm_domain_attach_list() to automatically hook the list of given
power-domains in the dtsi for the clock-controller driver.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Link: https://lore.kernel.org/r/20250117-b4-linux-next-24-11-18-clock-multiple-power-domains-v10-3-13f2bb656dad@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>

authored by

Bryan O'Donoghue and committed by
Bjorn Andersson
ed5a0d06 65a73346

+5
+5
drivers/clk/qcom/common.c
··· 22 22 struct qcom_reset_controller reset; 23 23 struct clk_regmap **rclks; 24 24 size_t num_rclks; 25 + struct dev_pm_domain_list *pd_list; 25 26 }; 26 27 27 28 const ··· 299 298 cc = devm_kzalloc(dev, sizeof(*cc), GFP_KERNEL); 300 299 if (!cc) 301 300 return -ENOMEM; 301 + 302 + ret = devm_pm_domain_attach_list(dev, NULL, &cc->pd_list); 303 + if (ret < 0 && ret != -EEXIST) 304 + return ret; 302 305 303 306 reset = &cc->reset; 304 307 reset->rcdev.of_node = dev->of_node;