Commit e091feda authored by AngeloGioacchino Del Regno's avatar AngeloGioacchino Del Regno Committed by Linus Walleij

pinctrl: mediatek: common-v1: Add common probe function

As a preparation to cleanup the probe mechanism of mediatek pinctrl
drivers that are using the v1 controller, add a common probe function
to this driver.
Signed-off-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: default avatarChen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20220222111144.20796-3-angelogioacchino.delregno@collabora.comSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 78df7bba
......@@ -1117,3 +1117,14 @@ int mtk_pctrl_init(struct platform_device *pdev,
gpiochip_remove(pctl->chip);
return ret;
}
int mtk_pctrl_common_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
const struct mtk_pinctrl_devdata *data = device_get_match_data(dev);
if (!data)
return -ENODEV;
return mtk_pctrl_init(pdev, data, NULL);
}
......@@ -277,6 +277,8 @@ int mtk_pctrl_init(struct platform_device *pdev,
const struct mtk_pinctrl_devdata *data,
struct regmap *regmap);
int mtk_pctrl_common_probe(struct platform_device *pdev);
int mtk_pctrl_spec_pull_set_samereg(struct regmap *regmap,
const struct mtk_pin_spec_pupd_set_samereg *pupd_infos,
unsigned int info_num, unsigned int pin,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment