[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <72e30e5f-bc65-5176-2e60-f94f71a710d3@linaro.org>
Date: Thu, 21 Jul 2022 11:38:18 +0200
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Rob Herring <robh@...nel.org>, Jonathan Cameron <jic23@...nel.org>
Cc: Lars-Peter Clausen <lars@...afoo.de>,
Michael Hennerich <Michael.Hennerich@...log.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Alexandru Tachici <alexandru.tachici@...log.com>,
Marcelo Schmitt <marcelo.schmitt1@...il.com>,
Marcus Folkesson <marcus.folkesson@...il.com>,
Kent Gustavsson <kent@...oris.se>,
Tomislav Denis <tomislav.denis@....com>,
Stefan Popa <stefan.popa@...log.com>,
Beniamin Bia <beniamin.bia@...log.com>,
Patrick Vasseur <patrick.vasseur@....fr>,
Vladimir Barinov <vladimir.barinov@...entembedded.com>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Philippe Reynes <tremyfr@...oo.fr>,
Jacopo Mondi <jacopo@...ndi.org>,
Akinobu Mita <akinobu.mita@...il.com>,
Alexandru Lazar <alazar@...rtmail.com>,
Oskar Andero <oskar.andero@...il.com>,
MÃ¥rten Lindahl <martenli@...s.com>,
Bogdan Pricop <bogdan.pricop@...tex.com>,
Angelo Compagnucci <angelo.compagnucci@...il.com>,
Dan Murphy <dmurphy@...com>, linux-iio@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-fbdev@...r.kernel.org, linux-spi@...r.kernel.org,
Mark Brown <broonie@...nel.org>
Subject: Re: [RFC PATCH] dt-bindings: iio: adc: use spi-peripheral-props.yaml
On 19/07/2022 00:00, Rob Herring wrote:
> On Sat, Jul 16, 2022 at 07:26:04PM +0100, Jonathan Cameron wrote:
>> On Fri, 15 Jul 2022 11:53:02 +0200
>> Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org> wrote:
>>
>>> Instead of listing directly properties typical for SPI peripherals,
>>> reference the spi-peripheral-props.yaml schema. This allows using all
>>> properties typical for SPI-connected devices, even these which device
>>> bindings author did not tried yet.
>>>
>>> Remove the spi-* properties which now come via spi-peripheral-props.yaml
>>> schema, except for the cases when device schema adds some constraints
>>> like maximum frequency.
>>>
>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
>>>
>>> ---
>>>
>>> This is an RFC with only some files changed, as I am still not sure of
>>> benefits for typical case - device node has just spi-max-frequency and
>>> nothing more. I still find useful to reference the schema, but maybe I
>>> am missing something?
>>>
>>> Before doing wide-tree cleanup like this, I would be happy to receive
>>> some feedback whether this makes sense.
>>
>> Hi Krzysztof,
>>
>> This has the side effect of allowing spi-cpol / spi-cpha for devices
>> where they weren't previously allowed by the binding. A typical device
>> only supports a subset of combinations of those.
>>
>> I'm not clear whether these should always be allowed (e.g. allow for inverters
>> etc in the path) or whether we should be enforcing the "correct"
>> settings for devices assuming they are directly connected.
>>
>> Currently we have a bunch of bindings that are documenting the allowed
>> flexibility - including cases where only particular combinations of these
>> settings are allowed.
>>
>> So we could either:
>> 1) Note that we've been doing it wrong and the binding should not enforce
>> these constraints so remove them.
>
> I'd lean towards this.
>
>> 2) Add explicit spi-cpol: false statements etc the drivers where they
>> are not allowed.
>
> 3) Drop spi-cpol / spi-cpha from spi-peripheral-props.yaml. It's purpose
> is to collect all possible SPI controller properties that are per child
> node. Whereas we've said spi-cpol / spi-cpha are device specific
> properties.
Thanks Rob and Jonathan. I can go with (3).
Best regards,
Krzysztof
Powered by blists - more mailing lists