summaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-11-01 15:55:10 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-11-01 15:55:10 +0100
commit73b5301b02c8d3456a5ea64c9ed9802a4a376af6 (patch)
tree4e7b29e38659e6dedf0946a6f895ce2fbda4619b /drivers/spi
parentMerge branch 'spi-tegra' into spi-next (diff)
parentspi: spidev: Add Rohm DH2228FV DAC compatible string (diff)
downloadlinux-73b5301b02c8d3456a5ea64c9ed9802a4a376af6.tar.xz
linux-73b5301b02c8d3456a5ea64c9ed9802a4a376af6.zip
Merge branch 'spi-spidev' into spi-next
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spidev.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
index 830adbed1d7a..e44abc96cd05 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 = "rohm,dh2228fv" },
+ {},
+};
+
+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),