* [PATCHv2 0/3] Add spidev to the CFA-10049
@ 2012-10-31 10:30 Maxime Ripard
2012-10-31 10:30 ` [PATCH 1/3] spi: spidev: Add device tree bindings Maxime Ripard
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Maxime Ripard @ 2012-10-31 10:30 UTC (permalink / raw)
To: linux-arm-kernel
Hi everyone,
This patchset probes spidev on the SSP3 bus where on the CFA-10049 there is
a Rohm DH2228FV DAC.
It first adds the dt bindings for the spidev driver, and the proper node in
the CFA-10049 device tree file.
Maxime
Changes from v1:
- Removed the linux,spidev compatible string and use the compatible strings
of the devices instead.
Maxime Ripard (3):
spi: spidev: Add device tree bindings
spi: spidev: Add Rohm DH2228FV DAC compatible string
ARM: dts: cfa10049: Add the DH2228FV DAC to the DTS
arch/arm/boot/dts/imx28-cfa10049.dts | 6 ++++++
drivers/spi/spidev.c | 10 ++++++++++
2 files changed, 16 insertions(+)
--
1.7.9.5
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] spi: spidev: Add device tree bindings
2012-10-31 10:30 [PATCHv2 0/3] Add spidev to the CFA-10049 Maxime Ripard
@ 2012-10-31 10:30 ` Maxime Ripard
2012-11-01 14:55 ` Mark Brown
2012-10-31 10:30 ` [PATCH 2/3] spi: spidev: Add Rohm DH2228FV DAC compatible string Maxime Ripard
2012-10-31 10:30 ` [PATCH 3/3] ARM: dts: cfa10049: Add the DH2228FV DAC to the DTS Maxime Ripard
2 siblings, 1 reply; 7+ messages in thread
From: Maxime Ripard @ 2012-10-31 10:30 UTC (permalink / raw)
To: linux-arm-kernel
This will allow to probe spidev from device tree by adding the
compatible string of each device to this array.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
drivers/spi/spidev.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
index 830adbe..9fc5788 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,17 @@ static int __devexit spidev_remove(struct spi_device *spi)
return 0;
}
+static const struct of_device_id spidev_dt_ids[] = {
+ {},
+};
+
+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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] spi: spidev: Add Rohm DH2228FV DAC compatible string
2012-10-31 10:30 [PATCHv2 0/3] Add spidev to the CFA-10049 Maxime Ripard
2012-10-31 10:30 ` [PATCH 1/3] spi: spidev: Add device tree bindings Maxime Ripard
@ 2012-10-31 10:30 ` Maxime Ripard
2012-11-01 14:56 ` Mark Brown
2012-10-31 10:30 ` [PATCH 3/3] ARM: dts: cfa10049: Add the DH2228FV DAC to the DTS Maxime Ripard
2 siblings, 1 reply; 7+ messages in thread
From: Maxime Ripard @ 2012-10-31 10:30 UTC (permalink / raw)
To: linux-arm-kernel
Since we don't have a driver for it yet, use spidev instead.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
drivers/spi/spidev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
index 9fc5788..e44abc9 100644
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
@@ -645,6 +645,7 @@ static int __devexit spidev_remove(struct spi_device *spi)
}
static const struct of_device_id spidev_dt_ids[] = {
+ { .compatible = "rohm,dh2228fv" },
{},
};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] ARM: dts: cfa10049: Add the DH2228FV DAC to the DTS
2012-10-31 10:30 [PATCHv2 0/3] Add spidev to the CFA-10049 Maxime Ripard
2012-10-31 10:30 ` [PATCH 1/3] spi: spidev: Add device tree bindings Maxime Ripard
2012-10-31 10:30 ` [PATCH 2/3] spi: spidev: Add Rohm DH2228FV DAC compatible string Maxime Ripard
@ 2012-10-31 10:30 ` Maxime Ripard
2012-11-02 1:56 ` Shawn Guo
2 siblings, 1 reply; 7+ messages in thread
From: Maxime Ripard @ 2012-10-31 10:30 UTC (permalink / raw)
To: linux-arm-kernel
There is no driver for it yet, so it will use spidev.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
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..2ef7ce6 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>;
};
+ dac0: dh2228 at 2 {
+ compatible = "rohm,dh2228fv";
+ reg = <2>;
+ spi-max-frequency = <100000>;
+ };
};
};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-11-02 1:56 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-31 10:30 [PATCHv2 0/3] Add spidev to the CFA-10049 Maxime Ripard
2012-10-31 10:30 ` [PATCH 1/3] spi: spidev: Add device tree bindings Maxime Ripard
2012-11-01 14:55 ` Mark Brown
2012-10-31 10:30 ` [PATCH 2/3] spi: spidev: Add Rohm DH2228FV DAC compatible string Maxime Ripard
2012-11-01 14:56 ` Mark Brown
2012-10-31 10:30 ` [PATCH 3/3] ARM: dts: cfa10049: Add the DH2228FV DAC to the DTS Maxime Ripard
2012-11-02 1:56 ` Shawn Guo
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).