9
0
Fork 0

mtd: dataflash: Add devicetree probing support

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2013-05-18 13:00:23 +02:00
parent 56dd3c6c2a
commit 4cbec978bc
1 changed files with 11 additions and 0 deletions

View File

@ -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);