public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Martin Sperl <kernel@martin.sperl.org>
Cc: Hans de Goede <hdegoede@redhat.com>,
	Michal Suchanek <hramrach@gmail.com>,
	Maxime Ripard <maxime.ripard@free-electrons.com>,
	linux-sunxi <linux-sunxi@googlegroups.com>,
	Jonathan Corbet <corbet@lwn.net>,
	linux-spi <linux-spi@vger.kernel.org>,
	linux-doc <linux-doc@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [linux-sunxi] [PATCH 2/3] spidev: Add DT binding example.
Date: Mon, 27 Apr 2015 18:59:57 +0100	[thread overview]
Message-ID: <20150427175957.GV22845@sirena.org.uk> (raw)
In-Reply-To: <CD7C1C3B-80B5-4627-94A4-2B83AAEC1DDB@martin.sperl.org>

[-- Attachment #1: Type: text/plain, Size: 3932 bytes --]

On Mon, Apr 27, 2015 at 06:25:26PM +0200, Martin Sperl wrote:
> > On 27.04.2015, at 17:27, Mark Brown <broonie@kernel.org> wrote:

> > OK, so that is just a default overlay which is abusing the fact that we
> > will bind to spidev without a DT compatible and when the binding is
> > undocumented (which also applies to other devices and buses sadly).

> > Unfortunately nobody ever mentioned this upstream and the feedback
> > upstream that listing spidev in a DT is a bad idea has been ignored.

> Maybe it should also have been documented as such in
> Documentation/spi/spidev or in Documentation/devicetree/bindings/spi/

It was documented in the DT bindings in that there was no documented
binding; people are in general expected to know that anything they're
using should be documented.  For the main spidev document I guess it's
something similar, though if you can think of something there by all
means send a patch.

> > The whole reason we're doing this in the first place is that we got sick
> > of telling people that using spidev in DTs like this was a bad idea.

> The only reference I found in my history of the spi-list is this email:

It mostly comes up in review of DT files for boards so won't be on the
SPI list.

> > It does sound like the people maintianing the u-boot fork for the Pi
> > need to talk to both u-boot upstream (nothing here is specific to the
> > Pi that I can see) and the kernel community a bit more.  I'd be a bit
> > worried that they may be relying on other things that just happen to
> > work without being intentional (and are therefore more vulnerable to
> > issues) and it's a bit depressing to see things like this stuck in a
> > fork where only a limited community can make use of them.

> Actually this functionality is not in u-boot, but in the firmware
> boot-loader itself, which can load the kernel (and the devicetree)
> without u-boot, but which can also load u-boot as an additional
> intermediate boot-stage.

Ugh, right.  The thing about talking to the kernel community does still
stand though.

> >> The only thing that could possibly be better would be that
> >> the user would define the "real" name of the device in the
> >> device tree and spidev would bind to it if there is no driver
> >> available (but that would require this "fallback" binding by
> >> spidev in case of no driver).

> > Yes, that is exactly the solution I'd suggest - change the UI to provide
> > a DT compatible to be used for the new device.  That would also have the
> > benefit of meaning that users who have connected some device that does
> > have a driver that works with a simple binding wouldn't need to write an
> > overlay which seems like it should be useful.

> Well then why did you just make the system complain loudly and bringing
> problems to people instead of solving it in a usable manner that does not
> require people to maintain an out of tree patch to work around that warning?

This is quite honestly the first time I've heard of this bootloader
interface that's been implemented for the Pi.  All the other users I've
been aware of have been writing DT files or overlays in tree and
therefore it's not a substantial effort (and indeed the misuse is
basically just people being lazy) - if you can use the shipped binaries
it's a very different tradeoff.

> We still have the one-line warning about using the depreciated 
> spi_master.transfer interface, but it is not such loud warning as this one.

Right, that is a purely in kernel interface visible only to people
directly working on implementing SPI controller drivers that isn't
especially open to misuse and therefore both less serious and more
likely to be noticed.

> I guess the time spent discussing this could have been better spent
> implementing that solution instead.

> All we need is a volunteer to get that implemented.

