mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Maulik Shah (mkshah)" <maulik.shah@oss.qualcomm.com>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
	Kamal Wadhwa <kamal.wadhwa@oss.qualcomm.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Vinod Koul <vkoul@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/4] soc: qcom: rpmh: Add support to read back resource settings
Date: Thu, 16 Apr 2026 09:56:06 +0530	[thread overview]
Message-ID: <b2fdbfd4-289c-418f-927e-937f084d3d23@oss.qualcomm.com> (raw)
In-Reply-To: <27c48c9c-32ba-4f92-834e-637dc728c6d3@oss.qualcomm.com>



On 4/7/2026 6:26 PM, Konrad Dybcio wrote:
> On 4/7/26 6:43 AM, 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.
>>
>> 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 <maulik.shah@oss.qualcomm.com>
>> Signed-off-by: Kamal Wadhwa <kamal.wadhwa@oss.qualcomm.com>
>> ---
> 
> [...]
> 
>> @@ -453,6 +454,11 @@ static irqreturn_t tcs_tx_done(int irq, void *p)
>>  
>>  		trace_rpmh_tx_done(drv, i, req);
>>  
>> +		if (req->is_read) {
>> +			reg = drv->regs[RSC_DRV_CMD_RESP_DATA];
>> +			req->cmds[0].data = read_tcs_reg(drv, reg, i);
> 
> Does this break if we send a request that contains a read request
> at index != 0, or chain multiple read commands? (is that possible?)
> 
> Or perhaps this is fine, because the only way to "legally" send a
> read command is rpmh_read() which sends a message with just a single
> read command?

Yes, the only way currently to send a read command is via rpmh_read()
with single read command (placed at index 0) and hence the read is from
same index.

From H/W point it is possible to fill in the TCS command at index != 0
and trigger or chain of multiple read command (With something like
rpmh_read_batch() API if a use case ever comes up to read multiple resources).

Thanks,
Maulik

> 
> Otherwise this patch looks good to me
> 
> Konrad
> 


  reply	other threads:[~2026-04-16  4:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-07  4:43 [PATCH v3 0/4] regulator: qcom-rpmh: Support RPMH address reads and use it for rpmh-regulators Kamal Wadhwa
2026-04-07  4:43 ` [PATCH v3 1/4] soc: qcom: rpmh: Add support to read back resource settings Kamal Wadhwa
2026-04-07 12:56   ` Konrad Dybcio
2026-04-16  4:26     ` Maulik Shah (mkshah) [this message]
2026-04-19  0:06   ` Dmitry Baryshkov
2026-04-20  8:35   ` Konrad Dybcio
2026-04-07  4:43 ` [PATCH v3 2/4] regulator: qcom-rpmh: Fix PMIC5 BOB bypass mode handling Kamal Wadhwa
2026-04-19  0:01   ` Dmitry Baryshkov
2026-04-07  4:43 ` [PATCH v3 3/4] regulator: qcom-rpmh: readback voltage/bypass/mode/status set during bootup Kamal Wadhwa
2026-04-07 11:16   ` Konrad Dybcio
2026-04-07 12:36     ` Kamal Wadhwa
2026-04-07  4:43 ` [PATCH v3 4/4] regulator: qcom-rpmh: Fix coding style issues Kamal Wadhwa
2026-04-19  0:06   ` Dmitry Baryshkov

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=b2fdbfd4-289c-418f-927e-937f084d3d23@oss.qualcomm.com \
    --to=maulik.shah@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=broonie@kernel.org \
    --cc=kamal.wadhwa@oss.qualcomm.com \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vkoul@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

all inboxes | Powered by JetHome®