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


Groups > linux.kernel > #1477262

Re: Regulator probe

From Mark Brown <broonie@kernel.org>
Newsgroups linux.kernel
Subject Re: Regulator probe
Date 2016-09-06 12:40 +0200
Message-ID <selXj-PI-5@gated-at.bofh.it> (permalink)
References <scBDc-3cq-15@gated-at.bofh.it> <scCfT-3EJ-29@gated-at.bofh.it> <scD2i-4er-27@gated-at.bofh.it> <scIlk-7GM-19@gated-at.bofh.it> <se4D8-60g-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Mon, Sep 05, 2016 at 07:01:52PM +0300, Andy Shevchenko wrote:
> On Thu, 2016-09-01 at 18:02 +0100, Mark Brown wrote:

> > Anyway if that's the case then it should all be working already then
> > unless SFI goes down the ACPI code paths or someone changed SFI since
> > SFI won't flag as having full costraints and therefore any missing
> > regulator will report as deferring.

> But it's a real burden to describe in platform code _every_ regulators
> that device driver may need (for example, "vqmmc" is optional and even
> "vmmc" is optional for 2 out of 3 SDHCI host controllers!).

Nothing says you have to describe all regulators, you just need to tell
the core you have told it about everything you're going to tell it
about.  Until you do that the core has to assume that something may come
along later and describe that supply.

> >   If that is indeed the case you've
> > probably got a broken consumer driver that's not handing probe
> > deferrals.

> It has, but see above, for 3 SDHCI controllers I have to provide 5 dummy
> regulators and 1 real vs. just 1 real.

The core will substitute in the dummies once it knows that everything is
described, you don't need to do it manually unless you have to provide
information like voltages.

> > > Basically you mean we have not call
> > > regulator_has_full_constraints()?
> > > In that case we have to provide stubs for all expected regulators,
> > > in
> > > case of SDHCI one real and one dummy, who knows how many them in the
> > > drivers, but for each we have to provide that. Am I right? 

> > You have to either not call regulator_has_full_constraints() or supply
> > all the mappings for device supplies before you register a device.  If
> > you don't call regulator_has_full_constraints() missing regulators
> > will
> > always defer so you would need to provide a fixed voltage regulator
> > for
> > it.

> It would be plenty of dummy regulators.

If and only if you don't provide the mappings.

> > It would be a lot more sensible than SFI, it's so limited you're
> > basically just using board files but with the limitations of having to
> > do bits of it through firmware and then join the two up which seems
> > like
> > the worst of both worlds.

> I dunno if DT has any means of coexistence with e820 BIOS where PCI
> devices are enumerated natively.

Of course it does, DT based systems support enumerable buses like USB
and PCI.  Enumerating via BIOS is no different really.

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


Thread

Regulator probe Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-09-01 17:00 +0200
  Re: Regulator probe Mark Brown <broonie@kernel.org> - 2016-09-01 17:40 +0200
    Re: Regulator probe Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-09-01 18:30 +0200
      Re: Regulator probe Mark Brown <broonie@kernel.org> - 2016-09-02 00:10 +0200
        Re: Regulator probe Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-09-05 18:10 +0200
          Re: Regulator probe Mark Brown <broonie@kernel.org> - 2016-09-06 12:40 +0200
            Re: Regulator probe Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-09-07 16:40 +0200
              Re: Regulator probe Mark Brown <broonie@kernel.org> - 2016-09-09 14:20 +0200
                Re: Regulator probe Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-09-09 15:00 +0200

csiph-web