lkml.org 
[lkml]   [2015]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] mfd: syscon: fix syscon probing from dt
Date
Patch bdb0066df96e ("mfd: syscon: Decouple syscon interface from platform devices")
breaks probing pure syscon devices from device tree, such as anatop and
iomuxc-gpr on i.MX. This patch adds back the dt id table to match against
"syscon" compatible device tree nodes.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
drivers/mfd/syscon.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
index 176bf0f..70b8654 100644
--- a/drivers/mfd/syscon.c
+++ b/drivers/mfd/syscon.c
@@ -174,6 +174,11 @@ struct regmap *syscon_regmap_lookup_by_phandle(struct device_node *np,
}
EXPORT_SYMBOL_GPL(syscon_regmap_lookup_by_phandle);

+static const struct of_device_id of_syscon_match[] = {
+ { .compatible = "syscon", },
+ { },
+};
+
static int syscon_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
@@ -219,6 +224,7 @@ static const struct platform_device_id syscon_ids[] = {
static struct platform_driver syscon_driver = {
.driver = {
.name = "syscon",
+ .of_match_table = of_syscon_match,
},
.probe = syscon_probe,
.id_table = syscon_ids,
--
2.1.4


\
 
 \ /
  Last update: 2015-01-06 16:41    [W:0.216 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site