diff options
author | Chen-Yu Tsai <wenst@chromium.org> | 2024-03-27 12:13:34 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2024-04-04 16:27:35 +0300 |
commit | c5d3b64c568a344e998830e0e94a7c04e372f89b (patch) | |
tree | 95e42403717849fc4b878c167f7b483600c5e0c3 /drivers/pinctrl/mediatek/mtk-eint.h | |
parent | 08f66a8edd08f6f7cfa769c81634b29a2b123908 (diff) | |
download | linux-c5d3b64c568a344e998830e0e94a7c04e372f89b.tar.xz |
pinctrl: mediatek: paris: Rework support for PIN_CONFIG_{INPUT,OUTPUT}_ENABLE
There is a misinterpretation of some of the PIN_CONFIG_* options in this
driver library. PIN_CONFIG_OUTPUT_ENABLE should refer to a buffer or
switch in the output direction of the electrical path. The MediaTek
hardware does not have such a thing. The driver incorrectly maps this
option to the GPIO function's direction.
Likewise, PIN_CONFIG_INPUT_ENABLE should refer to a buffer or switch in
the input direction. The hardware does have such a mechanism, and is
mapped to the IES bit. The driver however sets the direction in addition
to the IES bit, which is incorrect. On readback, the IES bit isn't even
considered.
Ironically, the driver does not support readback for PIN_CONFIG_OUTPUT,
while its readback of PIN_CONFIG_{INPUT,OUTPUT}_ENABLE is what it should
be doing for PIN_CONFIG_OUTPUT.
Rework support for these three options, so that PIN_CONFIG_OUTPUT_ENABLE
is completely removed, PIN_CONFIG_INPUT_ENABLE is only linked to the IES
bit, and PIN_CONFIG_OUTPUT is linked to the GPIO function's direction
and output level.
Fixes: 805250982bb5 ("pinctrl: mediatek: add pinctrl-paris that implements the vendor dt-bindings")
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Message-ID: <20240327091336.3434141-3-wenst@chromium.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/mediatek/mtk-eint.h')
0 files changed, 0 insertions, 0 deletions