android_kernel_motorola_sm6375/drivers/pinctrl
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Chen-Yu Tsai 54834d07d9 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 <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Message-ID: <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2024-05-17 11:43:48 +02:00
..
actions
aspeed pinctrl: aspeed: Fix confusing types in return value 2023-02-22 12:50:32 +01:00
bcm
berlin
cirrus pinctrl: lochnagar: Don't build on MIPS 2024-01-25 14:34:19 -08:00
freescale
intel pinctrl: cherryview: Return correct value if pin in push-pull mode 2023-07-27 08:37:16 +02:00
mediatek pinctrl: mediatek: paris: Rework support for PIN_CONFIG_{INPUT,OUTPUT}_ENABLE 2024-05-17 11:43:48 +02:00
meson pinctrl: meson-axg: add missing GPIOA_18 gpio group 2023-06-14 10:59:58 +02:00
mvebu
nomadik pinctrl: nomadik: Fix refcount leak in nmk_pinctrl_dt_subnode_to_map 2022-08-25 11:18:23 +02:00
nuvoton
pxa
qcom pinctrl: qcom: msm8916: Allow CAMSS GP clocks to be muxed 2022-08-25 11:18:23 +02:00
samsung
sh-pfc
sirf
spear
sprd
stm32 pinctrl: stm32: Fix refcount leak in stm32_pctrl_get_irq_domain 2023-03-11 16:43:44 +01:00
sunxi pinctrl: sunxi: Add I/O bias setting for H6 R-PIO 2022-08-25 11:18:24 +02:00
tegra
ti
uniphier
vt8500
zte
core.c pinctrl: core: delete incorrect free in pinctrl_enable() 2024-05-17 11:43:46 +02:00
core.h
devicetree.c pinctrl: devicetree: fix null pointer dereferencing in pinctrl_dt_to_map 2022-11-25 17:42:14 +01:00
devicetree.h
Kconfig
Makefile
pinconf-generic.c pinctrl: pinconf-generic: add missing of_node_put() 2023-01-18 11:41:06 +01:00
pinconf.c
pinconf.h
pinctrl-amd.c pinctrl: amd: Don't show Invalid config param errors 2023-09-23 10:59:37 +02:00
pinctrl-amd.h pinctrl: amd: Detect internal GPIO0 debounce handling 2023-07-27 08:37:34 +02:00
pinctrl-artpec6.c
pinctrl-as3722.c
pinctrl-at91-pio4.c pinctrl: at91-pio4: use dedicated lock class for IRQ 2024-01-08 11:29:45 +01:00
pinctrl-at91.c pinctrl: at91: use devm_kasprintf() to avoid potential leaks 2023-03-11 16:43:57 +01:00
pinctrl-at91.h
pinctrl-axp209.c
pinctrl-bm1880.c
pinctrl-coh901.c
pinctrl-coh901.h
pinctrl-da850-pupd.c
pinctrl-digicolor.c
pinctrl-falcon.c
pinctrl-gemini.c
pinctrl-ingenic.c
pinctrl-lantiq.c
pinctrl-lantiq.h
pinctrl-lpc18xx.c
pinctrl-max77620.c
pinctrl-mcp23s08.c
pinctrl-ocelot.c pinctrl: ocelot: Fix alt mode for ocelot 2023-04-05 11:16:44 +02:00
pinctrl-oxnas.c
pinctrl-palmas.c
pinctrl-pic32.c
pinctrl-pic32.h
pinctrl-pistachio.c
pinctrl-rk805.c
pinctrl-rockchip.c pinctrl: rockchip: Fix refcount leak in rockchip_pinctrl_parse_groups 2024-03-01 13:13:35 +01:00
pinctrl-rza1.c
pinctrl-rza2.c pinctrl: renesas: rza2: Add lock around pinctrl_generic{{add,remove}_group,{add,remove}_function} 2023-08-30 16:27:28 +02:00
pinctrl-rzn1.c
pinctrl-single.c pinctrl: single: fix potential NULL dereference 2023-02-22 12:50:32 +01:00
pinctrl-st.c
pinctrl-stmfx.c
pinctrl-sx150x.c
pinctrl-tb10x.c
pinctrl-u300.c
pinctrl-utils.c
pinctrl-utils.h
pinctrl-xway.c
pinctrl-zynq.c
pinmux.c
pinmux.h