linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Lars-Peter Clausen <lars@metafoo.de>,
	Paul Cercueil <paul.cercueil@analog.com>
Cc: linux-iio@vger.kernel.org
Subject: Re: [PATCH 1/3] iio: ad5064: Explicitly configure whether to use external supply
Date: Tue, 18 Feb 2014 08:57:53 +0000	[thread overview]
Message-ID: <53032091.5080100@kernel.org> (raw)
In-Reply-To: <52FB6A8F.4070404@metafoo.de>

On 12/02/14 12:35, Lars-Peter Clausen wrote:
> On 02/12/2014 01:19 PM, Lars-Peter Clausen wrote:
>> On 02/12/2014 01:01 PM, Paul Cercueil wrote:
>>> Previously the driver would revert to internal supply if the
>>> external supply couldn't be found. This had multiple problems:
>>> - it caused silently ignored errors when a regulator was intended
>>>    to be supplied, but was not specified correctly.
>>> - if CONFIG_REGULATOR is disabled, regulator_get() will always
>>>    return a dummy regulator, which caused a device to always use
>>>    the external vref mode, even though there is none.
>>>
>>> This patch addresses the issue by adding a platform data structure,
>>> containing a boolean field use_external_ref. If the platform data
>>> structure is present and if that boolean is set, the external vref
>>> is used; otherwise the internal vref is used.
>>>
>>> In the case where an external vref is wanted but regulator_get()
>>> fails, the driver no longer reverts to using the internal vref,
>>> but returns an error instead.
>>>
>>> Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
>>
>> All three patches:
>>
>> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
>
> Uhm, actually no. I think for devices without an internal reference we should default to using the external reference if no platform data is specified. Everything else doesn't make too much sense.

Agreed. If present, we default to the internal reference ifan external
one is not provided.  The logic in the driver can check if one is specified,
whether or not config_regulator is enabled.

Jonathan




  reply	other threads:[~2014-02-18  8:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12 12:01 [PATCH 1/3] iio: ad5064: Explicitly configure whether to use external supply Paul Cercueil
2014-02-12 12:01 ` [PATCH 2/3] iio: ad5064: Allow choosing external supply from device tree Paul Cercueil
2014-02-12 12:01 ` [PATCH 3/3] devicetree: ad5064: Added devicetree bindings documentation Paul Cercueil
2014-02-12 12:18   ` Mark Rutland
2014-02-12 14:07     ` Paul Cercueil
2014-02-12 12:19 ` [PATCH 1/3] iio: ad5064: Explicitly configure whether to use external supply Lars-Peter Clausen
2014-02-12 12:35   ` Lars-Peter Clausen
2014-02-18  8:57     ` Jonathan Cameron [this message]
2014-07-22 23:06 ` Gregory Fong
2014-07-23 19:23   ` Lars-Peter Clausen

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=53032091.5080100@kernel.org \
    --to=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=paul.cercueil@analog.com \
    /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).