linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Mark Brown <broonie@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	linux-kernel@vger.kernel.org,
	Bjorn Andersson <bjorn.andersson@sonymobile.com>
Subject: Re: [PATCH 4/4] regulator: core: make bulk API support optional supplies
Date: Mon, 6 Feb 2017 16:47:23 -0800	[thread overview]
Message-ID: <20170207004723.GA35854@dtor-ws> (raw)
In-Reply-To: <20170207002118.GD27837@minitux>

On Mon, Feb 06, 2017 at 04:21:18PM -0800, Bjorn Andersson wrote:
> On Fri 03 Feb 15:16 PST 2017, Dmitry Torokhov wrote:
> 
> > Make it possible to use the bulk API with optional supplies, by allowing
> > the consumer to marking supplies as optional in the regulator_bulk_data.
> > 
> > Based on earlier patch by Bjorn Andersson <bjorn.andersson@sonymobile.com>
> > 
> 
> Hi Dmitry,
> 
> Rather than fixing my broken patch, I reverted it after talking to Mark.
> This as I realized that I got things backwards.
> 
> When a given component has an "optional" supply this can mean two
> things:
> 1) The component has a supply pin that is connected, but the kernel has
> no information about what it's connected to (in essence a "broken" DT).
> In this case regulator_get() will return a dummy regulator.
> 
> 2) The component has a supply pin that might or not might be connected
> and depending on this the component needs to be configured differently.
> In this case you use regulator_get_optional() which will return an error
> in the event that no supply is specified.

Right, I'm after the case #2 and I believe there are cases, where, after
configuring the chip based on the regulators available, we can continue
handling (enabling and disabling) all regulators en-masse. It does
simplify the code in certain cases (tlv320aic32x4 and sgtl5000, and I am
sure other drivers, where configuration is "static"), but will not help
for others (like Mark's MMC example, where optional regulator is managed
actively - switching voltage, etc).

Thanks.

-- 
Dmitry

  reply	other threads:[~2017-02-07  0:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-03 23:16 [PATCH 1/4] regulator: core: fix typo in regulator_bulk_disable() Dmitry Torokhov
2017-02-03 23:16 ` [PATCH 2/4] regulator: core: simplify regulator_bulk_force_disable() Dmitry Torokhov
2017-02-04 10:48   ` Applied "regulator: core: simplify regulator_bulk_force_disable()" to the regulator tree Mark Brown
2017-02-03 23:16 ` [PATCH 3/4] regulator: core: optimize devm_regulator_bulk_get() Dmitry Torokhov
2017-02-04 10:48   ` Applied "regulator: core: optimize devm_regulator_bulk_get()" to the regulator tree Mark Brown
2017-02-03 23:16 ` [PATCH 4/4] regulator: core: make bulk API support optional supplies Dmitry Torokhov
2017-02-04  7:53   ` kbuild test robot
2017-02-04 10:56   ` Mark Brown
2017-02-04 18:13     ` Dmitry Torokhov
2017-02-05 16:07       ` Mark Brown
2017-02-06  4:30         ` Dmitry Torokhov
2017-02-06 12:08           ` Mark Brown
2017-02-07  0:21   ` Bjorn Andersson
2017-02-07  0:47     ` Dmitry Torokhov [this message]
2017-02-04 10:47 ` Applied "regulator: core: fix typo in regulator_bulk_disable()" to the regulator tree 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=20170207004723.GA35854@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=bjorn.andersson@sonymobile.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).