diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-26 20:54:29 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-26 20:54:29 +0200 |
commit | f5dcb68086ba2e033b2af32b0da0c7a7c7872a09 (patch) | |
tree | 89c41089b492f8d8d411185bd7cb07538802e837 /drivers/pinctrl | |
parent | Merge tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/ar... (diff) | |
parent | drivers: soc: sunxi: Introduce SoC driver to map SRAMs (diff) | |
download | linux-f5dcb68086ba2e033b2af32b0da0c7a7c7872a09.tar.xz linux-f5dcb68086ba2e033b2af32b0da0c7a7c7872a09.zip |
Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC driver updates from Kevin Hilman:
"Some of these are for drivers/soc, where we're now putting
SoC-specific drivers these days. Some are for other driver subsystems
where we have received acks from the appropriate maintainers.
Some highlights:
- simple-mfd: document DT bindings and misc updates
- migrate mach-berlin to simple-mfd for clock, pinctrl and reset
- memory: support for Tegra132 SoC
- memory: introduce tegra EMC driver for scaling memory frequency
- misc. updates for ARM CCI and CCN busses"
* tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (48 commits)
drivers: soc: sunxi: Introduce SoC driver to map SRAMs
arm-cci: Add aliases for PMU events
arm-cci: Add CCI-500 PMU support
arm-cci: Sanitise CCI400 PMU driver specific code
arm-cci: Abstract handling for CCI events
arm-cci: Abstract out the PMU counter details
arm-cci: Cleanup PMU driver code
arm-cci: Do not enable CCI-400 PMU by default
firmware: qcom: scm: Add HDCP Support
ARM: berlin: add an ADC node for the BG2Q
ARM: berlin: remove useless chip and system ctrl compatibles
clk: berlin: drop direct of_iomap of nodes reg property
ARM: berlin: move BG2Q clock node
ARM: berlin: move BG2CD clock node
ARM: berlin: move BG2 clock node
clk: berlin: prepare simple-mfd conversion
pinctrl: berlin: drop SoC stub provided regmap
ARM: berlin: move pinctrl to simple-mfd nodes
pinctrl: berlin: prepare to use regmap provided by syscon
reset: berlin: drop arch_initcall initialization
...
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/berlin/berlin-bg2.c | 26 | ||||
-rw-r--r-- | drivers/pinctrl/berlin/berlin-bg2cd.c | 26 | ||||
-rw-r--r-- | drivers/pinctrl/berlin/berlin-bg2q.c | 26 | ||||
-rw-r--r-- | drivers/pinctrl/berlin/berlin.c | 9 |
4 files changed, 12 insertions, 75 deletions
diff --git a/drivers/pinctrl/berlin/berlin-bg2.c b/drivers/pinctrl/berlin/berlin-bg2.c index b467e6e14f8a..274c5535b531 100644 --- a/drivers/pinctrl/berlin/berlin-bg2.c +++ b/drivers/pinctrl/berlin/berlin-bg2.c @@ -218,11 +218,11 @@ static const struct berlin_pinctrl_desc berlin2_sysmgr_pinctrl_data = { static const struct of_device_id berlin2_pinctrl_match[] = { { - .compatible = "marvell,berlin2-chip-ctrl", + .compatible = "marvell,berlin2-soc-pinctrl", .data = &berlin2_soc_pinctrl_data }, { - .compatible = "marvell,berlin2-system-ctrl", + .compatible = "marvell,berlin2-system-pinctrl", .data = &berlin2_sysmgr_pinctrl_data }, {} @@ -233,28 +233,6 @@ static int berlin2_pinctrl_probe(struct platform_device *pdev) { const struct of_device_id *match = of_match_device(berlin2_pinctrl_match, &pdev->dev); - struct regmap_config *rmconfig; - struct regmap *regmap; - struct resource *res; - void __iomem *base; - - rmconfig = devm_kzalloc(&pdev->dev, sizeof(*rmconfig), GFP_KERNEL); - if (!rmconfig) - return -ENOMEM; - - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, res); - if (IS_ERR(base)) - return PTR_ERR(base); - - rmconfig->reg_bits = 32, - rmconfig->val_bits = 32, - rmconfig->reg_stride = 4, - rmconfig->max_register = resource_size(res); - - regmap = devm_regmap_init_mmio(&pdev->dev, base, rmconfig); - if (IS_ERR(regmap)) - return PTR_ERR(regmap); return berlin_pinctrl_probe(pdev, match->data); } diff --git a/drivers/pinctrl/berlin/berlin-bg2cd.c b/drivers/pinctrl/berlin/berlin-bg2cd.c index a8b98083a031..0cb793a3552a 100644 --- a/drivers/pinctrl/berlin/berlin-bg2cd.c +++ b/drivers/pinctrl/berlin/berlin-bg2cd.c @@ -161,11 +161,11 @@ static const struct berlin_pinctrl_desc berlin2cd_sysmgr_pinctrl_data = { static const struct of_device_id berlin2cd_pinctrl_match[] = { { - .compatible = "marvell,berlin2cd-chip-ctrl", + .compatible = "marvell,berlin2cd-soc-pinctrl", .data = &berlin2cd_soc_pinctrl_data }, { - .compatible = "marvell,berlin2cd-system-ctrl", + .compatible = "marvell,berlin2cd-system-pinctrl", .data = &berlin2cd_sysmgr_pinctrl_data }, {} @@ -176,28 +176,6 @@ static int berlin2cd_pinctrl_probe(struct platform_device *pdev) { const struct of_device_id *match = of_match_device(berlin2cd_pinctrl_match, &pdev->dev); - struct regmap_config *rmconfig; - struct regmap *regmap; - struct resource *res; - void __iomem *base; - - rmconfig = devm_kzalloc(&pdev->dev, sizeof(*rmconfig), GFP_KERNEL); - if (!rmconfig) - return -ENOMEM; - - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, res); - if (IS_ERR(base)) - return PTR_ERR(base); - - rmconfig->reg_bits = 32, - rmconfig->val_bits = 32, - rmconfig->reg_stride = 4, - rmconfig->max_register = resource_size(res); - - regmap = devm_regmap_init_mmio(&pdev->dev, base, rmconfig); - if (IS_ERR(regmap)) - return PTR_ERR(regmap); return berlin_pinctrl_probe(pdev, match->data); } diff --git a/drivers/pinctrl/berlin/berlin-bg2q.c b/drivers/pinctrl/berlin/berlin-bg2q.c index 65fb8711a42f..a466054a8206 100644 --- a/drivers/pinctrl/berlin/berlin-bg2q.c +++ b/drivers/pinctrl/berlin/berlin-bg2q.c @@ -380,11 +380,11 @@ static const struct berlin_pinctrl_desc berlin2q_sysmgr_pinctrl_data = { static const struct of_device_id berlin2q_pinctrl_match[] = { { - .compatible = "marvell,berlin2q-chip-ctrl", + .compatible = "marvell,berlin2q-soc-pinctrl", .data = &berlin2q_soc_pinctrl_data, }, { - .compatible = "marvell,berlin2q-system-ctrl", + .compatible = "marvell,berlin2q-system-pinctrl", .data = &berlin2q_sysmgr_pinctrl_data, }, {} @@ -395,28 +395,6 @@ static int berlin2q_pinctrl_probe(struct platform_device *pdev) { const struct of_device_id *match = of_match_device(berlin2q_pinctrl_match, &pdev->dev); - struct regmap_config *rmconfig; - struct regmap *regmap; - struct resource *res; - void __iomem *base; - - rmconfig = devm_kzalloc(&pdev->dev, sizeof(*rmconfig), GFP_KERNEL); - if (!rmconfig) - return -ENOMEM; - - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, res); - if (IS_ERR(base)) - return PTR_ERR(base); - - rmconfig->reg_bits = 32, - rmconfig->val_bits = 32, - rmconfig->reg_stride = 4, - rmconfig->max_register = resource_size(res); - - regmap = devm_regmap_init_mmio(&pdev->dev, base, rmconfig); - if (IS_ERR(regmap)) - return PTR_ERR(regmap); return berlin_pinctrl_probe(pdev, match->data); } diff --git a/drivers/pinctrl/berlin/berlin.c b/drivers/pinctrl/berlin/berlin.c index ddbcd1d7de52..f49580617055 100644 --- a/drivers/pinctrl/berlin/berlin.c +++ b/drivers/pinctrl/berlin/berlin.c @@ -11,6 +11,7 @@ */ #include <linux/io.h> +#include <linux/mfd/syscon.h> #include <linux/module.h> #include <linux/of.h> #include <linux/of_address.h> @@ -295,13 +296,15 @@ int berlin_pinctrl_probe(struct platform_device *pdev, const struct berlin_pinctrl_desc *desc) { struct device *dev = &pdev->dev; + struct device_node *parent_np = of_get_parent(dev->of_node); struct berlin_pinctrl *pctrl; struct regmap *regmap; int ret; - regmap = dev_get_regmap(&pdev->dev, NULL); - if (!regmap) - return -ENODEV; + regmap = syscon_node_to_regmap(parent_np); + of_node_put(parent_np); + if (IS_ERR(regmap)) + return PTR_ERR(regmap); pctrl = devm_kzalloc(dev, sizeof(*pctrl), GFP_KERNEL); if (!pctrl) |