Re: [PATCH 1/2] clk: qcom: common: Add support for power-domain attachment

From: Bryan O'Donoghue
Date: Mon Nov 18 2024 - 17:52:37 EST


On 18/11/2024 22:17, Vladimir Zapolskiy wrote:
    ret = devm_pm_domain_attach_list(dev, NULL, &cc->pd_list);
    if (ret < 0 && ret != -EEXIST)
        return ret;

That's it. No need to introduce a new function, not saying about 20 LoC off.

Next, you have to call dev_pm_domain_detach_list() in your version of the
change on the error paths etc., fortunately this can be easily avoided,
if the resource management flavour of the same function is in use.

From memory I _thought_ I concluded this was necessary

+ /* Only one power-domain platform framework will hook it up */
+ if (dev->pm_domain)
+ return 0;

=> for clocks which have a single power-domain the core framework will already have setup the linkage by the time we get to this point in the code.

But, I'll check again to make sure.

---
bod