All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Jonathan Cameron <jic23@kernel.org>
Cc: "Krzysztof Kozlowski" <krzysztof.kozlowski@linaro.org>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Alexandru Tachici" <alexandru.tachici@analog.com>,
	"Marcelo Schmitt" <marcelo.schmitt1@gmail.com>,
	"Marcus Folkesson" <marcus.folkesson@gmail.com>,
	"Kent Gustavsson" <kent@minoris.se>,
	"Tomislav Denis" <tomislav.denis@avl.com>,
	"Stefan Popa" <stefan.popa@analog.com>,
	"Beniamin Bia" <beniamin.bia@analog.com>,
	"Patrick Vasseur" <patrick.vasseur@c-s.fr>,
	"Vladimir Barinov" <vladimir.barinov@cogentembedded.com>,
	"Miquel Raynal" <miquel.raynal@bootlin.com>,
	"Philippe Reynes" <tremyfr@yahoo.fr>,
	"Jacopo Mondi" <jacopo@jmondi.org>,
	"Akinobu Mita" <akinobu.mita@gmail.com>,
	"Alexandru Lazar" <alazar@startmail.com>,
	"Oskar Andero" <oskar.andero@gmail.com>,
	"Mårten Lindahl" <martenli@axis.com>,
	"Bogdan Pricop" <bogdan.pricop@emutex.com>,
	"Angelo Compagnucci" <angelo.compagnucci@gmail.com>,
	"Dan Murphy" <dmurphy@ti.com>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org,
	linux-spi@vger.kernel.org, "Mark Brown" <broonie@kernel.org>
Subject: Re: [RFC PATCH] dt-bindings: iio: adc: use spi-peripheral-props.yaml
Date: Mon, 18 Jul 2022 16:00:12 -0600	[thread overview]
Message-ID: <20220718220012.GA3625497-robh@kernel.org> (raw)
In-Reply-To: <20220716192604.21a1d835@jic23-huawei>

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@linaro.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@linaro.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.

Rob

  reply	other threads:[~2022-07-18 22:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-15  9:53 [RFC PATCH] dt-bindings: iio: adc: use spi-peripheral-props.yaml Krzysztof Kozlowski
2022-07-16 18:26 ` Jonathan Cameron
2022-07-18 22:00   ` Rob Herring [this message]
2022-07-21  9:38     ` Krzysztof Kozlowski

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=20220718220012.GA3625497-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=akinobu.mita@gmail.com \
    --cc=alazar@startmail.com \
    --cc=alexandru.tachici@analog.com \
    --cc=angelo.compagnucci@gmail.com \
    --cc=beniamin.bia@analog.com \
    --cc=bogdan.pricop@emutex.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmurphy@ti.com \
    --cc=jacopo@jmondi.org \
    --cc=jic23@kernel.org \
    --cc=kent@minoris.se \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=lars@metafoo.de \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=marcelo.schmitt1@gmail.com \
    --cc=marcus.folkesson@gmail.com \
    --cc=martenli@axis.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=oskar.andero@gmail.com \
    --cc=patrick.vasseur@c-s.fr \
    --cc=stefan.popa@analog.com \
    --cc=tomislav.denis@avl.com \
    --cc=tremyfr@yahoo.fr \
    --cc=vladimir.barinov@cogentembedded.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.