Yes.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2015-04-27 18:00 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1430034797.git.hramrach@gmail.com>
     [not found] ` <f6e34cb3f0b72fcb0ae18ccf96962fb8a1c477f7.1430034797.git.hramrach@gmail.com>
2015-04-26  8:39   ` [PATCH 1/3] ARM: dts: sunxi: A10s Olinuxino add missing SPI and simplefb Maxime Ripard
2015-04-26  9:21     ` Michal Suchanek
2015-04-26 12:52       ` Maxime Ripard
     [not found] ` <4c27d44b2bdd759424ce4a4b2e8f6abf5d5a6735.1430034797.git.hramrach@gmail.com>
2015-04-26  8:42   ` [PATCH 3/3] ARM: sunxi: spi: use proper errno when message is too long Maxime Ripard
2015-04-26 11:42     ` Michal Suchanek
2015-04-26 12:54       ` Maxime Ripard
     [not found] ` <bb069283a5c2ccfbc05177f1ed41cabb1485796e.1430034797.git.hramrach@gmail.com>
2015-04-26 10:32   ` [PATCH 2/3] spidev: Add DT binding example Mark Brown
2015-04-26 10:54     ` Michal Suchanek
2015-04-26 11:01       ` Mark Brown
2015-04-26 11:23         ` [linux-sunxi] " Hans de Goede
2015-04-26 11:56           ` [linux-sunxi] " Martin Sperl
2015-04-26 12:38             ` Michal Suchanek
2015-04-26 12:51               ` Maxime Ripard
2015-04-26 14:14                 ` Michal Suchanek
2015-04-26 14:33                   ` Maxime Ripard
2015-04-26 14:40                     ` Hans de Goede
2015-04-26 15:47                       ` Maxime Ripard
2015-04-27  6:51                         ` Michal Suchanek
2015-04-27 10:05                           ` Maxime Ripard
2015-04-27 10:10                       ` Mark Brown
2015-04-27 14:28                         ` Michal Suchanek
2015-04-27 15:13                           ` Geert Uytterhoeven
2015-04-27 15:44                             ` Michal Suchanek
2015-04-26 15:33                     ` Michal Suchanek
2015-04-26 15:54                       ` Maxime Ripard
2015-04-26 18:53                         ` Michal Suchanek
2015-04-27 10:04                           ` Maxime Ripard
2015-04-27 11:18                             ` Michal Suchanek
2015-04-27 10:46                           ` Mark Brown
2015-04-27  9:36                   ` Mark Brown
2015-04-27  9:39                     ` Michal Suchanek
2015-04-27 10:59                       ` Mark Brown
2015-04-27 10:04                     ` Hans de Goede
2015-04-27 10:09                       ` Hans de Goede
2015-04-27 11:25                       ` Mark Brown
2015-04-27 14:14                         ` Martin Sperl
2015-04-27 15:27                           ` Mark Brown
2015-04-27 16:25                             ` Martin Sperl
2015-04-27 17:59                               ` Mark Brown [this message]
2015-04-27 10:16                 ` Mark Brown
2015-04-27 17:30                   ` Maxime Ripard
2015-04-27 18:07                     ` Mark Brown
     [not found]                       ` <cd282abf-898a-4f01-90a6-8bf2db160b8e@googlegroups.com>
2015-04-28 12:52                         ` Michal Suchanek
     [not found]                           ` <28a25eda-bba0-4a2e-9890-b3d3bef7ac7e@googlegroups.com>
2015-04-28 14:11                             ` Michal Suchanek
2015-04-28 14:12                             ` Maxime Ripard
2015-04-28 14:35                               ` Michal Suchanek
2015-04-28 14:16                           ` Mark Brown
2015-04-28 14:22                             ` Michal Suchanek
2015-04-28 17:17                               ` Mark Brown
2015-04-28 20:43                                 ` Michal Suchanek
2015-04-29 17:40                                   ` Mark Brown
2015-04-29 17:44                                     ` Michal Suchanek
2015-04-29 18:06                                       ` Mark Brown
2015-04-29 18:37                                         ` Michal Suchanek
2015-04-29 18:56                                           ` Geert Uytterhoeven
2015-04-29 19:24                                             ` Michal Suchanek
2015-04-30 19:58                                           ` Mark Brown
2015-05-03  9:01                                             ` Martin Sperl
2015-05-03  9:59                                               ` Mark Brown
2015-05-03 21:00                                                 ` Martin Sperl
2015-05-04  8:36                                                   ` Michal Suchanek
2015-05-04 10:12                                                   ` Mark Brown
2015-05-04 10:42                                                     ` Michal Suchanek
2015-05-04 13:17                                                       ` Mark Brown
2015-05-03 10:02                                               ` Geert Uytterhoeven
2015-05-12 14:27                       ` Maxime Ripard
2015-05-12 14:52                         ` Michal Suchanek
2015-05-12 16:06                         ` Mark Brown
2015-04-26 11:26         ` Michal Suchanek

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=20150427175957.GV22845@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=corbet@lwn.net \
    --cc=hdegoede@redhat.com \
    --cc=hramrach@gmail.com \
    --cc=kernel@martin.sperl.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=maxime.ripard@free-electrons.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