From: Alban Bedel <alban.bedel@avionic-design.de>
To: Mark Brown <broonie@kernel.org>
Cc: linux-kernel@vger.kernel.org, Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [PATCH] regulator: core: Fix the init of DT defined fixed regulators
Date: Mon, 19 May 2014 18:37:49 +0200 [thread overview]
Message-ID: <20140519183749.170aada2@avionic-0020> (raw)
In-Reply-To: <20140519161838.GB12304@sirena.org.uk>
[-- Attachment #1: Type: text/plain, Size: 1220 bytes --]
On Mon, 19 May 2014 17:18:38 +0100
Mark Brown <broonie@kernel.org> wrote:
> On Mon, May 19, 2014 at 05:25:56PM +0200, Alban Bedel wrote:
>
> > Would checking that the regulator is at the voltage declared in the DT
> > better? Or should I just add a pseudo set method to the regulator driver
> > that only accept the current voltage? That could also be implemented at
> > the core level using a default method for all regulators that have a get
> > but no set method.
>
> We already have code in the core to accept set_voltage() on fixed
> voltage regulators - are you sure you're working with current code?
> Otherwise fixing things to go through the standard set_voltage() path
> would be OK. There should be no need to add a dummy function for
> setting.
The regulator_set_voltage() function do have code to handle such
read-only regulators. However the regulator init directly call the low
level function _regulator_do_set_voltage() which just error out when no
set method is available, hence my original patch.
Unless there is some better proposal, or objections, I'll submit a new
patch tomorrow to call _regulator_do_set_voltage() only if the current
voltage isn't correct.
Alban
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2014-05-19 16:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-19 11:12 [PATCH] regulator: core: Fix the init of DT defined fixed regulators Alban Bedel
2014-05-19 14:39 ` Mark Brown
2014-05-19 15:25 ` Alban Bedel
2014-05-19 16:18 ` Mark Brown
2014-05-19 16:37 ` Alban Bedel [this message]
2014-05-19 16:55 ` Mark Brown
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=20140519183749.170aada2@avionic-0020 \
--to=alban.bedel@avionic-design.de \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.