mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
To: Mike Looijmans <mike.looijmans@topic.nl>
Cc: linux-kernel@vger.kernel.org,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Uwe Kleine-König" <ukleinek@kernel.org>
Subject: Re: [PATCH 1/2] regulator: pwm-regulator: Revert "Calculate the output voltage for disabled PWMs"
Date: Tue, 24 Nov 2026 22:33:41 +0100	[thread overview]
Message-ID: <CAFBinCAOrgZPFAx7GoA7sY4JF1uMPjVpf914dUqE0oUtSC_FPA@mail.gmail.com> (raw)
In-Reply-To: <CAFBinCC23T67TMAGOU13a5+3jw2ps3Ye5aZgUUXJQ3cVKmVT2Q@mail.gmail.com>

On Mon, Nov 9, 2026 at 10:30 PM Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
[...]
> > What happens in my case:
> >
> > - This function returns 0% because the PWM is still disabled
> >
> > - Core wants it to be 50%, so it calls set_voltage() which sets the PWM
> > but doesn't enable it yet
> >
> > - Core calls this function again and (still) gets 0% as being the setting.
> >
> > - This goes on until the supply (and hence the PWM) is enabled.
> >
> >
> > What the callers expect is that this function returns the value that
> > would be set if the PWM were enabled.
> I think this is a good description and something we can improve upon.
> I attached a patch - please try it. If it's not enough: please apply
> your patch 2/2 on top.
> The goal of that patch is:
> - keep duty cycle around once it has been set
> - only reset to duty cycle 0 at initialization and only if the
> regulator has been described with regulator-boot-on
> - (it achieves this by keeping a copy of struct pwm_state around)
>
> I'd like to hear about your testing results and initial code-review feedback.
> +Cc Uwe - happy to take your feedback as well.
Thanks Uwe for your feedback.
Mike, did you find the time to test my patch?

  reply	other threads:[~2026-11-24 21:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.949ef384-8293-46b8-903f-40a477c056ae.44efb263-5265-4fae-9cff-e8eaefbc0afd@emailsignatures365.codetwo.com>
2026-11-06 12:59 ` Mike Looijmans
     [not found]   ` <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.949ef384-8293-46b8-903f-40a477c056ae.6954786b-65e0-4206-a0c4-60cd251dbec9@emailsignatures365.codetwo.com>
2026-11-06 12:59     ` [PATCH 2/2] regulator: pwm-regulator: Revert "Add validity checks in continuous .get_voltage" Mike Looijmans
2026-11-06 13:37       ` Mark Brown
2026-11-06 21:45         ` Martin Blumenstingl
2026-11-07 12:25           ` Mark Brown
2026-11-09  6:34           ` Mike Looijmans
2026-11-08 15:13       ` Mark Brown
2026-11-09  6:22         ` Mike Looijmans
2026-11-06 13:36   ` [PATCH 1/2] regulator: pwm-regulator: Revert "Calculate the output voltage for disabled PWMs" Mark Brown
2026-11-06 13:56     ` Mike Looijmans
2026-11-06 21:57     ` Martin Blumenstingl
2026-11-09  6:09       ` Mike Looijmans
2026-11-09 21:30         ` Martin Blumenstingl
2026-11-24 21:33           ` Martin Blumenstingl [this message]
2026-11-10  9:33   ` Uwe Kleine-König

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=CAFBinCAOrgZPFAx7GoA7sY4JF1uMPjVpf914dUqE0oUtSC_FPA@mail.gmail.com \
    --to=martin.blumenstingl@googlemail.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike.looijmans@topic.nl \
    --cc=ukleinek@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®