Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1575288

Re: [PATCH 4/4] regulator: core: make bulk API support optional supplies

From Dmitry Torokhov <dmitry.torokhov@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 4/4] regulator: core: make bulk API support optional supplies
Date 2017-02-07 01:50 +0100
Message-ID <t828N-3Uj-3@gated-at.bofh.it> (permalink)
References <t6Vj3-8vA-7@gated-at.bofh.it> <t6Vj3-8vA-9@gated-at.bofh.it> <t81Pr-3N7-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/4] regulator: core: fix typo in regulator_bulk_disable() Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-02-04 00:20 +0100
  [PATCH 4/4] regulator: core: make bulk API support optional supplies Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-02-04 00:20 +0100
    Re: [PATCH 4/4] regulator: core: make bulk API support optional  supplies kbuild test robot <lkp@intel.com> - 2017-02-04 09:00 +0100
    Re: [PATCH 4/4] regulator: core: make bulk API support optional  supplies Mark Brown <broonie@kernel.org> - 2017-02-04 12:00 +0100
      Re: [PATCH 4/4] regulator: core: make bulk API support optional  supplies Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-02-04 19:20 +0100
        Re: [PATCH 4/4] regulator: core: make bulk API support optional  supplies Mark Brown <broonie@kernel.org> - 2017-02-05 17:10 +0100
          Re: [PATCH 4/4] regulator: core: make bulk API support optional  supplies Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-02-06 05:40 +0100
            Re: [PATCH 4/4] regulator: core: make bulk API support optional  supplies Mark Brown <broonie@kernel.org> - 2017-02-06 13:10 +0100
    Re: [PATCH 4/4] regulator: core: make bulk API support optional  supplies Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-02-07 01:30 +0100
      Re: [PATCH 4/4] regulator: core: make bulk API support optional  supplies Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-02-07 01:50 +0100
  [PATCH 3/4] regulator: core: optimize devm_regulator_bulk_get() Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-02-04 00:20 +0100
    Applied "regulator: core: optimize devm_regulator_bulk_get()" to the regulator tree Mark Brown <broonie@kernel.org> - 2017-02-04 11:50 +0100
  Applied "regulator: core: fix typo in regulator_bulk_disable()" to the regulator tree Mark Brown <broonie@kernel.org> - 2017-02-04 11:50 +0100

csiph-web