OpenCloudOS-Kernel/drivers/pinctrl/mediatek
Chen-Yu Tsai 30287d2018 pinctrl: mediatek: paris: Rework support for PIN_CONFIG_{INPUT,OUTPUT}_ENABLE
[ Upstream commit c5d3b64c568a344e998830e0e94a7c04e372f89b ]

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: 805250982b ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-05-17 12:01:57 +02:00
..
Kconfig Pin control bulk changes for the v6.4 kernel: 2023-05-02 15:40:41 -07:00
Makefile pinctrl: ralink: move to mediatek as mtmips 2023-03-19 21:47:25 +01:00
mtk-eint.c pinctrl: meditatek: Startup with the IRQs disabled 2022-11-22 21:05:18 +01:00
mtk-eint.h pinctrl: mediatek: Fix EINT pins input debounce time configuration 2022-11-14 14:20:41 +01:00
pinctrl-moore.c pinctrl: Use of_property_present() for testing DT property presence 2023-03-23 09:28:38 +01:00
pinctrl-moore.h
pinctrl-mt76x8.c pinctrl: ralink: move to mediatek as mtmips 2023-03-19 21:47:25 +01:00
pinctrl-mt2701.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-mt2712.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-mt6397.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-mt6765.c pinctrl: mediatek: Fix EINT pins input debounce time configuration 2022-11-14 14:20:41 +01:00
pinctrl-mt6779.c pinctrl: mediatek: Fix EINT pins input debounce time configuration 2022-11-14 14:20:41 +01:00
pinctrl-mt6795.c pinctrl: mediatek: Fix EINT pins input debounce time configuration 2022-11-14 14:20:41 +01:00
pinctrl-mt6797.c
pinctrl-mt7620.c pinctrl: ralink: move to mediatek as mtmips 2023-03-19 21:47:25 +01:00
pinctrl-mt7621.c pinctrl: ralink: move to mediatek as mtmips 2023-03-19 21:47:25 +01:00
pinctrl-mt7622.c pinctrl: mediatek: Fix EINT pins input debounce time configuration 2022-11-14 14:20:41 +01:00
pinctrl-mt7623.c pinctrl: mediatek: Fix EINT pins input debounce time configuration 2022-11-14 14:20:41 +01:00
pinctrl-mt7629.c pinctrl: mediatek: Fix EINT pins input debounce time configuration 2022-11-14 14:20:41 +01:00
pinctrl-mt7981.c pinctrl: mediatek: fix pull_type data for MT7981 2023-08-21 12:39:11 +02:00
pinctrl-mt7986.c pinctrl: mediatek: assign functions to configure pin bias on MT7986 2023-08-21 12:39:11 +02:00
pinctrl-mt8127.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-mt8135.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-mt8167.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-mt8173.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-mt8183.c pinctrl: mediatek: Fix EINT pins input debounce time configuration 2022-11-14 14:20:41 +01:00
pinctrl-mt8186.c pinctrl: mediatek: Drop bogus slew rate register range for MT8186 2024-03-26 18:19:45 -04:00
pinctrl-mt8188.c pinctrl: mediatek: remove MODULE_LICENSE in non-modules 2023-04-13 13:13:52 -07:00
pinctrl-mt8192.c pinctrl: mediatek: Drop bogus slew rate register range for MT8192 2024-03-26 18:19:45 -04:00
pinctrl-mt8195.c pinctrl: mediatek: Fix the drive register definition of some Pins 2023-01-26 14:41:51 +01:00
pinctrl-mt8365.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-mt8516.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-mtk-common-v2.c
pinctrl-mtk-common-v2.h
pinctrl-mtk-common.c pinctrl: Explicitly include correct DT includes 2023-07-20 21:41:24 +02:00
pinctrl-mtk-common.h
pinctrl-mtk-mt2701.h
pinctrl-mtk-mt2712.h
pinctrl-mtk-mt6397.h
pinctrl-mtk-mt6765.h
pinctrl-mtk-mt6779.h
pinctrl-mtk-mt6795.h
pinctrl-mtk-mt6797.h
pinctrl-mtk-mt8127.h
pinctrl-mtk-mt8135.h
pinctrl-mtk-mt8167.h
pinctrl-mtk-mt8173.h
pinctrl-mtk-mt8183.h
pinctrl-mtk-mt8186.h
pinctrl-mtk-mt8188.h
pinctrl-mtk-mt8192.h
pinctrl-mtk-mt8195.h
pinctrl-mtk-mt8365.h
pinctrl-mtk-mt8516.h
pinctrl-mtmips.c pinctrl: ralink: move to mediatek as mtmips 2023-03-19 21:47:25 +01:00
pinctrl-mtmips.h pinctrl: ralink: move to mediatek as mtmips 2023-03-19 21:47:25 +01:00
pinctrl-paris.c pinctrl: mediatek: paris: Rework support for PIN_CONFIG_{INPUT,OUTPUT}_ENABLE 2024-05-17 12:01:57 +02:00
pinctrl-paris.h
pinctrl-rt305x.c pinctrl: ralink: move to mediatek as mtmips 2023-03-19 21:47:25 +01:00
pinctrl-rt2880.c pinctrl: ralink: move to mediatek as mtmips 2023-03-19 21:47:25 +01:00
pinctrl-rt3883.c pinctrl: ralink: move to mediatek as mtmips 2023-03-19 21:47:25 +01:00