From nobody Mon Feb 9 19:37:49 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9681638E108 for ; Mon, 2 Feb 2026 18:10:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770055825; cv=none; b=tc3jlTDOmCZPwKGu0S/QGFDsM+Dd215VUCBV3HeK1b8qZjizydLa1HkMLxZl9hXcmq7fBZqeiw81t//O0Oadm5mAs5nJhaZGu6l4ZQKjQwki1gJ4taZd4sxmoFP1YmOCE99YbWzA/zCzAtj53tQpzVpDFxubSTMb9+Rzt6cOS8w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770055825; c=relaxed/simple; bh=Ca7dUrycfmQSIy3bhmc2ircfbQn7cqmMeOtkOf+AclE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=m6ScjH/GxUiqLbio67hO4DNUTdh5m5k/s3lxMKntd4A0MM6abssb4nok3oaAMzJOtQO2G78Y7X+HnVpsb0lhyr0SIf5q8afxW7PSr/EeFahlh9ff5CiV6nsp+39Zgafb4jepp4CzcoXrXLA9nO2HGXDOguR77wx4ki+D8R+R+cI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=ZULst0HF; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=cG6zv38J; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="ZULst0HF"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="cG6zv38J" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 612B0MiO2899912 for ; Mon, 2 Feb 2026 18:10:22 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=LxiuI5+/w1m 8/5Ddt8uPvaeMtlwMfkEvGlJMXIthprs=; b=ZULst0HF+q0UmDswXLZ0oR0Q8ej MxXSLAabYMthDy9H+faB9n0Y1FH2GVwOxPooOIc9QakR28/Q3L9yFPG08L9Nw2Ge 66NIcJwB0ESgP0LPuILv6kQO+OPMw+9JeEOxLt9YrarUgIOR1fy4XrHyZVqO2z+g DoqFeJTc27TsXag/iEh3BCBmlYLYeHd6H+apO3XZe5to6d9y6bPrQFUjTms8aR1q Uz98B/Dh5VEHhCgOr5C6nzQe/f+JxNscp2WI2qI0UXziiHCBDY6t45C0xw9f/JPe l99Kj83r2b2XO5DUsfias2sVYyUqK7BVx67J3OQIYajpqeNMIdHig/vBHmA== Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4c2tp0sa9f-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 02 Feb 2026 18:10:22 +0000 (GMT) Received: by mail-pg1-f197.google.com with SMTP id 41be03b00d2f7-b630753cc38so9469626a12.1 for ; Mon, 02 Feb 2026 10:10:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1770055821; x=1770660621; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LxiuI5+/w1m8/5Ddt8uPvaeMtlwMfkEvGlJMXIthprs=; b=cG6zv38J2KO9MNNldnpMv7m7S9ZZTNCElzk6rteknYeAoMwfMZ0z/qq7V1DuHAk+ES qN+y7OPCVc53bO51mQN4bG7H4BY8PxJndqnnULz6L7GOedY7oIJz2y2nSvtqqiN5zV6r nDn/Z4YbFgfw+4BgMBTReU5BtsEOIfpLYI4m46Cg5DfAe5KBXyC7s/wH4R6GtiUDTVi0 t0iStmnoZLYqF/S9LrRuajY/fTq2NY7V8xw72xT4TneJlo8Va9SM/F0sjCsADTnR1iA/ JlmtbyadcI8/cW6/S7n3o9YJB3VJpHsxcRmVd02zSZtNeSqQLn5dKf91PwJKwJuxK9Au 43xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770055821; x=1770660621; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=LxiuI5+/w1m8/5Ddt8uPvaeMtlwMfkEvGlJMXIthprs=; b=G3YXfs6PnmmANUCoGWsyLn/TVkiFEE486xM9+gUDX16Fjzkgrcd2U4m1YNjUxR75gb rLd0d51D0Uo8aFDqywE1jOaLePyjeWlSv3M+mCTMJWR4XK/gl+gTrHH8Gbsi8l50nHX+ maTOuHImG9h5q75pcqqwpL1JNPiMNvihPaJIQUzxe4/0HCMfBQbpycnQbQAiCiqdNtEm 312FmelpxNufd7s1GzNq6UmslZ4O7/J/BR6B7TwiyvukZ2OeKCozETQeTDvH456jSwg+ 0m44cqLOo+DJFkAkevrGGYoerYmfGBRw+wC6Y1cnbEzoqTtTWYeDvPjATj0ZX1+bvJeI QuzQ== X-Forwarded-Encrypted: i=1; AJvYcCXgrx+HM0zzYdK8dIdp2B8MTCCo+CosPuNTfHW1wBBEkUo82TzWQPqzpOSIdFmwqV+nioOKiweuNxCyQts=@vger.kernel.org X-Gm-Message-State: AOJu0YwZluZHHR5od/o2Ke3rDKe3QkpBCoJwWEgisFCuy38ulhA7Juuk lu4iMFzCRuTVNdWvuezXDA4igPTHveuNiYxcBsXI1Gvs/z+jL3UELz4eYqZvHl+gz2rSRhkQOJk JaRI/nU7YtQ28XNzes0efdPNjXnGvCvnhw3uvcP4iRxoIW4RwIVcPvlCXjAdSBdHcxrk= X-Gm-Gg: AZuq6aKbMCx7XRma2djSoEp9lPlYKXlsj7GudF4bHhd/iN+h4G6AR64yS+PmwqYB1OF 5FWj4V4dr0kiGLumWzAAcTSdIkovfb9yEi6JeiS5fKibwaqAI2SkKfVqQr5JWsxS/zmsZwVyewU q9K4zdkXUBnqMSvt9TxMAO4/4DTrIGZ8RtWgp8dpiJgxM0+8jZG4oqq70fBy1FTHaax933tIf1L D74ARLwSDKmMwP8KYiexLfJmNw1JDz/hDCdaXswVGb1ubSMvoaWTbc75uy4Qv3P92NKuujfZuWT zF/3qFZ702qmy2Z4ExExT8Gbvd0rX9GoHKl32kvAXpX0DbYF8gL6xmGSiLJP69w6Ki5SRuoQ+r1 u+2M+EDTKHaga+4RIvdVpjbljKArChX+pbm2pWuwNzLM= X-Received: by 2002:a05:6a00:94f3:b0:823:f51:192e with SMTP id d2e1a72fcca58-823ab756df4mr12339929b3a.51.1770055821198; Mon, 02 Feb 2026 10:10:21 -0800 (PST) X-Received: by 2002:a05:6a00:94f3:b0:823:f51:192e with SMTP id d2e1a72fcca58-823ab756df4mr12339898b3a.51.1770055820680; Mon, 02 Feb 2026 10:10:20 -0800 (PST) Received: from hu-ptalari-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-82379bfc712sm17476780b3a.40.2026.02.02.10.10.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Feb 2026 10:10:20 -0800 (PST) From: Praveen Talari To: Andi Shyti , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Mukesh Kumar Savaliya , Viken Dadhaniya , Bjorn Andersson , Konrad Dybcio , Praveen Talari , linux-arm-msm@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, bjorn.andersson@oss.qualcomm.com, dmitry.baryshkov@oss.qualcomm.com, konrad.dybcio@oss.qualcomm.com Cc: prasad.sodagudi@oss.qualcomm.com, quic_vtanuku@quicinc.com, aniket.randive@oss.qualcomm.com, chandana.chiluveru@oss.qualcomm.com, jyothi.seerapu@oss.qualcomm.com Subject: [PATCH v4 06/13] soc: qcom: geni-se: Introduce helper API for attaching power domains Date: Mon, 2 Feb 2026 23:39:15 +0530 Message-Id: <20260202180922.1692428-7-praveen.talari@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260202180922.1692428-1-praveen.talari@oss.qualcomm.com> References: <20260202180922.1692428-1-praveen.talari@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: fGtyod1oeM5MyA8DEcJCGnzJK5D1LYdm X-Authority-Analysis: v=2.4 cv=VJ/QXtPX c=1 sm=1 tr=0 ts=6980e88e cx=c_pps a=rz3CxIlbcmazkYymdCej/Q==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=WUWHbvwt6nHlCWk_UTEA:9 a=bFCP_H2QrGi7Okbo017w:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjAyMDE0MiBTYWx0ZWRfXzqdcJXUGuGkW vm6jnqw5xVedN5AhgSckzdgv+FYTjcY/IfZDFjDL2DWGCIxVyHB/NUokWII/y3ys6hj3TP2u4EM tnV1EqiXl1oZj+Azxb9Y27Cj8CfEpTG1aabD4eJ4IwKBrKr/jl30lOoJIXQjr56GOTHVYn4/r5f vY2df9Gt5zkWlTp+sFpk6ATYZSd7D67/zLCbGwVIXUOeEUg3bIDoGJPwXu/vaOvrbsXIP0BijWo DkB8ZyZspg/iiv4v8LlzuV0I2ciWKcmayDIvipSxVbkWmY3M/XYw/ShYdcwIVByrwDVeizVqZrb COiafiRKVS0v7bLxDaTREPwtNccsE9W2uLDYFFNt78BuzUvsq/KbiooptvKJoxCYYu1xL9DT0tm yEc8ywvGhDpnWHRV+T08ISJGLdJR9NllTTYwIKszYwVwJjXqaLtu7m/kCfXJbJq6dlrDjfQS8nQ p2ziflw9iI79TfbM+MA== X-Proofpoint-GUID: fGtyod1oeM5MyA8DEcJCGnzJK5D1LYdm X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-02-02_05,2026-02-02_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 adultscore=0 malwarescore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 phishscore=0 priorityscore=1501 impostorscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602020142 Content-Type: text/plain; charset="utf-8" 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 --- v3->v4 Konrad - Updated function documentation --- drivers/soc/qcom/qcom-geni-se.c | 29 +++++++++++++++++++++++++++++ include/linux/soc/qcom/geni-se.h | 4 ++++ 2 files changed, 33 insertions(+) diff --git a/drivers/soc/qcom/qcom-geni-se.c b/drivers/soc/qcom/qcom-geni-s= e.c index 17ab5bbeb621..d80ae6c36582 100644 --- a/drivers/soc/qcom/qcom-geni-se.c +++ b/drivers/soc/qcom/qcom-geni-se.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include =20 @@ -1092,6 +1093,34 @@ int geni_se_resources_activate(struct geni_se *se) } EXPORT_SYMBOL_GPL(geni_se_resources_activate); =20 +/** + * geni_se_domain_attach() - Attach power domains to a GENI SE device. + * @se: Pointer to the geni_se structure representing the GENI SE device. + * + * This function attaches the power domains ("power" and "perf") required + * in the SCMI auto-VM environment to the GENI Serial Engine device. It + * initializes se->pd_list with the attached domains. + * + * Return: 0 on success, or a negative error code on failure. + */ +int geni_se_domain_attach(struct geni_se *se) +{ + struct dev_pm_domain_attach_data pd_data =3D { + .pd_flags =3D PD_FLAG_DEV_LINK_ON, + .pd_names =3D (const char*[]) { "power", "perf" }, + .num_pd_names =3D 2, + }; + int ret; + + ret =3D dev_pm_domain_attach_list(se->dev, + &pd_data, &se->pd_list); + if (ret <=3D 0) + return -EINVAL; + + return 0; +} +EXPORT_SYMBOL_GPL(geni_se_domain_attach); + /** * geni_se_resources_init() - Initialize resources for a GENI SE device. * @se: Pointer to the geni_se structure representing the GENI SE device. diff --git a/include/linux/soc/qcom/geni-se.h b/include/linux/soc/qcom/geni= -se.h index 36a68149345c..5f75159c5531 100644 --- a/include/linux/soc/qcom/geni-se.h +++ b/include/linux/soc/qcom/geni-se.h @@ -64,6 +64,7 @@ struct geni_icc_path { * @num_clk_levels: Number of valid clock levels in clk_perf_tbl * @clk_perf_tbl: Table of clock frequency input to serial engine clock * @icc_paths: Array of ICC paths for SE + * @pd_list: Power domain list for managing power domains * @has_opp: Indicates if OPP is supported */ struct geni_se { @@ -75,6 +76,7 @@ struct geni_se { unsigned int num_clk_levels; unsigned long *clk_perf_tbl; struct geni_icc_path icc_paths[3]; + struct dev_pm_domain_list *pd_list; bool has_opp; }; =20 @@ -546,5 +548,7 @@ int geni_se_resources_activate(struct geni_se *se); int geni_se_resources_deactivate(struct geni_se *se); =20 int geni_load_se_firmware(struct geni_se *se, enum geni_se_protocol_type p= rotocol); + +int geni_se_domain_attach(struct geni_se *se); #endif #endif --=20 2.34.1