spi: Add OF binding support for SPI busses

Previous thread: spi: split up spi_new_device() to allow two stage registration. by Linux Kernel Mailing List on Monday, July 28, 2008 - 10:09 am. (1 message)

Next thread: powerpc: Removed duplicated include in stacktrace.c by Linux Kernel Mailing List on Monday, July 28, 2008 - 10:09 am. (1 message)
From: Linux Kernel Mailing List
Date: Monday, July 28, 2008 - 10:09 am

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=284b01...
Commit:     284b01897340974000bcc84de87a4e1becc8a83d
Parent:     dc87c98e8f635a718f1abb2c3e15fc77c0001651
Author:     Grant Likely <grant.likely@secretlab.ca>
AuthorDate: Fri May 16 11:37:09 2008 -0600
Committer:  Grant Likely <grant.likely@secretlab.ca>
CommitDate: Fri Jul 25 22:34:40 2008 -0400

    spi: Add OF binding support for SPI busses
    
    This patch adds support for populating an SPI bus based on data in the
    OF device tree.  This is useful for powerpc platforms which use the
    device tree instead of discrete code for describing platform layout.
    
    Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
 drivers/of/Kconfig     |    6 +++
 drivers/of/Makefile    |    1 +
 drivers/of/of_spi.c    |   93 ++++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/of_spi.h |   18 +++++++++
 4 files changed, 118 insertions(+), 0 deletions(-)

diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig
index 1d7ec31..f821dbc 100644
--- a/drivers/of/Kconfig
+++ b/drivers/of/Kconfig
@@ -13,3 +13,9 @@ config OF_I2C
 	depends on PPC_OF && I2C
 	help
 	  OpenFirmware I2C accessors
+
+config OF_SPI
+	def_tristate SPI
+	depends on OF && PPC_OF && SPI
+	help
+	  OpenFirmware SPI accessors
diff --git a/drivers/of/Makefile b/drivers/of/Makefile
index 548772e..4c3c6f8 100644
--- a/drivers/of/Makefile
+++ b/drivers/of/Makefile
@@ -2,3 +2,4 @@ obj-y = base.o
 obj-$(CONFIG_OF_DEVICE) += device.o platform.o
 obj-$(CONFIG_OF_GPIO)   += gpio.o
 obj-$(CONFIG_OF_I2C)	+= of_i2c.o
+obj-$(CONFIG_OF_SPI)	+= of_spi.o
diff --git a/drivers/of/of_spi.c b/drivers/of/of_spi.c
new file mode 100644
index 0000000..b01eec0
--- /dev/null
+++ b/drivers/of/of_spi.c
@@ -0,0 +1,93 @@
+/*
+ * SPI OF support routines
+ * Copyright (C) 2008 Secret Lab Technologies Ltd.
+ *
+ * Support routines for deriving SPI device attachments from the ...
Previous thread: spi: split up spi_new_device() to allow two stage registration. by Linux Kernel Mailing List on Monday, July 28, 2008 - 10:09 am. (1 message)

Next thread: powerpc: Removed duplicated include in stacktrace.c by Linux Kernel Mailing List on Monday, July 28, 2008 - 10:09 am. (1 message)