summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices/m25p80.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-05-27 12:53:12 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-05-31 08:33:37 +0200
commitb5a0a65cb5241cd3035a3f0e76b0accc19ea45fb (patch)
tree78dc4a12734a76af3c56670a1587569d419397e0 /drivers/mtd/devices/m25p80.c
parent734e723c6a4d46e56914e63ef55254b75303cc56 (diff)
downloadbarebox-b5a0a65cb5241cd3035a3f0e76b0accc19ea45fb.tar.gz
barebox-b5a0a65cb5241cd3035a3f0e76b0accc19ea45fb.tar.xz
mtd: m25p80: add devicetree support
Until we have spi device_id support match to "m25p80" for now. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mtd/devices/m25p80.c')
-rw-r--r--drivers/mtd/devices/m25p80.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 048d1783dc..57fe1f27ef 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -947,9 +947,18 @@ static int m25p_probe(struct device_d *dev)
return add_mtd_device(&flash->mtd, flash->mtd.name);
}
+static __maybe_unused struct of_device_id m25p80_dt_ids[] = {
+ {
+ .compatible = "m25p80",
+ }, {
+ /* sentinel */
+ }
+};
+
static struct driver_d m25p80_driver = {
.name = "m25p80",
.probe = m25p_probe,
+ .of_compatible = DRV_OF_COMPAT(m25p80_dt_ids),
};
device_spi_driver(m25p80_driver);