From nobody Sun Jun 14 23:03:48 2026 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 BDE7239DBE0 for ; Mon, 6 Apr 2026 22:15:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775513727; cv=none; b=pIukk7M0YLcpUOY90Xjv3u8eIm2ARFhDRnM0201on+uAblnBTWNdL7X8VgGldt4vAHbSFGx6QvnxCo39muDc2L4mlSFvWEMn7iNtTi0GvGxLVRvqa3E8sGVUYzJz39mII+VSOc6B2CLh78x2E2wKtQM3zzuU4Mo2qPJ5+c7BTEo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775513727; c=relaxed/simple; bh=21UOHw2FDKEN+NQXLQB0bKtW8K7sDULKYSr/W26DbLE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=H3iPjLrlfWUnvcY/4NLFT7xw/+EG9iGbcui44eV9SSFu1IQTV+tXuS1vYZn/mSWpXQPKsqiOd/u6PfBlPtqwi2Pu4Tw9/hdYfpOkRmXUpXF2d7TPr39PCURa0y1NSjel4VBl7v9uRoWKUGNGoACW5r34puFWUGCMWPNKuYLlf3Q= 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=o1++lzw7; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=GJYWzSQS; arc=none smtp.client-ip=205.220.168.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="o1++lzw7"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="GJYWzSQS" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 636LSLlL2328096 for ; Mon, 6 Apr 2026 22:15:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= d5wQ0jNKwTs0v9LfGYmAGw0dotNG//GXL5JPO5LvjF8=; b=o1++lzw72G68uDO3 HYLJp1ahuyJI48XkOx7k8w2vA4NdpGbRsO2aWKB6vbIemDGzuzZs0LABVE6Mia/G ozBd7ienFDrcoQNRnhbl1yejtg+uY4kNxZhPwlnj3RiUozoB3s7yuC2D6xpFCNBC 6s/z/x6wb0bcb1Tvfw0+4eFpTSMzxhOoXw5RMisvLDaaqNzZum2E6ol7FKlhOCeh yonZcVQ4z18WocZJyK4JNGQdN8kCWoZoLFtT4+WtQ/cG3+o/qV5LCoVaYS/hhuHd KSXi3AhEO/xacjrspKbuBxkDT4vIQjJ4YQlVFAooyzZtnwH4sEW8iKiNr60InRh8 Y2mQiw== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dcms4r39e-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 06 Apr 2026 22:15:24 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-35dacc40f92so3925369a91.2 for ; Mon, 06 Apr 2026 15:15:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1775513723; x=1776118523; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=d5wQ0jNKwTs0v9LfGYmAGw0dotNG//GXL5JPO5LvjF8=; b=GJYWzSQSiL1+TBs4aDJ2lh2yh87up3+XRFbFM+qWu+n7BqtgTKQqAVfevlH1GOt4N7 UqHvP8CDrSdNhwLD2o+Bt8xF8L7+OzpYdjcqGupTWtxjPNF7AKDdjdCTklQgbRZzOAXR eluW4Ov3ICBSLj68xyeRpUI05pOWkoHS6wHt/mR8A5Y/SeI0IQ1lRk6IZr/gojrT2RVD gbxS1voN/qX2hZYC8VWOtsCWFIvlROLkA/PDs5GyjHX8qEUzpxEdwfIXRbTO1MletSHq pKFOPykEHRC4FL6oqxpiUpUfHIQzI0oyqoMv3iArV+86g/Xt088Wtrmm3qvLM1pEUcwU LMhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775513723; x=1776118523; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=d5wQ0jNKwTs0v9LfGYmAGw0dotNG//GXL5JPO5LvjF8=; b=k3hmlltWVNpxz08ha9WAx0xN8AcMZPC26PXZ/3RjGzeq0O6b8QGbCOCeMjEoYYAtTW PmC8R5QdVaUhRBE1Eh0AFIz6b5X9+Br/v9IZOaU3QxDYkg9FTUJLB5bWkWt+2S1CiBTu EMieYLyfR7iWfO2P74uFdj+B17Ulf026fMf1Ks14O9e6ljKrQ27fjulN1w7CoSEr/8Rn xmN1sjrqCfDbRWdFcS7KGPO3NWaG+Vgv4geUF0+KuSvsAX4ZPhpIosK8oGEgR6cT4UA6 Bz3f6upvs1Sb13jxuF2EqgyPaaeJggn+yV5NskJg2EskgR2k20kxUhTgjetAVofQ3Yvg AE5A== X-Forwarded-Encrypted: i=1; AJvYcCVVVfCIJwiOM0L7IibS06GklhM8lzKeaDD4n/oH4IzgyW94mhdnrpwBbR76H5ug9KRnB0MSKNRso0cxERI=@vger.kernel.org X-Gm-Message-State: AOJu0Yxb5VyEZjeywYJPWsCWm8+1Qxz9PUT6vnECWXjiRmzuskNDS8yu 26pfViVnPSNK3ObVgv2CXgpY/8NGdUOp7JC0Oi4eAZser6Uk4dGLBqxm/Nzwq+q8QJ95g4epLSj 5jnbSnnFbxStPV0w1jI3DPMx9nvaqJ1k8qV2M7ASqD6OccNBuQsQKRexa3tgP400aDUUy1ofcxI I= X-Gm-Gg: AeBDieuH9kp41UlAtARABgogiDdk2ES1lugg2RPhizL+QA4HQ8mXoGUr5dpQoqleMVH hDWPjjR1lFvooQ3MgEAEjDFUgyKmrKleEDTntQ2b181Oj1OguLEa88H13NJeqgu8Fhuq15zSDub UgAZnR0L2bY82F6T3AtYq6T5Zm5kFmsTmKjR+14rqtDbz29GdX7ykbeXTVq3yYipsS9bXvfj+ZN zv+bV0akyDSf/P5SrsuvYrq8/pK3RzSB/VkhgoPgSljnBCRwYtaUVCTUJC5W5ZNlAVWHGJqLmxW X038mja1L+vrAcwsP1cozQ4/Uz88JDJ4QZ0PE2ezfG6873v5N8u2imOD/YqMKiE8qp95ihooc+n ytzAoqgDuUNgn7RL2bPcsLI+EtRlxLsUFKgkB2limDwfxdN8+WG8= X-Received: by 2002:a17:90a:d40e:b0:359:f77f:8cff with SMTP id 98e67ed59e1d1-35de6970c7emr12184960a91.19.1775513722608; Mon, 06 Apr 2026 15:15:22 -0700 (PDT) X-Received: by 2002:a17:90a:d40e:b0:359:f77f:8cff with SMTP id 98e67ed59e1d1-35de6970c7emr12184926a91.19.1775513721958; Mon, 06 Apr 2026 15:15:21 -0700 (PDT) Received: from hu-kamalw-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-35dd35e34f9sm14447519a91.1.2026.04.06.15.15.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2026 15:15:21 -0700 (PDT) From: Kamal Wadhwa Date: Tue, 07 Apr 2026 03:44:58 +0530 Subject: [PATCH 1/4] soc: qcom: rpmh: Add support to read back resource settings Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260407-read-rpmh-v3-v1-1-27db2a56b13e@oss.qualcomm.com> References: <20260407-read-rpmh-v3-v1-0-27db2a56b13e@oss.qualcomm.com> In-Reply-To: <20260407-read-rpmh-v3-v1-0-27db2a56b13e@oss.qualcomm.com> To: Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Mark Brown , Vinod Koul Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Kamal Wadhwa , Maulik Shah X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1775513714; l=7614; i=kamal.wadhwa@oss.qualcomm.com; s=20260406; h=from:subject:message-id; bh=qzVzmZ1EREIjmG4dbbMdDRDlit/vRooP9sfacElO0es=; b=i3b2AcSmi/+j3y2qYBjomppAZtlEYSIGmbqnFT9mVeoiJYiFSUBorTqLior2xaxA4km3ILRut 0qTp3SAUhgEBt0kNkZ5aHzjGR4Pf3FtjiVIbNbDgaR2WxCWKZ1/7dLw X-Developer-Key: i=kamal.wadhwa@oss.qualcomm.com; a=ed25519; pk=ylH1NxUZkBpYsmww89g6zVxpS0q8qthtzcORkYxn/Ag= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDA2MDIxOSBTYWx0ZWRfX5PdLAnX79b1M HiX9JxLv3SlqpBXzhf1W3sB4I26Pkd+cyDhbRfa3UbUZMSOd68sDdwQx68qu1zrge0qhDj4SF8A C60/pTa9umXwD7612YQtXd79cth04IPAfJKLNdG7SfkRqNErQcimhjcA16zHYnaqB5kon2VcuhG Ebl1o56Rn4mdW3edXGcvtpJIUOBC0N/qHdill4p9RAbo0GA/gNWDU0si7fSrHw0QHNtrOBXh56C ocjabIqbyJWaypctOHzWpGc88+/f9q/kbLcu5h/Zku1yQA0eSOK0NYGPVRvkTFami2S1/OIy+ol Agsd/kH/u/jwo04qVbvO83sK8X/myiicW9XbFGOmq0/88kd4ZLCUw8fi7h/IdVmB7Xa6Zxs5PoM bBTgmf9USc68AByv8JQ9sJlzGX1Kx1jzeqtJAoD0GjELav8YyEovNim2ObqTC8FURcEqByIFF3H sPVSHO1vjhmYBe9pLDQ== X-Proofpoint-ORIG-GUID: dTxact_oUe6JKNIpShPIWR8l1nqzFmMY X-Authority-Analysis: v=2.4 cv=WNZPmHsR c=1 sm=1 tr=0 ts=69d4307c cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=EUspDBNiAAAA:8 a=RgaPuue0vXMEEcOqpiYA:9 a=QEXdDO2ut3YA:10 a=uKXjsCUrEbL0IQVhDsJ9:22 X-Proofpoint-GUID: dTxact_oUe6JKNIpShPIWR8l1nqzFmMY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-04-06_04,2026-04-03_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 phishscore=0 spamscore=0 impostorscore=0 lowpriorityscore=0 suspectscore=0 clxscore=1015 malwarescore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604010000 definitions=main-2604060219 From: Maulik Shah All rpmh_*() APIs so far have supported placing votes for various resource settings but the H/W also have option to read resource settings. Add new rpmh_read() API to allow clients to read back resource setting from H/W. This will be useful for clients like regulators, which currently don't have a way to know the settings applied during bootloader stage. Signed-off-by: Maulik Shah Signed-off-by: Kamal Wadhwa --- drivers/soc/qcom/rpmh-rsc.c | 13 +++++++++++-- drivers/soc/qcom/rpmh.c | 47 +++++++++++++++++++++++++++++++++++++++++= ---- include/soc/qcom/rpmh.h | 5 +++++ include/soc/qcom/tcs.h | 2 ++ 4 files changed, 61 insertions(+), 6 deletions(-) diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c index c6f7d5c9c493d9e06c048930b8a14a38660df4b1..ec85c457ea4527f94339c2033bf= cc12346e3c443 100644 --- a/drivers/soc/qcom/rpmh-rsc.c +++ b/drivers/soc/qcom/rpmh-rsc.c @@ -443,6 +443,7 @@ static irqreturn_t tcs_tx_done(int irq, void *p) int i; unsigned long irq_status; const struct tcs_request *req; + u32 reg; =20 irq_status =3D readl_relaxed(drv->tcs_base + drv->regs[RSC_DRV_IRQ_STATUS= ]); =20 @@ -453,6 +454,11 @@ static irqreturn_t tcs_tx_done(int irq, void *p) =20 trace_rpmh_tx_done(drv, i, req); =20 + if (req->is_read) { + reg =3D drv->regs[RSC_DRV_CMD_RESP_DATA]; + req->cmds[0].data =3D read_tcs_reg(drv, reg, i); + } + /* Clear AMC trigger & enable modes and * disable interrupt for this TCS */ @@ -493,13 +499,15 @@ static void __tcs_buffer_write(struct rsc_drv *drv, i= nt tcs_id, int cmd_id, const struct tcs_request *msg) { u32 msgid; - u32 cmd_msgid =3D CMD_MSGID_LEN | CMD_MSGID_WRITE; + u32 cmd_msgid =3D CMD_MSGID_LEN; u32 cmd_enable =3D 0; struct tcs_cmd *cmd; int i, j; =20 /* Convert all commands to RR when the request has wait_for_compl set */ cmd_msgid |=3D msg->wait_for_compl ? CMD_MSGID_RESP_REQ : 0; + if (!msg->is_read) + cmd_msgid |=3D CMD_MSGID_WRITE; =20 for (i =3D 0, j =3D cmd_id; i < msg->num_cmds; i++, j++) { cmd =3D &msg->cmds[i]; @@ -513,7 +521,8 @@ static void __tcs_buffer_write(struct rsc_drv *drv, int= tcs_id, int cmd_id, =20 write_tcs_cmd(drv, drv->regs[RSC_DRV_CMD_MSGID], tcs_id, j, msgid); write_tcs_cmd(drv, drv->regs[RSC_DRV_CMD_ADDR], tcs_id, j, cmd->addr); - write_tcs_cmd(drv, drv->regs[RSC_DRV_CMD_DATA], tcs_id, j, cmd->data); + if (!msg->is_read) + write_tcs_cmd(drv, drv->regs[RSC_DRV_CMD_DATA], tcs_id, j, cmd->data); trace_rpmh_send_msg(drv, tcs_id, msg->state, j, msgid, cmd); } =20 diff --git a/drivers/soc/qcom/rpmh.c b/drivers/soc/qcom/rpmh.c index ca37da3dc2b148c76e50e25885bd85a0cb47c9b6..f881c4c757ec8302b09eabf2f18= bc79941a6f2c5 100644 --- a/drivers/soc/qcom/rpmh.c +++ b/drivers/soc/qcom/rpmh.c @@ -175,6 +175,9 @@ static int __rpmh_write(const struct device *dev, enum = rpmh_state state, struct cache_req *req; int i; =20 + if (rpm_msg->msg.is_read) + goto send_data; + /* Cache the request in our store and link the payload */ for (i =3D 0; i < rpm_msg->msg.num_cmds; i++) { req =3D cache_rpm_request(ctrlr, state, &rpm_msg->msg.cmds[i]); @@ -182,6 +185,7 @@ static int __rpmh_write(const struct device *dev, enum = rpmh_state state, return PTR_ERR(req); } =20 +send_data: if (state =3D=3D RPMH_ACTIVE_ONLY_STATE) { ret =3D rpmh_rsc_send_data(ctrlr_to_drv(ctrlr), &rpm_msg->msg); } else { @@ -194,7 +198,7 @@ static int __rpmh_write(const struct device *dev, enum = rpmh_state state, } =20 static int __fill_rpmh_msg(struct rpmh_request *req, enum rpmh_state state, - const struct tcs_cmd *cmd, u32 n) + const struct tcs_cmd *cmd, u32 n, bool is_read) { if (!cmd || !n || n > MAX_RPMH_PAYLOAD) return -EINVAL; @@ -204,10 +208,45 @@ static int __fill_rpmh_msg(struct rpmh_request *req, = enum rpmh_state state, req->msg.state =3D state; req->msg.cmds =3D req->cmd; req->msg.num_cmds =3D n; + req->msg.is_read =3D is_read; =20 return 0; } =20 +/** + * rpmh_read: Read a resource value + * + * @dev: The device making the request + * @cmd: The payload having address of resource to read + * + * Reads the value for the resource address given in tcs_cmd->addr + * and returns the tcs_cmd->data filled with same. + * + * Context: May sleep. Do not call from atomic contexts. + * + * Return: 0 on success, negative errno on failure + */ +int rpmh_read(const struct device *dev, struct tcs_cmd *cmd) +{ + DECLARE_COMPLETION_ONSTACK(compl); + DEFINE_RPMH_MSG_ONSTACK(dev, RPMH_ACTIVE_ONLY_STATE, &compl, rpm_msg); + int ret; + + ret =3D __fill_rpmh_msg(&rpm_msg, RPMH_ACTIVE_ONLY_STATE, cmd, 1, true); + if (ret) + return ret; + + ret =3D __rpmh_write(dev, RPMH_ACTIVE_ONLY_STATE, &rpm_msg); + if (ret) + return ret; + + ret =3D wait_for_completion_timeout(&compl, RPMH_TIMEOUT_MS); + cmd[0].data =3D rpm_msg.cmd[0].data; + + return (ret > 0) ? 0 : -ETIMEDOUT; +} +EXPORT_SYMBOL_GPL(rpmh_read); + /** * rpmh_write_async: Write a set of RPMH commands * @@ -230,7 +269,7 @@ int rpmh_write_async(const struct device *dev, enum rpm= h_state state, return -ENOMEM; rpm_msg->needs_free =3D true; =20 - ret =3D __fill_rpmh_msg(rpm_msg, state, cmd, n); + ret =3D __fill_rpmh_msg(rpm_msg, state, cmd, n, false); if (ret) { kfree(rpm_msg); return ret; @@ -257,7 +296,7 @@ int rpmh_write(const struct device *dev, enum rpmh_stat= e state, DEFINE_RPMH_MSG_ONSTACK(dev, state, &compl, rpm_msg); int ret; =20 - ret =3D __fill_rpmh_msg(&rpm_msg, state, cmd, n); + ret =3D __fill_rpmh_msg(&rpm_msg, state, cmd, n, false); if (ret) return ret; =20 @@ -352,7 +391,7 @@ int rpmh_write_batch(const struct device *dev, enum rpm= h_state state, rpm_msgs =3D req->rpm_msgs; =20 for (i =3D 0; i < count; i++) { - __fill_rpmh_msg(rpm_msgs + i, state, cmd, n[i]); + __fill_rpmh_msg(rpm_msgs + i, state, cmd, n[i], false); cmd +=3D n[i]; } =20 diff --git a/include/soc/qcom/rpmh.h b/include/soc/qcom/rpmh.h index bdbee1a97d3685d8a6153d586ddf650bd3bd3dde..14ecbf242b6bd67c8167c176ed0= 970f42432f4f4 100644 --- a/include/soc/qcom/rpmh.h +++ b/include/soc/qcom/rpmh.h @@ -11,6 +11,8 @@ =20 =20 #if IS_ENABLED(CONFIG_QCOM_RPMH) +int rpmh_read(const struct device *dev, struct tcs_cmd *cmd); + int rpmh_write(const struct device *dev, enum rpmh_state state, const struct tcs_cmd *cmd, u32 n); =20 @@ -24,6 +26,9 @@ void rpmh_invalidate(const struct device *dev); =20 #else =20 +static inline int rpmh_read(const struct device *dev, struct tcs_cmd *cmd) +{ return -ENODEV; } + static inline int rpmh_write(const struct device *dev, enum rpmh_state sta= te, const struct tcs_cmd *cmd, u32 n) { return -ENODEV; } diff --git a/include/soc/qcom/tcs.h b/include/soc/qcom/tcs.h index cff67ce25488e2d3603a7707af2ca77f8266a713..45b8513be2f9bb0957796476f60= 31146ee34e931 100644 --- a/include/soc/qcom/tcs.h +++ b/include/soc/qcom/tcs.h @@ -51,6 +51,7 @@ struct tcs_cmd { * struct tcs_request: A set of tcs_cmds sent together in a TCS * * @state: state for the request. + * @is_read: set for read only requests * @wait_for_compl: wait until we get a response from the h/w accelerator * (same as setting cmd->wait for all commands in the req= uest) * @num_cmds: the number of @cmds in this request @@ -58,6 +59,7 @@ struct tcs_cmd { */ struct tcs_request { enum rpmh_state state; + bool is_read; u32 wait_for_compl; u32 num_cmds; struct tcs_cmd *cmds; --=20 2.25.1 From nobody Sun Jun 14 23:03:48 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 114A639D6FF for ; Mon, 6 Apr 2026 22:15:28 +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=1775513729; cv=none; b=LaqxQHJRhE1mIdjWohI3cS0fS2cB4XSva82EZhXVZOKnA8Mrw3EMmT6Z4PBZ5OZhurQ6eJKi/PEqa/EzZjfSH3BXPxvxVoHLJnUKEfXZOGYklZ+58u7d3w3ICzOg/RuYNes+/MddJSUpavRNueZGNCTz974z4WNq6fU0d4i1oX4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775513729; c=relaxed/simple; bh=sL0AAcPy7viWgfA/9FLqMUV4KTxuU7dUv5w4fRLlIiw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=uEnTTcnvBygfH8TDrmyOCr6s5Ct/OK8d+QHScIuT5TWtmbvmVfBb5qBCpjGkT9Grz+GZJNB2KeBWgq3nYtB4+w8Qi6YG8GrWHlWZwJkCySQ1hOrd9rPN7WC3oh3oKdiulziEj+19PSFmc8H7OkIlEzgtgT8CMU+0aSZlzEqhJTg= 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=CGn2JVw1; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=YvqI1eO5; 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="CGn2JVw1"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="YvqI1eO5" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 636LQnjY3402569 for ; Mon, 6 Apr 2026 22:15:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= O3fRITYQAHKvF88MQ+Ws0Zlfylc75OFlgS1WmTi0q9E=; b=CGn2JVw1brhZ88zr 0Wx/t4sMdx02H3w7TN7IN+qxMO6YkAbfiKUgqXz805aBvi82p8RtaUx/4ZOEz8KV SlCsIAH3XLuxJBCGdmhkciLGVNsqY9PEZ703B59Dkkvsut7I22kf6hbkamwux65e Twf0SK5ZRmmZ5xTLB0ciNIgpJ+r5gNaHFh11h89qHYoys+DMDqTkO5/ehxupehCy toAMYh55BQ/jDsVeDotkYDmZx6AyHckkFIpEQlNMqN+ktr+lS5e5vvy6pglRkB8N 9lVzfKhgz8YedWxHoSc4PzDW1a9ewlLaY/k9JtstOidqBscWnAvkB7CbkUd0E5jP wG7hgQ== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dcmrhr3cm-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 06 Apr 2026 22:15:27 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-35d9010602bso4478719a91.3 for ; Mon, 06 Apr 2026 15:15:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1775513726; x=1776118526; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=O3fRITYQAHKvF88MQ+Ws0Zlfylc75OFlgS1WmTi0q9E=; b=YvqI1eO5AztZ6mpw8Rn6ULR4Vlc4ItylHvubWxtAfDpSKlAg5bLgrq+beC++/P3kAR NV337Ge7wrQXv+KOl08Z+BT//qBVbYTpjuW14uE31flCD4JgPkUlIB3TeV8lFsPI5f6W JWrOKVx2yfWWtIS5PsRladNKG5sf88xCEj2w6aefyrL/ZRkz92vfKb6RVeiwhsP6PXkJ sWxA1hhU7PlNMrqzAnB3khcUaB8GZfu57/Vrx4b7qRoU6I8OVZYMz7rvwX/gbEHRW44u p4OPBAPqh2fAuK1ETputr7uwYMo0ghMtLdFo4b8qelyY5TU94CxAVF677LZCqY2b9CGQ RrkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775513726; x=1776118526; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=O3fRITYQAHKvF88MQ+Ws0Zlfylc75OFlgS1WmTi0q9E=; b=E+XUfl05Vw/yu6CDFhzfsOjrHbqsrmUtn+kwC3EFCvpQcnJr/YL82LriC5aIsQLNQE P+5IcXLxb3FFhnIppVQGerrnEnLI/nE8DivM1ut1G348x3CAkmxpvXcwb1dbiNIXQk2U JMslNKpnZKPDnCIiuF7+MQTGt5ii8ykJI8K4mKavWQkLT3lIrB7Wi1X+dzojAuuHBcV6 VylCi15mWRho/gkvuoCEQP04Q/XVC6CLIBCI2CzM2XM5p7RPLXp5nQY0al2cPPqNF/lp vh+Eszrqkr0GFkr4VmV8MAAId+dT+eJ4Oswag9dmKKkpLBniO1lSdWG8LrYsEsYbJFDp QjzQ== X-Forwarded-Encrypted: i=1; AJvYcCXQnoo2Emq8hy1TlwqdiZj6gsFaj3bInkZOR5hbi4siBk2lxG/Hwse3AdDf58DMQxkYB6PVJf8FDalPzxg=@vger.kernel.org X-Gm-Message-State: AOJu0YzOeizqhCo4CrSe5V6/dIC3G6F1/02S5+Y7+n1m6DoMM7zfSQEc SJcaXFV3a6HQNttkRKSvyLQRaZXsrdKUhLCsx/Z/T28RCSxTHvckdoLZh9g66hYMH2uFfxMRMtl t8fbhDykwWTPBNZVYbo+cEgpU7zpInO0TXXxe0MDMoJx0ePguSIvoDCKAWMaXdfIYIPzz49thOn Y= X-Gm-Gg: AeBDiesoM9AhXyYI5sMAoemRQ0gJ77D0PGj6oo6YYICbxj25JUp1yrbInBSESUeg1FT QWfbSwqERD+S25iVfZ5hp1aEWAA1irSM130g7L1XcvkklSu1NisnEsCY8Ja44jLigCXv/cAw5c6 3FylFmyC12oyw4X/9PpLrMHzI0+RlbqAw4updlGLnYXrnviVLBdLdyJMpwMgHq+1waK880aOUGE N9KKNAs7WLpDeJsn0oWsOAWBYmTd0j0UvuIMjXhESbipFdtzfAehkWLSLO2hibINWrsC1sKG7FD WKRJANxOOPFFJ7NRE980bj9OffcoagkmEmZX2aK6NawNz31OWeq2zVKTa4cAj0Fz4HfvdXKYjMx 4S4TCSdcKouRex0vTSd/pZDjdBqZHMNYCBcjBiGhFN2gFZtk5b+Y= X-Received: by 2002:a17:90a:d407:b0:35d:a557:e41 with SMTP id 98e67ed59e1d1-35de68f8988mr12896025a91.14.1775513725822; Mon, 06 Apr 2026 15:15:25 -0700 (PDT) X-Received: by 2002:a17:90a:d407:b0:35d:a557:e41 with SMTP id 98e67ed59e1d1-35de68f8988mr12895994a91.14.1775513725296; Mon, 06 Apr 2026 15:15:25 -0700 (PDT) Received: from hu-kamalw-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-35dd35e34f9sm14447519a91.1.2026.04.06.15.15.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2026 15:15:24 -0700 (PDT) From: Kamal Wadhwa Date: Tue, 07 Apr 2026 03:44:59 +0530 Subject: [PATCH 2/4] regulator: qcom-rpmh: Fix PMIC5 BOB bypass mode handling Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260407-read-rpmh-v3-v1-2-27db2a56b13e@oss.qualcomm.com> References: <20260407-read-rpmh-v3-v1-0-27db2a56b13e@oss.qualcomm.com> In-Reply-To: <20260407-read-rpmh-v3-v1-0-27db2a56b13e@oss.qualcomm.com> To: Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Mark Brown , Vinod Koul Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Kamal Wadhwa , Konrad Dybcio X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1775513714; l=2552; i=kamal.wadhwa@oss.qualcomm.com; s=20260406; h=from:subject:message-id; bh=sL0AAcPy7viWgfA/9FLqMUV4KTxuU7dUv5w4fRLlIiw=; b=cDx1GdH/bVVhoe9C2BkHC4GiCGK6oVXTvbSqqEvrl938xAA9N+oiVaU4EWRxNFskLZzc1LdGK HZyDepoDiOqD295TWw6vVAOeKqZt8+Smcp6lQx16l/qCCQQzDVwfKhL X-Developer-Key: i=kamal.wadhwa@oss.qualcomm.com; a=ed25519; pk=ylH1NxUZkBpYsmww89g6zVxpS0q8qthtzcORkYxn/Ag= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDA2MDIxOSBTYWx0ZWRfXxmP5+HdjCy32 mFAlZL8AQNHQbOZrwmGGvHXuRZytZurjkRlQbH1KqDteyIAGwWI2orjWWQUMM1owx/z5sE+Ixnw fn8Z7UJ4aEG4JOW5dh42Yj+2IEuBRkKkUrQ/sSrrgW4OCCorrTfujetnbLzQMLHQodKZ1eyJmZq jnhg5keqEmtCmzhSqbSklkMxK3Fa2rh/yly+APi+tjce3ejtlHl8tbPxKnL9g5dzRCN+ca4WEbu plfQpUOvzxmqQY+DGEaDbITVkfAb7KgVtL62BlWgoZnaVope5QrMxWVW73TkfZygfBCK7eOb0RK J1TJyR0upIkNjnsHZ7rqD9xwtthC+X5nGFqnPswg6itWA2D0QuoUMt+XfOS8pC0U9vo3MNJXfvu l6tcEo/ziOQfg6Y7fiJbhRHZCEan6G1iZ0zW0SgSxCctaqsxHoI2zRXR4j0eXvMAnpVLX0dmZJi 8CQiYDwTMU2CmwFF68Q== X-Proofpoint-GUID: Yw0sBFOjSvcaqKmqQhGE_trG3MlJO7kS X-Authority-Analysis: v=2.4 cv=XPUAjwhE c=1 sm=1 tr=0 ts=69d4307f cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=EUspDBNiAAAA:8 a=W0IsM1cLceJ2lu2XXEMA:9 a=QEXdDO2ut3YA:10 a=uKXjsCUrEbL0IQVhDsJ9:22 X-Proofpoint-ORIG-GUID: Yw0sBFOjSvcaqKmqQhGE_trG3MlJO7kS X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-04-06_04,2026-04-03_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 suspectscore=0 priorityscore=1501 impostorscore=0 clxscore=1015 adultscore=0 phishscore=0 bulkscore=0 spamscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604010000 definitions=main-2604060219 Currently, when `rpmh_regulator_set_mode_bypass()` helper function is called to set bypass mode, it sends PMIC4's BOB bypass mode value for even if its a PMIC5 BOB. To fix this, introduce new hw_data parameter`pmic_bypass_mode` to store bypass mode value. Use it to send correct PMIC bypass mode value that corresponds to PMIC4/5 BOB regulators from the helper function. Fixes: 610f29e5cc0e8d58 ("regulator: qcom-rpmh: Update PMIC modes for PMIC5= ") Reviewed-by: Konrad Dybcio Signed-off-by: Kamal Wadhwa --- drivers/regulator/qcom-rpmh-regulator.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qc= om-rpmh-regulator.c index 6e4cb2871fca8d7f371660ceb0c73a092507a5ce..85fbf10f74bb3393071bc656813= 56312f27b7527 100644 --- a/drivers/regulator/qcom-rpmh-regulator.c +++ b/drivers/regulator/qcom-rpmh-regulator.c @@ -111,6 +111,7 @@ static const struct resource_name_formats vreg_rsc_name= _lookup[NUM_REGULATOR_TYP * @hpm_min_load_uA: Minimum load current in microamps that requires * high power mode (HPM) operation. This is used * for LDO hardware type regulators only. + * @pmic_bypass_mode: The PMIC bypass mode value. * @pmic_mode_map: Array indexed by regulator framework mode * containing PMIC hardware modes. Must be large * enough to index all framework modes supported @@ -125,6 +126,7 @@ struct rpmh_vreg_hw_data { int n_linear_ranges; int n_voltages; int hpm_min_load_uA; + int pmic_bypass_mode; const int *pmic_mode_map; unsigned int (*of_map_mode)(unsigned int mode); }; @@ -311,7 +313,7 @@ static int rpmh_regulator_vrm_set_mode_bypass(struct rp= mh_vreg *vreg, return pmic_mode; =20 if (bypassed) - cmd.data =3D PMIC4_BOB_MODE_PASS; + cmd.data =3D vreg->hw_data->pmic_bypass_mode; else cmd.data =3D pmic_mode; =20 @@ -767,6 +769,7 @@ static const struct rpmh_vreg_hw_data pmic4_bob =3D { }, .n_linear_ranges =3D 1, .n_voltages =3D 84, + .pmic_bypass_mode =3D PMIC4_BOB_MODE_PASS, .pmic_mode_map =3D pmic_mode_map_pmic4_bob, .of_map_mode =3D rpmh_regulator_pmic4_bob_of_map_mode, }; @@ -975,6 +978,7 @@ static const struct rpmh_vreg_hw_data pmic5_bob =3D { }, .n_linear_ranges =3D 1, .n_voltages =3D 32, + .pmic_bypass_mode =3D PMIC5_BOB_MODE_PASS, .pmic_mode_map =3D pmic_mode_map_pmic5_bob, .of_map_mode =3D rpmh_regulator_pmic4_bob_of_map_mode, }; --=20 2.25.1 From nobody Sun Jun 14 23:03:48 2026 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 D961A39D6C3 for ; Mon, 6 Apr 2026 22:15:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775513733; cv=none; b=KCXT3R3+3ZqsWUixA1iTSdnO1F3CMbbQJpx7fSvPnkVJ8KVtVfgUDgTqzn9eE6fGcQ68hfxNodNeKeH9Ig3pLRR31CzZ+gHhpsuEBnEu+KMBjHedgoaW4GlzYjz0HdHC5iqQqiBwlJDu2IRNjeolNqZFuFfc6nlAPV8tVS1Yuco= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775513733; c=relaxed/simple; bh=oX1pSlo7oUBLgGkMV37O1JTibd7jfWXwVtm/LiTas2E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=iqakIl35iS3pjylCJRQDzQDh5E0n/nd3FcdEC4vlGoR8/d17cXCrAzQtHbMw+Vep7QRJILwRmVD8X638pzxl421Lt0sJ6YMFd+ycaWKsMekm4RG5xLr5xSrbPTUJZKDDi0OJrEob++jle1xVUukCmeuvBwtsytSkrpVTaIMeFWg= 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=Lhc8/uXo; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=HarbPbJs; arc=none smtp.client-ip=205.220.168.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="Lhc8/uXo"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="HarbPbJs" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 636LSGYf2328042 for ; Mon, 6 Apr 2026 22:15:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= hlETBh+6cM//2TJo2BGkD6OW7HngQwmBVKNomE0A2UY=; b=Lhc8/uXoPth/NDej chNi2qwHUwja4ADLZeI6IjxEOF8H6zy6DuoQLHIhDbaqc+03GugwfYI/Me97Ay9Q mp0Gu5LwcRdtcDiMmM+XzDhuNivAlsx3IRdKrAUlhzSqiqL71CS6IWbY0Dx7IfQ0 HqVi9oBFCKBfu7rxUhiQoSOoMm/65zRDCF8gXClO45w7Rhx1Tmrv0mow1XeGx3xr mA01+7LFxJr8K7qM2NAEGIKeIN6enLMl0ZH1iBpRgCKaSAbTls9eDwT07fU3DVTN gNPvbA1alQgejIGTo0VxNJglnQKOvlP/tYDEcUCZHqawK2oOUE4ibAz+kLIxoJFk nW3qQA== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dcms4r39y-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 06 Apr 2026 22:15:30 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-35c12a3bbb9so4513099a91.3 for ; Mon, 06 Apr 2026 15:15:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1775513729; x=1776118529; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=hlETBh+6cM//2TJo2BGkD6OW7HngQwmBVKNomE0A2UY=; b=HarbPbJs3dqLCixLeO1/oNlD5gkQMmRBDoNF9ireu7xSR+Eq4SAj1r83JzrldNESNE s9ANHjj0z9or++KcmVihyc/NkHjnIsM5OCnlSak33Stdz4eTBEuDprJby1ywMdhwphP4 3v1bgaF3ZzeN1qpXl3d5jUnORNL2x0IZCV7FMclw2ZM0P/k4aEcXx9X4UZPH0h7sIWO0 ZgqxLAW0BwMgjX0vSQHLd6sAXvnmbXbSd6pw1tde3DKd83Z2tntqzkeFbnyURF0AfKsK q5Qe6tQy5o/d8hSqXzJluCP9iVanjpBlBS76InqoN1WT/uzmkUZAzl1L0lyC6xsKfFe3 v2yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775513729; x=1776118529; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=hlETBh+6cM//2TJo2BGkD6OW7HngQwmBVKNomE0A2UY=; b=pGuLNlYLUh2JsWUgmCGBtpAJIIbTQ6oEh+ZgEdpNpwgUrEEFYwgZMmR6X0NncoGN4r YN3HvcBEnjyYgt8Cc+CQ+evRnchV/eqwr7g+naS2Ei+Qdc2i7+8xEnIxCN4cK+I2TbSz IO8lvZI2kEV2Xe2muTKzu6aPrKt5fJQXJeuNxhOUW+UFC1WeSgsuBvTUhVoMmydeKQ7s iqzx+O7R8GEJFo+3HZ6g+CoFTO2OeI7pvBLh2ssyVAR3VqyNq9Dvedchih9ES76bPOOn hhimkFJMj5JkANxUUu1TBD8FUKMG26ndWlWtQnZgq7YQxMA0LvTK03nhQ+0g5FFIQ81p b3Ug== X-Forwarded-Encrypted: i=1; AJvYcCXvnqYmjghPH50cJCTEluMmB2rhGt54weg57qYesr7GTrljjug7JvxWMxfcKQ6jpi2XsS7kGkSR+hWWodc=@vger.kernel.org X-Gm-Message-State: AOJu0Yy8iZIYPwBMqAdP2R/Bzr8f5lUJ9OqU7tEBxF3N/JknIfWOD3ov QZUT3boU3tKiRzcjv4MejRly1yeE4jIpA4Dtj9uRF86LW5+U0zvzEXb+c6RPSKocl/uAno9nRiB cAN8GdYHMpVrO2DrG56hsWZjRQUQFL2vHwnphMRz0cYPIzF2IBaYhxnqQYJbNIgiNM/dg4a7aYz w= X-Gm-Gg: AeBDietYLnO/NkSt04KjPjUKgMI+UePbBOllQlwHqSYkMD1nKd4cURFBNdoXsrN+LOV Rpb6vtNOMFioi2xMVtCE8pYQ6d8vhVgMlY95u2mNbZ25YtOgo44ItJhuekIIJg4EzCc7RLUq6zq d+pg4/qhAsEashDyr1lAIgKxMcC9zJKrgSrEHmBk9unIOuiL8eVSccb9hGkQoe/50IGMaK92zpF JVJX8PAs1uAqS0DJWiXEU3PoeJoLd9Hs5K7ttmicBxFEQyI6Jvymj0Do+vO4mxsuTtgNqtM5/Qo FQliV34brAj5+nwkkkJe7Mf8G+unwot0WaxaHG0cP4PK5LMQU4HbeFW9t/4Q0LwvJcPGW0nr/VP cIna/P9ZXw9RkkZUiZXLJjDU0QWosagS7l0MdwaQGgeyfnaaiqF8= X-Received: by 2002:a17:90b:2251:b0:35d:b00a:3c54 with SMTP id 98e67ed59e1d1-35de69acf35mr13641196a91.22.1775513729076; Mon, 06 Apr 2026 15:15:29 -0700 (PDT) X-Received: by 2002:a17:90b:2251:b0:35d:b00a:3c54 with SMTP id 98e67ed59e1d1-35de69acf35mr13641159a91.22.1775513728345; Mon, 06 Apr 2026 15:15:28 -0700 (PDT) Received: from hu-kamalw-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-35dd35e34f9sm14447519a91.1.2026.04.06.15.15.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2026 15:15:27 -0700 (PDT) From: Kamal Wadhwa Date: Tue, 07 Apr 2026 03:45:00 +0530 Subject: [PATCH 3/4] regulator: qcom-rpmh: readback voltage/bypass/mode/status set during bootup Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260407-read-rpmh-v3-v1-3-27db2a56b13e@oss.qualcomm.com> References: <20260407-read-rpmh-v3-v1-0-27db2a56b13e@oss.qualcomm.com> In-Reply-To: <20260407-read-rpmh-v3-v1-0-27db2a56b13e@oss.qualcomm.com> To: Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Mark Brown , Vinod Koul Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Kamal Wadhwa X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1775513714; l=10099; i=kamal.wadhwa@oss.qualcomm.com; s=20260406; h=from:subject:message-id; bh=oX1pSlo7oUBLgGkMV37O1JTibd7jfWXwVtm/LiTas2E=; b=LVfPcK5wVWZ+1L/4US2k6RX5sqQHVXTnD6WDCbzLXyhWj73BDyZ4blryIgrWOxzKooYFoGwqL eEy5iUfe+eoBwxvGanPESfr7QQk3duhyu83v0n5HUp7jG4qXI/JS14f X-Developer-Key: i=kamal.wadhwa@oss.qualcomm.com; a=ed25519; pk=ylH1NxUZkBpYsmww89g6zVxpS0q8qthtzcORkYxn/Ag= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDA2MDIxOSBTYWx0ZWRfX4pYcCkK+oMtb PxoQJfhiEb3sDwRlXX9lwEB8JsBSp9j2NbtnuW+MB+r9UWCJe1/8WiGNS1/Gxx03Hw17JWgRwUs GNUBFq47AIuPSkKKcOXKQXT9bPTsrSoTprXlZyRSyw0MqKl0iAOTLVL3ByvOrEAwhAvSw3/C+Cj oiSQFT8ikxhZpQZ+QtruTH/dtEQv2ApR5Opgyh3+CDi3EYj8Gp8KZVPTI4VFMl7lRF02KNOU0lE bd8vbegrU14GXxp0ED/IVNNj+GxNEF9ZlgVQknBK2OzKmTrhgnR9cIweXV9DD3hYqO9Z25S0Sks 3XWCYCGqtQZd9dStS4SU1NkKG9Gj8SZF4QpmWwjPw8x9qXbwUTcs9GYBtD/uQtCNOfRHmUUSbEi 7gp/n1pb9+WPIMmrYTQQ/c7q+0kTdxptiBW3wrnmtzxFpP0QT91R3KTb8tpTU6lqBPfI5qH+Fe4 BfjiNEUImvOjpQW8gwg== X-Proofpoint-ORIG-GUID: r5cWIa1uixR7-0UUrPZof-dKf5gZIrhz X-Authority-Analysis: v=2.4 cv=WNZPmHsR c=1 sm=1 tr=0 ts=69d43082 cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=EUspDBNiAAAA:8 a=tHHH2asN0IuRntgD_GYA:9 a=QEXdDO2ut3YA:10 a=uKXjsCUrEbL0IQVhDsJ9:22 X-Proofpoint-GUID: r5cWIa1uixR7-0UUrPZof-dKf5gZIrhz X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-04-06_04,2026-04-03_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 phishscore=0 spamscore=0 impostorscore=0 lowpriorityscore=0 suspectscore=0 clxscore=1015 malwarescore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604010000 definitions=main-2604060219 Currently, during regulator registration, regulator framework sends an unnecessary `min-microvolts` request for the rpmh-regulator device. This happens because in current design, we do not have a way to readback the voltage settings that was set during the bootloader stage. Fix this by using the rpmh_read() API to read the regulator voltage settings done during boot and make it available to regulator framework from the very first read after the bootup. Also use this API to read the status/mode/bypass settings as well. This will provide the regulator framework a sense of the initial settings done by bootloader and thus preventing any redundents writes for any setting post bootup incase the same setting was already applied during bootup. Signed-off-by: Kamal Wadhwa --- drivers/regulator/qcom-rpmh-regulator.c | 178 ++++++++++++++++++++++++++++= ++++ 1 file changed, 178 insertions(+) diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qc= om-rpmh-regulator.c index 85fbf10f74bb3393071bc65681356312f27b7527..8e1c576b718b595bbbff7f5fa76= de84d4e90f3bb 100644 --- a/drivers/regulator/qcom-rpmh-regulator.c +++ b/drivers/regulator/qcom-rpmh-regulator.c @@ -61,8 +61,13 @@ static const struct resource_name_formats vreg_rsc_name_= lookup[NUM_REGULATOR_TYP }; =20 #define RPMH_REGULATOR_REG_VRM_VOLTAGE 0x0 +#define RPMH_REGULATOR_VOLTAGE_MASK 0x1FFF + #define RPMH_REGULATOR_REG_ENABLE 0x4 +#define RPMH_REGULATOR_ENABLE_MASK 0x1 + #define RPMH_REGULATOR_REG_VRM_MODE 0x8 +#define RPMH_REGULATOR_MODE_MASK 0x7 =20 #define PMIC4_LDO_MODE_RETENTION 4 #define PMIC4_LDO_MODE_LPM 5 @@ -154,6 +159,7 @@ struct rpmh_vreg_hw_data { * @voltage_selector: Selector used for get_voltage_sel() and * set_voltage_sel() callbacks * @mode: RPMh VRM regulator current framework mode + * @status: RPMh VRM regulator current framework status */ struct rpmh_vreg { struct device *dev; @@ -166,6 +172,7 @@ struct rpmh_vreg { bool bypassed; int voltage_selector; unsigned int mode; + unsigned int status; }; =20 /** @@ -210,6 +217,28 @@ static int rpmh_regulator_send_request(struct rpmh_vre= g *vreg, return ret; } =20 +/** + * rpmh_regulator_read_data() - read data from RPMh + * @vreg: Pointer to the RPMh regulator + * @cmd: Pointer to the RPMh command struct to readback data + * + * Return: 0 on success, or a negative error number on failure + */ +static int rpmh_regulator_read_data(struct rpmh_vreg *vreg, struct tcs_cmd= *cmd) +{ + return rpmh_read(vreg->dev, cmd); +} + +static void rpmh_vreg_update_status(struct rpmh_vreg *vreg) +{ + if (!vreg->enabled) + vreg->status =3D REGULATOR_STATUS_OFF; + else if (vreg->bypassed) + vreg->status =3D REGULATOR_STATUS_BYPASS; + else + vreg->status =3D regulator_mode_to_status(vreg->mode); +} + static int _rpmh_regulator_vrm_set_voltage_sel(struct regulator_dev *rdev, unsigned int selector, bool wait_for_ack) { @@ -248,9 +277,42 @@ static int rpmh_regulator_vrm_set_voltage_sel(struct r= egulator_dev *rdev, selector > vreg->voltage_selector); } =20 +static int _rpmh_regulator_vrm_get_voltage(struct regulator_dev *rdev, int= *uV) +{ + struct rpmh_vreg *vreg =3D rdev_get_drvdata(rdev); + struct tcs_cmd cmd =3D { + .addr =3D vreg->addr + RPMH_REGULATOR_REG_VRM_VOLTAGE, + }; + int min_uV =3D rdev->constraints->min_uV; + int max_uV =3D rdev->constraints->max_uV; + int ret, _uV =3D 0; + + ret =3D rpmh_regulator_read_data(vreg, &cmd); + if (!ret) + _uV =3D (cmd.data & RPMH_REGULATOR_VOLTAGE_MASK) * 1000; + else + dev_err(vreg->dev, "failed to read VOLTAGE ret =3D %d\n", ret); + + if (!_uV || (_uV >=3D min_uV && _uV <=3D max_uV)) + *uV =3D _uV; + else + dev_err(vreg->dev, "read voltage %d is out-of-range[%d:%d]\n", + _uV, min_uV, max_uV); + + return ret; +} + static int rpmh_regulator_vrm_get_voltage_sel(struct regulator_dev *rdev) { struct rpmh_vreg *vreg =3D rdev_get_drvdata(rdev); + int ret, uV =3D 0; + + if (vreg->voltage_selector < 0) { + ret =3D _rpmh_regulator_vrm_get_voltage(rdev, &uV); + if (!ret && uV !=3D 0) + vreg->voltage_selector =3D regulator_map_voltage_linear_range(rdev, + uV, INT_MAX); + } =20 return vreg->voltage_selector; } @@ -284,6 +346,8 @@ static int rpmh_regulator_set_enable_state(struct regul= ator_dev *rdev, if (!ret) vreg->enabled =3D enable; =20 + rpmh_vreg_update_status(vreg); + return ret; } =20 @@ -333,9 +397,27 @@ static int rpmh_regulator_vrm_set_mode(struct regulato= r_dev *rdev, if (!ret) vreg->mode =3D mode; =20 + rpmh_vreg_update_status(vreg); + return ret; } =20 +static int rpmh_regulator_vrm_get_pmic_mode(struct rpmh_vreg *vreg, int *p= mic_mode) +{ + struct tcs_cmd cmd =3D { + .addr =3D vreg->addr + RPMH_REGULATOR_REG_VRM_MODE, + }; + int ret; + + ret =3D rpmh_regulator_read_data(vreg, &cmd); + if (!ret) + *pmic_mode =3D cmd.data & RPMH_REGULATOR_MODE_MASK; + else + return -EINVAL; + + return 0; +} + static unsigned int rpmh_regulator_vrm_get_mode(struct regulator_dev *rdev) { struct rpmh_vreg *vreg =3D rdev_get_drvdata(rdev); @@ -343,6 +425,13 @@ static unsigned int rpmh_regulator_vrm_get_mode(struct= regulator_dev *rdev) return vreg->mode; } =20 +static int rpmh_regulator_vrm_get_status(struct regulator_dev *rdev) +{ + struct rpmh_vreg *vreg =3D rdev_get_drvdata(rdev); + + return vreg->status; +} + /** * rpmh_regulator_vrm_get_optimum_mode() - get the mode based on the load * @rdev: Regulator device pointer for the rpmh-regulator @@ -379,6 +468,8 @@ static int rpmh_regulator_vrm_set_bypass(struct regulat= or_dev *rdev, if (!ret) vreg->bypassed =3D enable; =20 + rpmh_vreg_update_status(vreg); + return ret; } =20 @@ -401,6 +492,7 @@ static const struct regulator_ops rpmh_regulator_vrm_op= s =3D { .list_voltage =3D regulator_list_voltage_linear_range, .set_mode =3D rpmh_regulator_vrm_set_mode, .get_mode =3D rpmh_regulator_vrm_get_mode, + .get_status =3D rpmh_regulator_vrm_get_status, }; =20 static const struct regulator_ops rpmh_regulator_vrm_drms_ops =3D { @@ -412,6 +504,7 @@ static const struct regulator_ops rpmh_regulator_vrm_dr= ms_ops =3D { .list_voltage =3D regulator_list_voltage_linear_range, .set_mode =3D rpmh_regulator_vrm_set_mode, .get_mode =3D rpmh_regulator_vrm_get_mode, + .get_status =3D rpmh_regulator_vrm_get_status, .get_optimum_mode =3D rpmh_regulator_vrm_get_optimum_mode, }; =20 @@ -424,6 +517,7 @@ static const struct regulator_ops rpmh_regulator_vrm_by= pass_ops =3D { .list_voltage =3D regulator_list_voltage_linear_range, .set_mode =3D rpmh_regulator_vrm_set_mode, .get_mode =3D rpmh_regulator_vrm_get_mode, + .get_status =3D rpmh_regulator_vrm_get_status, .set_bypass =3D rpmh_regulator_vrm_set_bypass, .get_bypass =3D rpmh_regulator_vrm_get_bypass, }; @@ -432,6 +526,7 @@ static const struct regulator_ops rpmh_regulator_xob_op= s =3D { .enable =3D rpmh_regulator_enable, .disable =3D rpmh_regulator_disable, .is_enabled =3D rpmh_regulator_is_enabled, + .get_status =3D rpmh_regulator_vrm_get_status, }; =20 /** @@ -540,6 +635,83 @@ static int rpmh_regulator_init_vreg(struct rpmh_vreg *= vreg, struct device *dev, return 0; } =20 +static int rpmh_regulator_determine_initial_status(struct rpmh_vreg *vreg) +{ + struct tcs_cmd cmd =3D { + .addr =3D vreg->addr + RPMH_REGULATOR_REG_ENABLE, + }; + int ret, pmic_mode, mode; + int sts =3D 0; + + ret =3D rpmh_regulator_read_data(vreg, &cmd); + if (ret) { + vreg->status =3D REGULATOR_STATUS_UNDEFINED; + dev_err(vreg->dev, "failed to read ENABLE status ret =3D %d\n", ret); + + return ret; + } + + sts =3D cmd.data & RPMH_REGULATOR_ENABLE_MASK; + if (!sts) { + vreg->status =3D REGULATOR_STATUS_OFF; + + return 0; + } + + if (vreg->hw_data->regulator_type =3D=3D XOB) { + vreg->status =3D sts ? REGULATOR_STATUS_ON : REGULATOR_STATUS_OFF; + + return 0; + } + + ret =3D rpmh_regulator_vrm_get_pmic_mode(vreg, &pmic_mode); + if (ret < 0) { + vreg->mode =3D REGULATOR_MODE_INVALID; + vreg->status =3D REGULATOR_STATUS_UNDEFINED; + dev_err(vreg->dev, "failed to read pmic_mode ret =3D %d\n", ret); + + return ret; + } + + /* + * NOTE: Since BOB4 BYPASS_MODE value =3D 0 we cannot confirm if that BOB + * regulator has been sent into bypass mode by bootloader or if bootloader + * just has not requested for any mode voting. Due this limitation, we + * must check if the read pmic_mode value is non-zero before comparing it + * to bypass mode value. This also is needed to avoid setting BYPASS stat= us + * for LDOs which dont support bypass mode, and have the pmic_bypass_mode + * uninitialized value as zero in the vreg hw data. For such cases assume + * lowest mode/status, if pmic_mode is zero, to allow for mode voting. + */ + if (!pmic_mode) { + for (mode =3D REGULATOR_MODE_STANDBY; mode > REGULATOR_MODE_INVALID; mod= e >>=3D 1) { + if (vreg->hw_data->pmic_mode_map[mode] >=3D 0) { + vreg->mode =3D mode; + break; + } + } + + vreg->status =3D regulator_mode_to_status(vreg->mode); + return 0; + } + + if (vreg->hw_data->pmic_bypass_mode =3D=3D pmic_mode) { + vreg->bypassed =3D true; + vreg->status =3D REGULATOR_STATUS_BYPASS; + return 0; + } + + for (mode =3D REGULATOR_MODE_STANDBY; mode > REGULATOR_MODE_INVALID; mode= >>=3D 1) { + if (pmic_mode =3D=3D vreg->hw_data->pmic_mode_map[mode]) { + vreg->mode =3D mode; + vreg->status =3D regulator_mode_to_status(vreg->mode); + break; + } + } + + return 0; +} + static const int pmic_mode_map_pmic4_ldo[REGULATOR_MODE_STANDBY + 1] =3D { [REGULATOR_MODE_INVALID] =3D -EINVAL, [REGULATOR_MODE_STANDBY] =3D PMIC4_LDO_MODE_RETENTION, @@ -1823,6 +1995,12 @@ static int rpmh_regulator_probe(struct platform_devi= ce *pdev) vreg_data); if (ret < 0) return ret; + + ret =3D rpmh_regulator_determine_initial_status(vreg); + if (ret < 0) + dev_err(dev, "failed to read initial status for %s\n", + vreg->rdesc.name); + } =20 return 0; --=20 2.25.1 From nobody Sun Jun 14 23:03:48 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 672A531E82A for ; Mon, 6 Apr 2026 22:15:34 +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=1775513735; cv=none; b=odG9eAy7eovLWZSamEirwyVDHX09p3aH246D5G8NADCVvw/9pRQG86Xt676ruMPjrYzUlTuOZ6vsBHSdavr3qphQZn17hxT1YcS9KNaJSo42yEuvDEms/MEvvGuWOkH7x91M1p+Vrkm4dF3/+hldo7HLcDZe1LFSC4u/M7xhU7E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775513735; c=relaxed/simple; bh=1YgVKodJDZ8iM/R/e5OEt67Xb1kzFcKpq6G+59ZkhJQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=IlglK4MT/agHS147TjRtYmMJMSHvcQ/GVZ5PpW8FLAzST7iyRPgE0BZTlcNMU8dTgcQrkcjSO+Si1/3pM1FIEdSGaGKfTGJ/Z6A70FdOSvE5P7gcPCqrwA9oIVCHNsyihh50oT9uOQfSC1QK1DHQU7q7mDtFCQOodD2mE7QzTsQ= 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=iY6Fynk/; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=HwNSfB/2; 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="iY6Fynk/"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="HwNSfB/2" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 636LRaaS2009140 for ; Mon, 6 Apr 2026 22:15:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= KKUudFy5GoN8EsapexJf1THKoHxcD0tb+86k8TrzqJg=; b=iY6Fynk/5hbzh4WJ eNgter3gq9mr/8nqvuIiC4q2iy4ncNh0/gXd/HhPvRDg4NDSsg1AtFCs+P8QEN0y qamNbUEBndUmvlekhW4TUBHlXr01iAB+MsazJOcev7RwvErWN59MyTOiuyPovJPP KZ2ng4x3h14A3cuerxkAB2pjqHQTFXwnnS7xfO9E5nef4XU845amUxzoDAstGBoT gEU3ILyc4YhpCP6RcXXs7BxPB6PqG9AASuwVPIUWrTXURfbKICWa9dfSTupltRnJ gmdp0T6XP/SQ2arC6icX/jQ4s2GOgNJH2OVNRisoiuAACJAg9g52aEv9ArzEDRRt +qiaNA== Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dcmrrr3fb-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 06 Apr 2026 22:15:33 +0000 (GMT) Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-35845fcf0f5so4809793a91.0 for ; Mon, 06 Apr 2026 15:15:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1775513732; x=1776118532; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=KKUudFy5GoN8EsapexJf1THKoHxcD0tb+86k8TrzqJg=; b=HwNSfB/2z5bbe8ZLW7luhRvMMW16JEVAUOQyZbUST1YG6rV+qiEuAb/J9pNnqdX0te jEwOXJJLO05ICktVD4SSnBNZV5pTtl58FrQy3/UPuopFg3vgmJPuq5zHnrGUJA4RQMIQ xpFvS5lrtcs772odh/tQ3lzjRaiHmXOmlQHv3LJbZXrqfxpXXRpjighUvs0Kux41Cbe+ sexyhPMHajKcUgiTH/G1TZXrz86qmcRhfvHT3VCE6/rU0NJrNaPWw640U9MnYuR8+nYf uYYEX6gl4LnzELpOMl+OqbaLgsylZp95i0dW6Sad5mhCQtSNZy2eic++GTqenp2pWEZE IL1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775513732; x=1776118532; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=KKUudFy5GoN8EsapexJf1THKoHxcD0tb+86k8TrzqJg=; b=J28MQA1hoU8ppBiTPz8Np3ss1Lv2LjN/SNC6Nx+MwmH6FusTx+Zm0G9cJVb+1gl3he 1GHX1ps2Eb9MeLE94If06daOVO/49qNfo9HFJm5aZc3flhVhrPgVINJibZB0I8DPXtEm q3bkz/vVX7qiPosfElBelxpj08xN02cftsB57qI82+z3YnrFs9i/PVoY/SqHeb43Tp0I OK+qbU4znbzLdvMgQ9IUprq/mLmNqEPB/7ztKEZSKbGTarlfc4s2JzhX+mpeXjYeRGeR 2FgynhsyWUnT1guGSOVgZzkj+kgl58pf864Cp+S1l98D3ajMLYDXXA/8cXxeLI2IR+SC TNkQ== X-Forwarded-Encrypted: i=1; AJvYcCVPdCvyiVTTDiJTu6oc7jmJ1fmG+0l0VFBhv2bR3AKp005g+ZdbPOsFW0MbZTmxm0OlvJ45dFOzlWJzfhk=@vger.kernel.org X-Gm-Message-State: AOJu0YzKjkLNTu2PBN6Pzbj+GXJzCRc4QJhWc9VL4I31KzFlrZorVw1s pEtXYXrix0ra96DA2h0xv3YN8UtyECGzCqcFRzdU4qKbp8taSlsZ5/pTHvdHutQnG7pQHDnGHtL 8XJPj9zY0ezIRIRzlZvipIMjnCEmWB4f6fvH6aM6Vrf9a0+2dqm7bhZHt3y76i2zUKEOm6ZJ9hm Q= X-Gm-Gg: AeBDietZZ3L1Ax3CYOFkWhU7dDUrL9OqOcme8/10qzdkHnwFqeK390/YmjdYbseIK03 GgSMXRcNGfZzn2oxADB4+4OvhPxZSsM8LuvZ5CJ4wsYAJ4K/zzP45eXeNBZY5CUNrb7uQ9nwUyB o77A7ACQelyoIpJM1shpp+Aw/9L76/yqOV9wDuJ58EI5PofGsFWZU8SUPoJ137LRf2nssqhw5jJ wIeyWxql64dVpN4O9FhcxY9P8eLDew71wH/Jq1FqvHNgbeWLWcp6VXUwSEohVHMlf6oZgCn24gl 0aYWBf4o3NNc3Gh/GfR+AWwCr150srXplkymMOQOHnaObmcl0oGF3PRmwfZeM4cKHR3fKB+/rs3 U/Sp3+opMr6ATloE/2X07vriiGfRbCsa92x/q0ddlYgDf+cV65is= X-Received: by 2002:a17:90b:52c7:b0:35b:a44f:b80 with SMTP id 98e67ed59e1d1-35de591e934mr9346419a91.1.1775513731935; Mon, 06 Apr 2026 15:15:31 -0700 (PDT) X-Received: by 2002:a17:90b:52c7:b0:35b:a44f:b80 with SMTP id 98e67ed59e1d1-35de591e934mr9346393a91.1.1775513731452; Mon, 06 Apr 2026 15:15:31 -0700 (PDT) Received: from hu-kamalw-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-35dd35e34f9sm14447519a91.1.2026.04.06.15.15.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2026 15:15:31 -0700 (PDT) From: Kamal Wadhwa Date: Tue, 07 Apr 2026 03:45:01 +0530 Subject: [PATCH 4/4] regulator: qcom-rpmh: Fix coding style issues Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260407-read-rpmh-v3-v1-4-27db2a56b13e@oss.qualcomm.com> References: <20260407-read-rpmh-v3-v1-0-27db2a56b13e@oss.qualcomm.com> In-Reply-To: <20260407-read-rpmh-v3-v1-0-27db2a56b13e@oss.qualcomm.com> To: Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Mark Brown , Vinod Koul Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Kamal Wadhwa X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1775513714; l=999; i=kamal.wadhwa@oss.qualcomm.com; s=20260406; h=from:subject:message-id; bh=1YgVKodJDZ8iM/R/e5OEt67Xb1kzFcKpq6G+59ZkhJQ=; b=DOBHACF0o826m17Mx0+5ibmfY/+/iRbsfs4UYVygRQ+hGag9Yly7S64I9SDWf0BCOshN5cx/0 JtHZQ/hzfwDDKocdOxX/7cvROA8P319K5nlL51dkYr1C5BRnhMGOlUh X-Developer-Key: i=kamal.wadhwa@oss.qualcomm.com; a=ed25519; pk=ylH1NxUZkBpYsmww89g6zVxpS0q8qthtzcORkYxn/Ag= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDA2MDIxOSBTYWx0ZWRfXyS0mDx2w3lj/ eWicsieoSFXmXkjRcHKzZOl/E9EP9NbclGGaCtPkkXkc5x6eVRwWLEWzyCU4QU8CwYkZ35gKJ6P 98stzxCuzzoY0FU2PbZXKl0uYwgzIeWL7XqI2Yr2n44LLX3Zt8zAK289+ILOHTi5m5Bkp6p4mt8 jG/1Rk3HH0T7otNuLKUeVloZX+qegluYerMwId9TGTAT9FVkH6/J6vfeHhWLIb2IfZG5xhEPm9T XrkdXtgXAPyFOYQRIDHxNunQgYVVkGZFsZTqWpstpKpv8IsSGBaKT4Q1nTIzmCZJi+E3XRNS1au LvI/xJBlL9C7tflo1lyPYkru7PFVJBtdZmuXLraDGcLF0xn54RgnjLTeOPXZznvkUPrJmQIiJQg UwkHL3KYWqlahpq5fkUA9Oau+uVnu5HZijoctnPmTWQFAHfABWPRSGqvBYpoKfFTic8FPXFVrN2 USXWvWxUob+7rC8LrCA== X-Proofpoint-GUID: 96mxN4vlpFm0bZ4Kww6WEsKKdAxgPQ2f X-Proofpoint-ORIG-GUID: 96mxN4vlpFm0bZ4Kww6WEsKKdAxgPQ2f X-Authority-Analysis: v=2.4 cv=LquiDHdc c=1 sm=1 tr=0 ts=69d43085 cx=c_pps a=RP+M6JBNLl+fLTcSJhASfg==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=A68ZeqOElA5rGN51AGUA:9 a=QEXdDO2ut3YA:10 a=iS9zxrgQBfv6-_F4QbHw:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-04-06_04,2026-04-03_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 priorityscore=1501 adultscore=0 phishscore=0 impostorscore=0 spamscore=0 suspectscore=0 clxscore=1015 bulkscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604010000 definitions=main-2604060219 Fix the code style/format issues reported by checkpatch.pl script. Signed-off-by: Kamal Wadhwa --- drivers/regulator/qcom-rpmh-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qc= om-rpmh-regulator.c index 8e1c576b718b595bbbff7f5fa76de84d4e90f3bb..23ce4bce89d51a0fa5cb50adf37= f38fe54ce5139 100644 --- a/drivers/regulator/qcom-rpmh-regulator.c +++ b/drivers/regulator/qcom-rpmh-regulator.c @@ -109,7 +109,7 @@ static const struct resource_name_formats vreg_rsc_name= _lookup[NUM_REGULATOR_TYP * regulator * @ops: Pointer to regulator ops callback structure * @voltage_ranges: The possible ranges of voltages supported by this - * PMIC regulator type + * PMIC regulator type * @n_linear_ranges: Number of entries in voltage_ranges * @n_voltages: The number of unique voltage set points defined * by voltage_ranges --=20 2.25.1