From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Michal Suchanek <hramrach@gmail.com>
Cc: Martin Sperl <kernel@martin.sperl.org>,
Hans de Goede <hdegoede@redhat.com>,
Mark Brown <broonie@kernel.org>,
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: Sun, 26 Apr 2015 14:51:13 +0200 [thread overview]
Message-ID: <20150426125113.GF5627@lukather> (raw)
In-Reply-To: <CAOMqctR8MZ_r6HHEBWhgxpUsTaV=M7DfmnJ_VxTqjWu4KMBSwA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2939 bytes --]
On Sun, Apr 26, 2015 at 02:38:18PM +0200, Michal Suchanek wrote:
> On 26 April 2015 at 13:56, Martin Sperl <kernel@martin.sperl.org> wrote:
> >
> >> On 26.04.2015, at 13:23, Hans de Goede <hdegoede@redhat.com> wrote:
> >> I think there is actual a use for just binding spidev as spidev,
> >> think e.g. the spi pins on the raspberry pi.
> >>
> >> How do you deal we suggest with such a situation ?
> >
> > I actually asked the same question a few days ago on the spi list
> > (in thread: "spi: spidev: Warn loudly if instantiated from DT as “spidev”)
> > and the summary was:
> >
> > You can still do as before, but you have to accept that long
> > irritating warning.
> >
> > Or you patch spidev.c to include your pattern of choice for compatiblity
>
> So the suggestion is to add a compatible string like olimex,uext-slot
> to spidev and use that compatible in the DT?
No, you add a compatible for the device that is connected to the bus
through that slot.
> That can certainly be done but adding a new compatible for every board
> that has some random pins looks like a needless nuisance to me.
> Especially compared to i2c where you can just open the bus so long as
> ti is enabled.
>
> >
> > Or you implement the following proposal (which needs a volunteer):
> >> On 23.04.2015, at 09:42, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> >>
> >> So what you need is a way to handover from generic spidev to a device-specific
> >> driver, cfr. what graphics drivers do when the device has been bound to by
> >> vesafb or simplefb.
> >>
> >> Could this be implemented in a generic way in the spi or DT code?
> >
> > ...
> >> On 23.04.2015, at 12:36, Mark Brown <broonie@kernel.org> wrote:
> >> On Thu, Apr 23, 2015 at 09:45:16AM +0200, Geert Uytterhoeven wrote:
> >>
> >>> I guess this has been suggested before: the spi core could provide spidev
> >>> access to all spi client devices which are not bound by a driver?
> >>
> >> I don't know if it's been suggested before, certainly nobody did the
> >> work to make it happen. I don't think I have a massive objection in
> >> principal.
Actually, I did it a year ago, and it looked at the time that it
wasn't what should be done either.
https://lkml.org/lkml/2014/4/28/612
> But how do you know there is a device?
>
> Devices on i2c can be probed. On spi you just transfer random data and
> hope it does something useful. Some devices have readable registers
> and can be probed in a device-specific way but others are write-only.
Well, what's the point of communicating with a non-existent device in
the first place?
> So binding spidev is in my view just saying that you are going to
> transfer random data from userspace on this bus.
Yes, to a device connected on that bus.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-04-26 12:55 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 [this message]
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
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=20150426125113.GF5627@lukather \
--to=maxime.ripard@free-electrons.com \
--cc=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 \
/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