aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/syscon.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd/syscon.c')
-rw-r--r--drivers/mfd/syscon.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
index dbea55de4397..e2a04bb8bc1e 100644
--- a/drivers/mfd/syscon.c
+++ b/drivers/mfd/syscon.c
@@ -18,6 +18,7 @@
18#include <linux/of.h> 18#include <linux/of.h>
19#include <linux/of_address.h> 19#include <linux/of_address.h>
20#include <linux/of_platform.h> 20#include <linux/of_platform.h>
21#include <linux/platform_data/syscon.h>
21#include <linux/platform_device.h> 22#include <linux/platform_device.h>
22#include <linux/regmap.h> 23#include <linux/regmap.h>
23#include <linux/mfd/syscon.h> 24#include <linux/mfd/syscon.h>
@@ -119,6 +120,7 @@ static struct regmap_config syscon_regmap_config = {
119static int syscon_probe(struct platform_device *pdev) 120static int syscon_probe(struct platform_device *pdev)
120{ 121{
121 struct device *dev = &pdev->dev; 122 struct device *dev = &pdev->dev;
123 struct syscon_platform_data *pdata = dev_get_platdata(dev);
122 struct syscon *syscon; 124 struct syscon *syscon;
123 struct resource *res; 125 struct resource *res;
124 void __iomem *base; 126 void __iomem *base;
@@ -136,6 +138,8 @@ static int syscon_probe(struct platform_device *pdev)
136 return -ENOMEM; 138 return -ENOMEM;
137 139
138 syscon_regmap_config.max_register = res->end - res->start - 3; 140 syscon_regmap_config.max_register = res->end - res->start - 3;
141 if (pdata)
142 syscon_regmap_config.name = pdata->label;
139 syscon->regmap = devm_regmap_init_mmio(dev, base, 143 syscon->regmap = devm_regmap_init_mmio(dev, base,
140 &syscon_regmap_config); 144 &syscon_regmap_config);
141 if (IS_ERR(syscon->regmap)) { 145 if (IS_ERR(syscon->regmap)) {