Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: "Maulik Shah (mkshah)" <maulik.shah@oss.qualcomm.com>
To: Bjorn Andersson <andersson@kernel.org>,
	Kamal Wadhwa <kamal.wadhwa@oss.qualcomm.com>
Cc: Konrad Dybcio <konradybcio@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/4] soc: qcom: rpmh: Add support to read back resource settings
Date: Thu, 23 Oct 2025 10:16:48 +0530	[thread overview]
Message-ID: <4831d12b-a42a-464a-a70f-e0e40cf4ae4b@oss.qualcomm.com> (raw)
In-Reply-To: <litd6qcxuios7uwwcrz55ea24kj26onrjo2aekouynsce6wslj@vatjbulg64mb>



On 10/23/2025 2:51 AM, Bjorn Andersson wrote:
> On Wed, Oct 22, 2025 at 02:38:54AM +0530, Kamal Wadhwa wrote:
>> From: Maulik Shah <maulik.shah@oss.qualcomm.com>
>>
>> All rpmh_*() APIs so far have supported placing votes for various
>> resource settings but the H/W also have option to read resource
>> settings.
>>
>> This change adds a 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.
>>
> 
> Allow me to express my disappointment over the fact that you sat on this
> for 7 years!

This was a dead API (even in downstream) with no user since SDM845/ 7 years.
Read support was eventually removed from downstream driver too for the same reason.
There were early discussions to remove read support from RSC H/W, due to lack of users.
Its not realized yet and all SoCs still supports read.

Now we have a regulator client requirement to read resource votes and reason to bring back this API.

> 
>> Link: https://lore.kernel.org/r/20250623-add-rpmh-read-support-v1-1-ae583d260195@oss.qualcomm.com
> 
> Why is there a Link here?

I will address this in next revision.

> 
>> Signed-off-by: Maulik Shah <maulik.shah@oss.qualcomm.com>
>> Signed-off-by: Kamal Wadhwa <kamal.wadhwa@oss.qualcomm.com>
>> ---
>>  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.c b/drivers/soc/qcom/rpmh.c
> [..]
>> +/**
>> + * 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.
>> + *
>> + * May sleep. Do not call from atomic contexts.
> 
> * Context: May sleep...

I will address this in next revision.

Thanks,
Maulik> 
> Regards,
> Bjorn
> 
>> + *
>> + * Return: 0 on success, negative errno on failure
>> + */
>> +int rpmh_read(const struct device *dev, struct tcs_cmd *cmd)


  reply	other threads:[~2025-10-23  4:46 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-21 21:08 [PATCH v2 0/4] Add support to read RPMH regulator settings Kamal Wadhwa
2025-10-21 21:08 ` [PATCH v2 1/4] regulator: rpmh-regulator: Fix PMIC5 BOB bypass mode handling Kamal Wadhwa
2025-10-21 22:23   ` Dmitry Baryshkov
2025-10-22 14:58     ` Konrad Dybcio
2025-10-22 15:11       ` Dmitry Baryshkov
2025-10-22 15:15         ` Mark Brown
2025-10-23 11:37           ` Dmitry Baryshkov
2025-10-24  8:03             ` Kamal Wadhwa
2025-10-27 14:31               ` Dmitry Baryshkov
2025-10-21 22:23   ` Dmitry Baryshkov
2025-10-22 14:57   ` Konrad Dybcio
2025-10-21 21:08 ` [PATCH v2 2/4] soc: qcom: rpmh: Add support to read back resource settings Kamal Wadhwa
2025-10-21 22:28   ` Dmitry Baryshkov
2025-10-22  6:13     ` Maulik Shah (mkshah)
2025-10-22 21:21   ` Bjorn Andersson
2025-10-23  4:46     ` Maulik Shah (mkshah) [this message]
2025-10-23  8:17       ` Konrad Dybcio
2025-10-23  8:57         ` Maulik Shah (mkshah)
2025-10-23  9:09           ` Konrad Dybcio
2025-10-23  9:46             ` Maulik Shah (mkshah)
2025-10-27 13:29               ` Konrad Dybcio
2025-10-27 14:38                 ` Neil Armstrong
2025-10-27 15:47                   ` Konrad Dybcio
2025-11-11 20:00                     ` Bjorn Andersson
2025-11-12 11:26   ` Konrad Dybcio
2025-11-17  8:26     ` Maulik Shah (mkshah)
2025-11-17 12:34       ` Konrad Dybcio
2025-11-21  8:41         ` Maulik Shah (mkshah)
2025-12-18 12:50           ` Konrad Dybcio
2025-10-21 21:08 ` [PATCH v2 3/4] regulator: qcom-rpmh: Add support to read regulator settings Kamal Wadhwa
2025-10-22  8:43   ` Dmitry Baryshkov
2025-11-07 14:59     ` Kamal Wadhwa
2025-10-22 12:35   ` kernel test robot
2025-10-21 21:08 ` [PATCH v2 4/4] regulators: qcom-rpmh-regulator: Fix coding style issues Kamal Wadhwa
2025-10-22  8:44   ` Dmitry Baryshkov
2025-10-22 21:02 ` [PATCH v2 0/4] Add support to read RPMH regulator settings Bjorn Andersson
2025-10-23 10:34   ` Kamal Wadhwa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4831d12b-a42a-464a-a70f-e0e40cf4ae4b@oss.qualcomm.com \
    --to=maulik.shah@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=broonie@kernel.org \
    --cc=kamal.wadhwa@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox