Re: [PATCH 1/2] PM: domains: add device managed version of dev_pm_domain_attach|detach_list()

From: Bryan O'Donoghue
Date: Sun Jul 14 2024 - 19:08:27 EST


On 12/07/2024 06:48, Dikshita Agarwal wrote:
This patch adds the devres-enabled version of dev_pm_domain_attach|detach_list.
If client drivers use devm_pm_domain_attach_list() to attach the PM domains,
devm_pm_domain_detach_list() will be invoked implicitly during remove phase.

Signed-off-by: Dikshita Agarwal <quic_dikshita@xxxxxxxxxxx>
---

+ num_pds = dev_pm_domain_attach_list(dev, data, list);
+
+ ret = devm_add_action_or_reset(dev, devm_pm_domain_detach_list, (void *)list);

Fairly sure that cast isn't necessary eg

drivers/input/touchscreen/ili210x.c::ili210x_i2c_probe()
drivers/power/supply/axp288_fuel_gauge.c::axp288_fuel_gauge_probe()

---
bod