summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/mediatek/pinctrl-mt2712.c
diff options
context:
space:
mode:
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>2022-02-22 14:11:42 +0300
committerLinus Walleij <linus.walleij@linaro.org>2022-03-17 04:06:53 +0300
commitc8c206cdc193d1c20f5c309a89b00b30010caad4 (patch)
tree9fd031255052c2ff2e5eccab7c908a9fd50b8d43 /drivers/pinctrl/mediatek/pinctrl-mt2712.c
parente091feda1e3cd2925a2819f2dc2d5487ced2b010 (diff)
downloadlinux-c8c206cdc193d1c20f5c309a89b00b30010caad4.tar.xz
pinctrl: mediatek: common-v1: Use common probe function
Most of the mediatek pinctrl drivers are calling mtk_pctrl_init() and passing only a pointer to struct mtk_pinctrl_devdata, as the regmap handle it passed from device-tree, with the exception of mt6397. For all of the drivers that don't require passing a struct regmap pointer from a parent device, simplify the probe mechanism by assigning the required structure as match data and use mtk_pctrl_common_probe() as their probe function. While at it, also collapse the of_device_id entries to a single line, as they all fit in max 83 columns, which is acceptable. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Chen-Yu Tsai <wenst@chromium.org> Link: https://lore.kernel.org/r/20220222111144.20796-4-angelogioacchino.delregno@collabora.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/mediatek/pinctrl-mt2712.c')
-rw-r--r--drivers/pinctrl/mediatek/pinctrl-mt2712.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/pinctrl/mediatek/pinctrl-mt2712.c b/drivers/pinctrl/mediatek/pinctrl-mt2712.c
index ba35fc6cc138..03aa14445034 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mt2712.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mt2712.c
@@ -587,21 +587,14 @@ static const struct mtk_pinctrl_devdata mt2712_pinctrl_data = {
},
};
-static int mt2712_pinctrl_probe(struct platform_device *pdev)
-{
- return mtk_pctrl_init(pdev, &mt2712_pinctrl_data, NULL);
-}
-
static const struct of_device_id mt2712_pctrl_match[] = {
- {
- .compatible = "mediatek,mt2712-pinctrl",
- },
+ { .compatible = "mediatek,mt2712-pinctrl", .data = &mt2712_pinctrl_data },
{ }
};
MODULE_DEVICE_TABLE(of, mt2712_pctrl_match);
static struct platform_driver mtk_pinctrl_driver = {
- .probe = mt2712_pinctrl_probe,
+ .probe = mtk_pctrl_common_probe,
.driver = {
.name = "mediatek-mt2712-pinctrl",
.of_match_table = mt2712_pctrl_match,