Re: [PATCH v4 06/13] soc: qcom: geni-se: Introduce helper API for attaching power domains

From: Praveen Talari

Date: Wed Feb 04 2026 - 00:19:42 EST




On 2/3/2026 5:53 PM, Konrad Dybcio wrote:
On 2/2/26 7:09 PM, Praveen Talari wrote:
The GENI Serial Engine drivers (I2C, SPI, and SERIAL) currently handle
the attachment of power domains. This often leads to duplicated code
logic across different driver probe functions.

Introduce a new helper API, geni_se_domain_attach(), to centralize
the logic for attaching "power" and "perf" domains to the GENI SE
device.

Signed-off-by: Praveen Talari <praveen.talari@xxxxxxxxxxxxxxxx>
---

[...]

+int geni_se_domain_attach(struct geni_se *se)
+{
+ struct dev_pm_domain_attach_data pd_data = {
+ .pd_flags = PD_FLAG_DEV_LINK_ON,
+ .pd_names = (const char*[]) { "power", "perf" },
+ .num_pd_names = 2,
+ };
+ int ret;
+
+ ret = dev_pm_domain_attach_list(se->dev,
+ &pd_data, &se->pd_list);

Let's use devm_pm_domain_attach_list() (notice the 'm'), as the list
is never detached from at the moment

Sure, will add in next version.

Thanks,
Praveen Talari

otherwise lgtm

Konrad