Linux-IIO Archive on
 help / color / Atom feed
From: Jonathan Cameron <>
To: Mark Brown <>
Cc: Jonathan Cameron <>,
	"Ardelean, Alexandru" <>,
	"" <>,
	"Popa, Stefan Serban" <>,
	"" <>,
	"" <>,
	"" <>,
	"" <>,
	"" <>,
	"" <>,
	"" <>,
	"Hennerich, Michael" <>,
	"" <>,
	"" <>
Subject: Re: [PATCH v4] dt-bindings: iio: accel: add binding documentation for ADIS16240
Date: Tue, 3 Dec 2019 16:51:54 +0000
Message-ID: <> (raw)
In-Reply-To: <>

On Tue, 3 Dec 2019 16:38:50 +0000
Mark Brown <> wrote:

> On Sun, Dec 01, 2019 at 11:40:32AM +0000, Jonathan Cameron wrote:
> > +CC Mark as we probably need a more general view point on
> > the question of whether SPI mode should be enforced by binding
> > or in the driver.  
> Not sure I see the question here, I think I was missing a bit of
> the conversation?  It's perfectly fine for a driver to specify a
> mode, if the hardware always uses some unusual mode then there's
> no sense in forcing every single DT to set the same mode.  On the
> other hand if there's some configuration for the driver that was
> handling some board specific configuration that there's already
> some generic SPI support for setting then it seems odd to have a
> custom driver specific configuration mechanism.

If the driver picks a mode because that's what it says on the datasheet
it prevents odd board configurations from working.  The question
becomes whether it makes sense in general to assume those odd board
conditions don't exist until we actually have one, or to assume that
they might and push the burden on to all DT files.

Traditionally in IIO at least we've mostly taken the view the DT
should be right and complete and had bindings state what normal
parameters must be for it to work (assuming no inverters etc)

If we encode it in the driver, and we later meet such a board we
end up with a custom dance to query the DT parameters again and
only override if present.

We can't rely on the core SPI handling because I don't think
there is any means of specifying a default.

We can adopt the view that in general these weird boards with inverters
are weird and just handle them when they occur.  Sounds like that is your
preference, at least for new parts.

For old ones we have no idea if there are boards out there using
them with inverters so easiest is probably to just carry on putting them
in the DT bindings.


  reply index

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-23  5:19 Rodrigo Carvalho
2019-11-23 11:41 ` Jonathan Cameron
2019-11-25  7:51   ` Ardelean, Alexandru
2019-12-01 11:40     ` Jonathan Cameron
2019-12-03 16:38       ` Mark Brown
2019-12-03 16:51         ` Jonathan Cameron [this message]
2019-12-04  7:18           ` Ardelean, Alexandru
2019-12-04 17:00             ` Mark Brown
2019-12-05  8:19               ` Ardelean, Alexandru
2019-12-04 11:12           ` Mark Brown

Reply instructions:

You may reply publically 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-IIO Archive on

Archives are clonable:
	git clone --mirror linux-iio/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-iio linux-iio/ \
	public-inbox-index linux-iio

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone