From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] SPI: spidev: Add DT compatible string for spidev driver.
Date: Fri, 12 Apr 2013 15:30:57 +0200 [thread overview]
Message-ID: <51680C91.6030005@free-electrons.com> (raw)
In-Reply-To: <20130412125621.9645.78102.stgit@localhost>
Hi Martin,
Le 12/04/2013 14:56, Martin Fuzzey a ?crit :
> The spidev driver is useful to allow userspace access
> to SPI devices that have no kernel SPI driver.
>
> However DT requires a compatible tree to allow the driver
> to be probed.
>
> To avoid having to modify the driver for every extra device
> add a generic "linux,spidev" compatible string that may be
> used in the DT to match such devices.
I submitted a similar patch quite some time ago [1], and at the time,
this patch was found inadequate, and we decided to add the compatible of
the particular device that we drive through spidev.
The rationale behind that is that the device tree is a hardware
description, so it's only interested about which device there is on the
SPI bus, and not the driver that will eventually handle it. That allows
both to have a meaningful devicetree, but also to easily handle the case
where a driver for that particular device is finally implemented, since
we won't have to change the device tree in itself to reflect this.
So I suggest you only add to the "real" compatible string instead of a
generic one.
Maxime
[1] http://comments.gmane.org/gmane.linux.kernel.spi.devel/11734
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2013-04-12 13:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-12 12:56 [PATCH] SPI: spidev: Add DT compatible string for spidev driver Martin Fuzzey
2013-04-12 13:30 ` Maxime Ripard [this message]
2013-04-12 14:16 ` Martin Fuzzey
2013-04-12 17:28 ` Lars-Peter Clausen
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=51680C91.6030005@free-electrons.com \
--to=maxime.ripard@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).