[PATCH 3/5] mtd: dataflash: Add devicetree probing support
Sascha Hauer
s.hauer at pengutronix.de
Tue May 21 03:38:13 EDT 2013
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
drivers/mtd/devices/mtd_dataflash.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
index ddab6bb..52bd842 100644
--- a/drivers/mtd/devices/mtd_dataflash.c
+++ b/drivers/mtd/devices/mtd_dataflash.c
@@ -871,9 +871,20 @@ static int dataflash_probe(struct device_d *dev)
return status;
}
+static __maybe_unused struct of_device_id dataflash_dt_ids[] = {
+ {
+ .compatible = "atmel,at45",
+ }, {
+ .compatible = "atmel,dataflash",
+ }, {
+ /* sentinel */
+ }
+};
+
static struct driver_d dataflash_driver = {
.name = "mtd_dataflash",
.probe = dataflash_probe,
+ .of_compatible = DRV_OF_COMPAT(dataflash_dt_ids),
};
device_spi_driver(dataflash_driver);
--
1.8.2.rc2
More information about the barebox
mailing list