[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 5 May 2017 19:50:31 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Mika Westerberg <mika.westerberg@...ux.intel.com>,
Jan Kiszka <jan.kiszka@...mens.com>
Cc: linux-iio@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Sascha Weisenberger <sascha.weisenberger@...mens.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Peter Meerwald-Stadler <pmeerw@...erw.net>,
Rob Herring <robh@...nel.org>
Subject: Re: [PATCH v3] iio: adc: Add support for TI ADC108S102 and ADC128S102
On 05/05/17 11:40, Mika Westerberg wrote:
> On Fri, May 05, 2017 at 12:23:26PM +0200, Jan Kiszka wrote:
>>>> + } else {
>>>> + st->reg = devm_regulator_get(&spi->dev, "vref");
>>>> + if (IS_ERR(st->reg))
>>>> + return PTR_ERR(st->reg);
>>>
>>> This should be an optional regulator and in case of ACPI you just don't
>>> have it.
>>
>> It's mandatory for this DT case, so I will not change that.
>
> Well, it would be better if you don't need to deviate in the driver like
> this. And it clearly is optional because in case of ACPI you don't need
> it.
>
> Not my call, though.
>
I'd keep it as mandatory. The ACPI case is more of a workaround of
a lack of information than anything. The only way you could make it optional
would be to simply not provide the scale if it wasn't there.
(to do that have two channel sets and switch between them depending on its
presence).
We'd do it as optional if there was an existing binding defined where it wasn't
specified (not much use having the fake regulator show up but be unable to
answer the what voltage question ;)
Jonathan
Powered by blists - more mailing lists