mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Kamal Wadhwa <kamal.wadhwa@oss.qualcomm.com>
Cc: Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Vinod Koul <vkoul@kernel.org>,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 3/4] regulator: qcom-rpmh: readback voltage/bypass/mode/status set during bootup
Date: Fri, 24 Jul 2026 13:48:30 +0100	[thread overview]
Message-ID: <amNfHiL2W-uLlPjY@sirena.co.uk> (raw)
In-Reply-To: <gaigrfpfunsqwuxf24uonw4mrkdse4ap3cywi2eg2qdyfgfzsd@hk6zghfqnkty>

On Fri, Jul 24, 2026 at 04:13:02PM +0530, Kamal Wadhwa wrote:
> On Wed, Jul 22, 2026 at 05:46:37PM +0100, Mark Brown wrote:

> > A get_status() operation should be reading the actual hardware status
> > right now, not driver state - this should be reading whatever the value
> > is right now.  If the hardware doesn't support this then just don't
> > provide the operation.

> Actually we are reading from HW what we voted in terms of ENABLE/BYPASS/MODE
> and we are combing these in the `rpmh_regulator_determine_initial_status()`
> to come up with the `vreg->status`at the time of probe.

No, that's not the point.  A get_status() operation needs to return the
actual hardware status *now*, not a cached value from some random time
in the past and not something that was written by the driver.

> So, shall I read the HW MODE/BYPSS/ENABLE value in every get_status() call?

If they reflect values that might be dynamically updated by the
hardware, yes.  If they are just control registers that the hardware
will not update autonomously they are not suitable for a get_status()
operation.

  reply	other threads:[~2026-07-24 12:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-20 15:36 [PATCH v5 0/4] regulator: qcom-rpmh: Support RPMH address reads and use it for rpmh-regulators Kamal Wadhwa
2026-07-20 15:36 ` [PATCH v5 1/4] soc: qcom: rpmh: Add support to read back resource settings Kamal Wadhwa
2026-07-20 15:36 ` [PATCH v5 2/4] regulator: qcom-rpmh: Fix PMIC5 BOB bypass mode handling Kamal Wadhwa
2026-07-20 15:36 ` [PATCH v5 3/4] regulator: qcom-rpmh: readback voltage/bypass/mode/status set during bootup Kamal Wadhwa
2026-07-22 16:46   ` Mark Brown
2026-07-24 10:43     ` Kamal Wadhwa
2026-07-24 12:48       ` Mark Brown [this message]
2026-07-29 19:41         ` Kamal Wadhwa
2026-07-29 20:04           ` Mark Brown
2026-07-29 21:58             ` Kamal Wadhwa
2026-07-29 23:11               ` Mark Brown
2026-07-30  8:10                 ` Kamal Wadhwa
2026-07-31 23:39                   ` Mark Brown
2026-07-20 15:36 ` [PATCH v5 4/4] regulator: qcom-rpmh: Fix coding style issues 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=amNfHiL2W-uLlPjY@sirena.co.uk \
    --to=broonie@kernel.org \
    --cc=andersson@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 \
    --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®