From: Stephen Warren <swarren@nvidia.com>
To: Grant Likely <grant.likely@secretlab.ca>,
"spi-devel-general@lists.sourceforge.net"
<spi-devel-general@lists.sourceforge.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Erik Gilling <konkers@android.com>
Subject: RE: [PATCH] spi/tegra: add devicetree support
Date: Wed, 15 Jun 2011 12:25:49 -0700 [thread overview]
Message-ID: <74CDBE0F657A3D45AFBB94109FB122FF04992C060C@HQMAIL01.nvidia.com> (raw)
In-Reply-To: <20110615190754.11693.26335.stgit@ponder>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2418 bytes --]
Grant Likely wrote at Wednesday, June 15, 2011 1:08 PM:
> Allow the tegra spi driver to obtain populate the spi bus with devices
Remote "obtain"?
> from the device tree.
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
> .../devicetree/bindings/spi/spi_nvidia.txt | 5 +++++
> drivers/spi/spi-tegra.c | 12 ++++++++++++
> 2 files changed, 17 insertions(+), 0 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/spi/spi_nvidia.txt
>
> diff --git a/Documentation/devicetree/bindings/spi/spi_nvidia.txt b/Documentation/devicetree/bindings/spi/spi_nvidia.txt
> new file mode 100644
> index 0000000..bde450b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/spi/spi_nvidia.txt
> @@ -0,0 +1,5 @@
> +NVIDIA Tegra 2 SPI device
> +
> +Required properties:
> +- compatible : should be "nvidia,tegra250-spi".
> +- gpios : should specify GPIOs used for chipselect.
Are things like reg, interrupts, and other general stuff implicit?
I notice that fsl-spi.txt does specify those, but spi_altera.txt
and spi_oc_tiny.txt don't.
Otherwise, LGTM.
> diff --git a/drivers/spi/spi-tegra.c b/drivers/spi/spi-tegra.c
> index 8e30727..a43ceeb 100644
> --- a/drivers/spi/spi-tegra.c
> +++ b/drivers/spi/spi-tegra.c
> @@ -546,6 +546,7 @@ static int __init spi_tegra_probe(struct
> platform_device *pdev)
> tspi->rx_dma_req.req_sel = spi_tegra_req_sels[pdev->id];
> tspi->rx_dma_req.dev = tspi;
>
> + master->dev.of_node = pdev->dev.of_node;
> ret = spi_register_master(master);
>
> if (ret < 0)
> @@ -595,10 +596,21 @@ static int __devexit spi_tegra_remove(struct
> platform_device *pdev)
>
> MODULE_ALIAS("platform:spi_tegra");
>
> +#ifdef CONFIG_OF
> +static struct of_device_id spi_tegra_of_match_table[] __devinitdata = {
> + { .compatible = "nvidia,tegra250-spi", },
> + {}
> +};
> +MODULE_DEVICE_TABLE(of, spi_tegra_of_match_table);
> +#else /* CONFIG_OF */
> +#define spi_tegra_of_match_table NULL
> +#endif /* CONFIG_OF */
> +
> static struct platform_driver spi_tegra_driver = {
> .driver = {
> .name = "spi_tegra",
> .owner = THIS_MODULE,
> + .of_match_table = spi_tegra_of_match_table,
> },
> .remove = __devexit_p(spi_tegra_remove),
> };
--
nvpublic
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
next prev parent reply other threads:[~2011-06-15 19:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-15 19:07 Grant Likely
2011-06-15 19:08 ` Grant Likely
2011-06-15 19:25 ` Stephen Warren [this message]
2011-06-15 19:29 ` Grant Likely
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=74CDBE0F657A3D45AFBB94109FB122FF04992C060C@HQMAIL01.nvidia.com \
--to=swarren@nvidia.com \
--cc=grant.likely@secretlab.ca \
--cc=konkers@android.com \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®