pinctrl: mtk: Fix low level output voltage issue
This patch is used to fix low level output voltage issue. A pin is changed from input pull-up to output high. The Dout value of the pin is default as 0. If we change the direction of the pin before the dout value of the pin, It maybe produce a low level output voltage between "input pull-up" and "output high". Signed-off-by: Zhiyong Tao <zhiyong.tao@mediatek.com> Link: https://lore.kernel.org/r/20201120093058.7248-2-zhiyong.tao@mediatek.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Родитель
89cce2b3f2
Коммит
517c3f5a86
|
@ -247,13 +247,13 @@ static int mtk_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin,
|
||||||
err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_SR, !!arg);
|
err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_SR, !!arg);
|
||||||
break;
|
break;
|
||||||
case PIN_CONFIG_OUTPUT:
|
case PIN_CONFIG_OUTPUT:
|
||||||
err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DIR,
|
err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DO,
|
||||||
MTK_OUTPUT);
|
arg);
|
||||||
if (err)
|
if (err)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DO,
|
err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DIR,
|
||||||
arg);
|
MTK_OUTPUT);
|
||||||
break;
|
break;
|
||||||
case PIN_CONFIG_INPUT_SCHMITT:
|
case PIN_CONFIG_INPUT_SCHMITT:
|
||||||
case PIN_CONFIG_INPUT_SCHMITT_ENABLE:
|
case PIN_CONFIG_INPUT_SCHMITT_ENABLE:
|
||||||
|
|
Загрузка…
Ссылка в новой задаче