Re: [PATCH 2/2] regulator: qcom-rpmh: Add support to read regulator settings

From: Mark Brown
Date: Mon Jun 23 2025 - 13:04:04 EST


On Mon, Jun 23, 2025 at 10:13:41PM +0530, Kamal Wadhwa wrote:

> To address this issue, enhance the `get_voltage_sel()`,
> `get_mode()`, and `is_enabled()` callbacks to read the regulator
> settings directly from the RPMH hardware using the `rpmh_read()`

Two things here. One is that my understanding was that at least some of
the firmwares simply do not provide read functionality - this new code
will turn that into an error if it's the case. The other is that
there's an expectation that the read operations will return the value
that was configured by the host, we might get confused if that's not the
case. I'm not sure if there's paths that are currently implemented
that'd have issues, but it's a concern.

For the enable there's a separate status callback that should be
implemented, and you could bootstrap the state. For the voltage
readback it's a range that's configured so it should be fine to just do
this I think, though I'd need to go double check the code for keeping
multiple supplies tied within a range.

Attachment: signature.asc
Description: PGP signature