summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBeniamino Galvani <b.galvani@gmail.com>2014-07-24 18:54:57 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-09-01 14:24:52 +0200
commit671b98952e9466d2d23f4435025c9d368184b522 (patch)
treee93f8f009f9f6c5bff5ec18ab3aebbdd51283537 /drivers
parent710d97bcec7fda4f9456be9a984ce92004e2ac3b (diff)
downloadbarebox-671b98952e9466d2d23f4435025c9d368184b522.tar.gz
barebox-671b98952e9466d2d23f4435025c9d368184b522.tar.xz
mfd: syscon: add device tree support
This patch defines a OF compatible property for the syscon driver to allow it to be probed from device tree. Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mfd/syscon.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
index e6722e1916..55cc34ff56 100644
--- a/drivers/mfd/syscon.c
+++ b/drivers/mfd/syscon.c
@@ -95,10 +95,16 @@ static struct platform_device_id syscon_ids[] = {
{ }
};
+static struct of_device_id of_syscon_match[] = {
+ { .compatible = "syscon" },
+ { },
+};
+
static struct driver_d syscon_driver = {
.name = "syscon",
.probe = syscon_probe,
.id_table = syscon_ids,
+ .of_compatible = DRV_OF_COMPAT(of_syscon_match),
};
static int __init syscon_init(void)