提交 8875059d 编写于 作者: S Sean Wang 提交者: Linus Walleij

pinctrl: mt7622: fix initialization sequence between eint and gpiochip

Because gpichip applied in the driver must depend on mtk eint to implement
the input data debouncing and the translation between gpio and irq, it's
better to keep logic consistent with mtk eint being built prior to gpiochip
being added.

Cc: stable@vger.kernel.org
Fixes: e6dabd38 ("pinctrl: mediatek: add EINT support to MT7622 SoC")
Signed-off-by: NSean Wang <sean.wang@mediatek.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 fafa35cc
......@@ -1713,17 +1713,17 @@ static int mtk_pinctrl_probe(struct platform_device *pdev)
return err;
}
err = mtk_build_eint(hw, pdev);
if (err)
dev_warn(&pdev->dev,
"Failed to add EINT, but pinctrl still can work\n");
err = mtk_build_gpiochip(hw, pdev->dev.of_node);
if (err) {
dev_err(&pdev->dev, "Failed to add gpio_chip\n");
return err;
}
err = mtk_build_eint(hw, pdev);
if (err)
dev_warn(&pdev->dev,
"Failed to add EINT, but pinctrl still can work\n");
platform_set_drvdata(pdev, hw);
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册