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


Groups > linux.kernel > #1335635

Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value

From Mark Brown <broonie@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value
Date 2016-02-16 18:00 +0100
Message-ID <r2R8K-21y-5@gated-at.bofh.it> (permalink)
References <r2ucb-3qG-61@gated-at.bofh.it> <r2JXB-5TU-45@gated-at.bofh.it> <r2NHQ-8jx-17@gated-at.bofh.it> <r2PzY-18K-23@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 Tue, Feb 16, 2016 at 04:12:39PM +0100, Arnd Bergmann wrote:
> On Tuesday 16 February 2016 13:11:08 Mark Brown wrote:

> > No, we always return an error pointer if we fail to get a regulator.
> > The difference with optional regulators is in how we handle the
> > situation where we have full constraints and a regulator is not mapped
> > in, normally we assume there must be one with no software control but we
> > need to work around buggy bindings as the device would be non-functional
> > without power.

> Sorry, I should not have said "optional" here, which has a specific
> meaning in the API. I meant a driver that can work with either
> CONFIG_REGULATOR enabled or disabled (which is something slightly
> different).

Ah, right!

> I guess a driver needing to know whether regulators are built-in
> should check 'if (IS_ENABLED(CONFIG_REGULATOR))' rather than
> checking the return code for NULL.

Yes, that's the expected interface here if anyone does need to check
although for most users it's expected that the stubs will be sufficient
and they don't need to check at all.

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


Thread

[PATCH] PM / OPP: Initialize regulator pointer to an error value Viresh Kumar <viresh.kumar@linaro.org> - 2016-02-15 17:30 +0100
  Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value Viresh Kumar <viresh.kumar@linaro.org> - 2016-02-15 17:50 +0100
  Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value Jon Hunter <jonathanh@nvidia.com> - 2016-02-15 17:50 +0100
  Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value Arnd Bergmann <arnd@arndb.de> - 2016-02-15 21:40 +0100
    Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value "Rafael J. Wysocki" <rafael@kernel.org> - 2016-02-15 22:20 +0100
      Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value Viresh Kumar <viresh.kumar@linaro.org> - 2016-02-16 01:50 +0100
        Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-16 01:50 +0100
    Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value Viresh Kumar <viresh.kumar@linaro.org> - 2016-02-16 02:10 +0100
      Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value Mark Brown <broonie@kernel.org> - 2016-02-16 03:00 +0100
        Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value Arnd Bergmann <arnd@arndb.de> - 2016-02-16 10:20 +0100
          Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value Mark Brown <broonie@kernel.org> - 2016-02-16 14:20 +0100
            Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value Arnd Bergmann <arnd@arndb.de> - 2016-02-16 16:20 +0100
              Re: [PATCH] PM / OPP: Initialize regulator pointer to an error value Mark Brown <broonie@kernel.org> - 2016-02-16 18:00 +0100

csiph-web