mtd: dataflash: Add devicetree probing support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
56dd3c6c2a
commit
4cbec978bc
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue