From: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
To: Fabien Lahoudere
<fabien.lahoudere-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
Cc: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"open list:SPI SUBSYSTEM"
<linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
open list <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 1/1] generic spidev devices must be registered
Date: Fri, 5 Aug 2016 14:43:43 +0100 [thread overview]
Message-ID: <20160805134342.GD25152@leverpostej> (raw)
In-Reply-To: <1470402714-10798-1-git-send-email-fabien.lahoudere-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
On Fri, Aug 05, 2016 at 03:11:53PM +0200, Fabien Lahoudere wrote:
> Adding spidev in the compatible list, let configure spidev from device tree
> instead of C source code.
I'm not keen on this.
It ties the hardware description to today's use-case, and leaves the DT
without information regarding the particuarl device. The binding is also
written in terms of the userspace interface, which is backwards.
So NAK to this as-is.
Thanks,
Mark.
>
> Signed-off-by: Fabien Lahoudere <fabien.lahoudere-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
> ---
> Documentation/devicetree/bindings/spi/spidev.txt | 16 ++++++++++++++++
> drivers/spi/spidev.c | 1 +
> 2 files changed, 17 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/spi/spidev.txt
>
> diff --git a/Documentation/devicetree/bindings/spi/spidev.txt b/Documentation/devicetree/bindings/spi/spidev.txt
> new file mode 100644
> index 0000000..23200f2
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/spi/spidev.txt
> @@ -0,0 +1,16 @@
> +* SPIDEV
> +
> +spidev is a device driver to access to SPI devices using normal userspace I/O calls.
> +To make an SPI device compatible with this drivers add:
> +
> +Required properties:
> +- compatible : should be "spidev".
> +
> +Example:
> +
> +spidev0: spi@0 {
> + compatible = "spidev";
> + reg = <0>;
> + spi-max-frequency = <1000000>;
> + status = "okay";
> +};
> diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
> index 2e05046..d780491 100644
> --- a/drivers/spi/spidev.c
> +++ b/drivers/spi/spidev.c
> @@ -696,6 +696,7 @@ static struct class *spidev_class;
> static const struct of_device_id spidev_dt_ids[] = {
> { .compatible = "rohm,dh2228fv" },
> { .compatible = "lineartechnology,ltc2488" },
> + { .compatible = "spidev" },
> {},
> };
> MODULE_DEVICE_TABLE(of, spidev_dt_ids);
> --
> 2.7.4
>
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-08-05 13:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-05 13:11 [PATCH 1/1] generic spidev devices must be registered Fabien Lahoudere
[not found] ` <1470402714-10798-1-git-send-email-fabien.lahoudere-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
2016-08-05 13:43 ` Mark Rutland [this message]
2016-08-05 14:21 ` Mark Brown
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=20160805134342.GD25152@leverpostej \
--to=mark.rutland-5wv7dgnigg8@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=fabien.lahoudere-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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).