From: Grant Likely <grant.likely@secretlab.ca>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Rob Herring <rob.herring@calxeda.com>,
devicetree-discuss@lists.ozlabs.org,
spi-devel-general@lists.sourceforge.net,
linux-kernel@vger.kernel.org,
Lars-Peter Clausen <lars@metafoo.de>
Subject: Re: [PATCH resend] spi: Add support for specifying 3-wire mode via device tree
Date: Fri, 07 Dec 2012 13:14:05 +0000 [thread overview]
Message-ID: <20121207131405.EBFDE3E0B87@localhost> (raw)
In-Reply-To: <1354809333-18364-1-git-send-email-lars@metafoo.de>
On Thu, 6 Dec 2012 16:55:33 +0100, Lars-Peter Clausen <lars@metafoo.de> wrote:
> This patch allows to specify that a SPI device is connected in 3-wire mode via
> device tree.
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> Acked-by: Rob Herring <rob.herring@calxeda.com>
Applied, thanks.
g.
> ---
> Documentation/devicetree/bindings/spi/spi-bus.txt | 2 ++
> drivers/spi/spi.c | 2 ++
> 2 files changed, 4 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/spi/spi-bus.txt b/Documentation/devicetree/bindings/spi/spi-bus.txt
> index 77a8b0d..296015e 100644
> --- a/Documentation/devicetree/bindings/spi/spi-bus.txt
> +++ b/Documentation/devicetree/bindings/spi/spi-bus.txt
> @@ -53,6 +53,8 @@ contain the following properties.
> shifted clock phase (CPHA) mode
> - spi-cs-high - (optional) Empty property indicating device requires
> chip select active high
> +- spi-3wire - (optional) Empty property indicating device requires
> + 3-wire mode.
>
> If a gpio chipselect is used for the SPI slave the gpio number will be passed
> via the cs_gpio
> diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
> index 22c71e2..cb61ada 100644
> --- a/drivers/spi/spi.c
> +++ b/drivers/spi/spi.c
> @@ -861,6 +861,8 @@ static void of_register_spi_devices(struct spi_master *master)
> spi->mode |= SPI_CPOL;
> if (of_find_property(nc, "spi-cs-high", NULL))
> spi->mode |= SPI_CS_HIGH;
> + if (of_find_property(nc, "spi-3wire", NULL))
> + spi->mode |= SPI_3WIRE;
>
> /* Device speed */
> prop = of_get_property(nc, "spi-max-frequency", &len);
> --
> 1.8.0
>
--
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies, Ltd.
prev parent reply other threads:[~2012-12-07 13:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-06 15:55 [PATCH resend] spi: Add support for specifying 3-wire mode via device tree Lars-Peter Clausen
2012-12-07 13:14 ` Grant Likely [this message]
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=20121207131405.EBFDE3E0B87@localhost \
--to=grant.likely@secretlab.ca \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=lars@metafoo.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rob.herring@calxeda.com \
--cc=spi-devel-general@lists.sourceforge.net \
/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).