From 4cbec978bcc23c8c67eea713abdc2d132a9cd3dd Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Sat, 18 May 2013 13:00:23 +0200 Subject: [PATCH] mtd: dataflash: Add devicetree probing support Signed-off-by: Sascha Hauer --- 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 ddab6bbb7..52bd84266 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);