Re: [PATCH v3 1/4] soc: qcom: rpmh: Add support to read back resource settings
From: Konrad Dybcio
Date: Tue Apr 07 2026 - 08:58:36 EST
On 4/7/26 6:43 AM, Kamal Wadhwa wrote:
> From: Maulik Shah <maulik.shah@xxxxxxxxxxxxxxxx>
>
> 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@xxxxxxxxxxxxxxxx>
> Signed-off-by: Kamal Wadhwa <kamal.wadhwa@xxxxxxxxxxxxxxxx>
> ---
[...]
> @@ -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?
Otherwise this patch looks good to me
Konrad