summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/mvebu/pinctrl-armada-39x.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2017-01-13 14:03:30 +0300
committerLinus Walleij <linus.walleij@linaro.org>2017-01-18 11:56:35 +0300
commitad9ec4ecee6889321ae1752ce8793524a8cdfa7a (patch)
tree3db527cd0ad1da68a344ee2404c9715f48f3e25a /drivers/pinctrl/mvebu/pinctrl-armada-39x.c
parent44aa9d0604f578cdd839d2f5295a9d920fb54999 (diff)
downloadlinux-ad9ec4ecee6889321ae1752ce8793524a8cdfa7a.tar.xz
pinctrl: mvebu: switch drivers to generic simple mmio
Move the mvebu pinctrl drivers over to the generic simple mmio implementation, saving a substantial number of lines of code in the process. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/mvebu/pinctrl-armada-39x.c')
-rw-r--r--drivers/pinctrl/mvebu/pinctrl-armada-39x.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-39x.c b/drivers/pinctrl/mvebu/pinctrl-armada-39x.c
index 4b1ba4424e0a..697c8774a4da 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-39x.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-39x.c
@@ -22,20 +22,6 @@
#include "pinctrl-mvebu.h"
-static void __iomem *mpp_base;
-
-static int armada_39x_mpp_ctrl_get(struct mvebu_mpp_ctrl_data *data,
- unsigned pid, unsigned long *config)
-{
- return default_mpp_ctrl_get(mpp_base, pid, config);
-}
-
-static int armada_39x_mpp_ctrl_set(struct mvebu_mpp_ctrl_data *data,
- unsigned pid, unsigned long config)
-{
- return default_mpp_ctrl_set(mpp_base, pid, config);
-}
-
enum {
V_88F6920 = BIT(0),
V_88F6925 = BIT(1),
@@ -394,7 +380,7 @@ static const struct of_device_id armada_39x_pinctrl_of_match[] = {
};
static const struct mvebu_mpp_ctrl armada_39x_mpp_controls[] = {
- MPP_FUNC_CTRL(0, 59, NULL, armada_39x_mpp_ctrl),
+ MPP_FUNC_CTRL(0, 59, NULL, mvebu_mmio_mpp_ctrl),
};
static struct pinctrl_gpio_range armada_39x_mpp_gpio_ranges[] = {
@@ -407,16 +393,10 @@ static int armada_39x_pinctrl_probe(struct platform_device *pdev)
struct mvebu_pinctrl_soc_info *soc = &armada_39x_pinctrl_info;
const struct of_device_id *match =
of_match_device(armada_39x_pinctrl_of_match, &pdev->dev);
- struct resource *res;
if (!match)
return -ENODEV;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- mpp_base = devm_ioremap_resource(&pdev->dev, res);
- if (IS_ERR(mpp_base))
- return PTR_ERR(mpp_base);
-
soc->variant = (unsigned) match->data & 0xff;
soc->controls = armada_39x_mpp_controls;
soc->ncontrols = ARRAY_SIZE(armada_39x_mpp_controls);
@@ -427,7 +407,7 @@ static int armada_39x_pinctrl_probe(struct platform_device *pdev)
pdev->dev.platform_data = soc;
- return mvebu_pinctrl_probe(pdev);
+ return mvebu_pinctrl_simple_mmio_probe(pdev);
}
static struct platform_driver armada_39x_pinctrl_driver = {