[PATCH 0/2] Add spidev to the CFA-10049

STALE5056d

3 messages, 1 author, 2012-09-28 · open the first message on its own page

[PATCH 0/2] Add spidev to the CFA-10049

From: Maxime Ripard <hidden>
Date: 2012-09-28 12:50:14

Hi everyone,

This patchset probes spidev on the SSP3 bus where on the CFA-10049 there is
a DAC.

It first adds the dt bindings for the spidev driver, and the proper node in
the CFA-10049 device tree file.

Maxime

Maxime Ripard (2):
  spi: spidev: Add device tree bindings
  ARM: dts: cfa10049: Add spidev to drive the DAC on SSP3

 arch/arm/boot/dts/imx28-cfa10049.dts |    6 ++++++
 drivers/spi/spidev.c                 |   10 ++++++++++
 2 files changed, 16 insertions(+)

-- 
1.7.9.5

[PATCH 1/2] spi: spidev: Add device tree bindings

From: Maxime Ripard <hidden>
Date: 2012-09-28 12:50:15

This will allow to probe spidev from device tree

Signed-off-by: Maxime Ripard <redacted>
---
 drivers/spi/spidev.c |   10 ++++++++++
 1 file changed, 10 insertions(+)
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
index 830adbe..8ae0660 100644
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
@@ -31,6 +31,8 @@
 #include <linux/mutex.h>
 #include <linux/slab.h>
 #include <linux/compat.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
 
 #include <linux/spi/spi.h>
 #include <linux/spi/spidev.h>
@@ -642,10 +644,18 @@ static int __devexit spidev_remove(struct spi_device *spi)
 	return 0;
 }
 
+static const struct of_device_id spidev_dt_ids[] = {
+	{ .compatible = "linux,spidev" },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, spidev_dt_ids);
+
 static struct spi_driver spidev_spi_driver = {
 	.driver = {
 		.name =		"spidev",
 		.owner =	THIS_MODULE,
+		.of_match_table = of_match_ptr(spidev_dt_ids),
 	},
 	.probe =	spidev_probe,
 	.remove =	__devexit_p(spidev_remove),
-- 
1.7.9.5

[PATCH 2/2] ARM: dts: cfa10049: Add spidev to drive the DAC on SSP3

From: Maxime Ripard <hidden>
Date: 2012-09-28 12:50:16

Signed-off-by: Maxime Ripard <redacted>
---
 arch/arm/boot/dts/imx28-cfa10049.dts |    6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/arch/arm/boot/dts/imx28-cfa10049.dts b/arch/arm/boot/dts/imx28-cfa10049.dts
index 05c892e..d91d16c 100644
--- a/arch/arm/boot/dts/imx28-cfa10049.dts
+++ b/arch/arm/boot/dts/imx28-cfa10049.dts
@@ -29,6 +29,7 @@
 						0x01c1 /* MX28_PAD_GPMI_RESETN__SSP3_CMD */
 						0x0111 /* MX28_PAD_GPMI_CE1N__SSP3_D3 */
 						0x01a2 /* MX28_PAD_GPMI_ALE__SSP3_D4 */
+						0x01b2 /* MX28_PAD_GPMI_CLE__SSP3_D5 */
 					>;
 					fsl,drive-strength = <1>;
 					fsl,voltage = <1>;
@@ -60,6 +61,11 @@
 					spi-max-frequency = <100000>;
 				};
 
+				spidev: spidev at 2 {
+					compatible = "linux,spidev";
+					reg = <2>;
+					spi-max-frequency = <100000>;
+				};
 			};
 		};
 
-- 
1.7.9.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help