diff options
Diffstat (limited to 'drivers/pinctrl/mvebu/pinctrl-armada-39x.c')
-rw-r--r-- | drivers/pinctrl/mvebu/pinctrl-armada-39x.c | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-39x.c b/drivers/pinctrl/mvebu/pinctrl-armada-39x.c index e288f8ba0bf1..627f57c88372 100644 --- a/drivers/pinctrl/mvebu/pinctrl-armada-39x.c +++ b/drivers/pinctrl/mvebu/pinctrl-armada-39x.c @@ -14,7 +14,6 @@ #include <linux/err.h> #include <linux/init.h> #include <linux/io.h> -#include <linux/module.h> #include <linux/platform_device.h> #include <linux/of.h> #include <linux/of_device.h> @@ -22,18 +21,6 @@ #include "pinctrl-mvebu.h" -static void __iomem *mpp_base; - -static int armada_39x_mpp_ctrl_get(unsigned pid, unsigned long *config) -{ - return default_mpp_ctrl_get(mpp_base, pid, config); -} - -static int armada_39x_mpp_ctrl_set(unsigned pid, unsigned long config) -{ - return default_mpp_ctrl_set(mpp_base, pid, config); -} - enum { V_88F6920 = BIT(0), V_88F6925 = BIT(1), @@ -391,8 +378,8 @@ static const struct of_device_id armada_39x_pinctrl_of_match[] = { { }, }; -static struct mvebu_mpp_ctrl armada_39x_mpp_controls[] = { - MPP_FUNC_CTRL(0, 59, NULL, armada_39x_mpp_ctrl), +static const struct mvebu_mpp_ctrl armada_39x_mpp_controls[] = { + MPP_FUNC_CTRL(0, 59, NULL, mvebu_mmio_mpp_ctrl), }; static struct pinctrl_gpio_range armada_39x_mpp_gpio_ranges[] = { @@ -405,16 +392,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); @@ -425,7 +406,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 = { @@ -435,9 +416,4 @@ static struct platform_driver armada_39x_pinctrl_driver = { }, .probe = armada_39x_pinctrl_probe, }; - -module_platform_driver(armada_39x_pinctrl_driver); - -MODULE_AUTHOR("Thomas Petazzoni <thomas.petazzoni@free-electrons.com>"); -MODULE_DESCRIPTION("Marvell Armada 39x pinctrl driver"); -MODULE_LICENSE("GPL v2"); +builtin_platform_driver(armada_39x_pinctrl_driver); |