linux/drivers/pinctrl
Douglas Anderson e49eabe3e1 pinctrl: qcom: Support OUTPUT_ENABLE; deprecate INPUT_ENABLE
The Qualcomm pinctrl driver has been violating the documented meaning
of PIN_CONFIG_INPUT_ENABLE. That documentation says:

  Note that this does not affect the pin's ability to drive output.

...yet the Qualcomm driver's sole action when asked to "enable input"
on a pin is to disable its output.

The Qualcomm driver's implementation stems from the fact that
"output-disable" is a "new" property from 2017. It was introduced in
commit 425562429d ("pinctrl: generic: Add output-enable
property"). The "input-enable" handling in Qualcomm drivers is from
2015 introduced in commit 407f5e392f ("pinctrl: qcom: handle
input-enable pinconf property").

Let's change the Qualcomm driver to move us in the right direction. As
part of this:
1. We'll now support PIN_CONFIG_OUTPUT_ENABLE
2. We'll still support using PIN_CONFIG_INPUT_ENABLE to disable a
   pin's output (in violation of the docs) with a big comment in the
   code. This is needed because old device trees have "input-enable"
   in them and, in some cases, people might need the old
   behavior. While we could programmatically change all old device
   trees, it doesn't really hurt to keep supporting the old behavior
   and we're _supposed_ to try to be compatible with old device trees
   anyway.

It can also be noted that the PIN_CONFIG_INPUT_ENABLE handling code
seems to have purposefully ignored its argument. That means that old
boards that had _either_ "input-disable" or "input-enable" in them
would have had the effect of disabling a pin's output. While we could
change this behavior, since we're only leaving the
PIN_CONFIG_INPUT_ENABLE there for backward compatibility we might as
well be fully backward compatible.

NOTE: despite the fact that we'll still support
PIN_CONFIG_INPUT_ENABLE for _setting_ config, we take it away from
msm_config_group_get(). This appears to be only used for populating
debugfs and fixing debugfs to "output enabled" where relevant instead
of "input enabled" makes more sense and has more truthiness.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230323102605.8.Id740ae6a993f9313b58add6b10f6a92795d510d4@changeid
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2023-03-29 10:46:59 +02:00
..
actions intel-pinctrl for v6.1-2 2022-10-26 09:58:29 +02:00
aspeed pinctrl: aspeed: Revert "Force to disable the function's signal" 2023-01-30 23:51:03 +01:00
bcm pinctrl: bcm2835: Switch to use ->add_pin_ranges() 2023-01-26 13:38:55 +01:00
berlin pinctrl: berlin: fix spelling typo in comment 2022-09-05 14:10:14 +02:00
cirrus pinctrl: lochnagar: Add missing header(s) 2022-10-24 17:06:46 +03:00
freescale pinctrl: mxs: avoid defines prefixed with CONFIG 2022-12-29 02:05:16 +01:00
intel Core changes: 2023-02-22 11:05:56 -08:00
mediatek Core changes: 2023-02-22 11:05:56 -08:00
meson pinctrl: meson: Switch to use fwnode instead of of_node 2022-09-08 10:35:30 +02:00
mvebu pinctrl: mvebu: Add missing header(s) 2022-10-24 17:06:46 +03:00
nomadik Core changes: 2023-02-22 11:05:56 -08:00
nuvoton pinctrl: nuvoton: wpcm450: Fix handling of inverted MFSEL bits 2022-11-10 09:19:42 +01:00
pxa drivers/pinctrl: remove redundant ret variable 2022-01-24 01:12:54 +01:00
qcom pinctrl: qcom: Support OUTPUT_ENABLE; deprecate INPUT_ENABLE 2023-03-29 10:46:59 +02:00
ralink pinctrl: ralink: rename variables which point out the pin group 2023-01-16 14:56:46 +01:00
renesas pinctrl: renesas: r8a77950: Add VIN[45] pins, groups, and functions 2023-01-26 16:45:49 +01:00
samsung Core changes: 2023-02-22 11:05:56 -08:00
spear pinctrl: spear: Add missing header(s) 2022-10-24 17:06:47 +03:00
sprd pinctrl: sprd: Add missing header(s) 2022-10-24 17:06:47 +03:00
starfive pinctrl: starfive: Add StarFive JH7110 aon controller driver 2023-02-10 23:44:07 +01:00
stm32 pinctrl: stm32: Fix refcount leak in stm32_pctrl_get_irq_domain 2023-01-09 15:13:15 +01:00
sunplus Core changes: 2023-02-22 11:05:56 -08:00
sunxi pinctrl: sunxi: d1: Add CAN bus pinmuxes 2022-11-26 22:57:50 +01:00
tegra pinctrl: tegra: Separate Tegra194 instances 2022-11-14 14:16:46 +01:00
ti pinctrl: ti-iodelay: Add missing header(s) 2022-10-24 17:06:47 +03:00
uniphier pinctrl: uniphier: Add missing header(s) 2022-10-24 17:06:47 +03:00
visconti gpio: visconti: Add Toshiba Visconti GPIO support 2021-02-15 11:43:26 +01:00
vt8500 pinctrl: Get rid of duplicate of_node assignment in the drivers 2021-12-16 04:18:30 +01:00
core.c gpio: Get rid of gpio_to_chip() 2023-01-30 15:55:30 +01:00
core.h pinctrl: Move for_each_maps() to namespace and hide iterator inside 2022-11-14 14:19:33 +01:00
devicetree.c pinctrl: devicetree: fix null pointer dereferencing in pinctrl_dt_to_map 2022-11-10 12:26:18 +01:00
devicetree.h pinctrl: Clean up headers 2022-10-24 17:06:48 +03:00
Kconfig pinctrl: digicolor: Use proper headers and drop OF dependency 2023-01-16 15:14:03 +01:00
Makefile pinctrl: pinctrl-loongson2: add pinctrl driver support 2022-11-17 10:24:08 +01:00
pinconf-generic.c pinctrl: pinconf-generic: add missing of_node_put() 2022-11-25 10:49:28 +01:00
pinconf.c pinctrl: use to octal permissions for debugfs files 2021-03-10 14:41:58 +01:00
pinconf.h pinctrl: Clean up headers 2022-10-24 17:06:48 +03:00
pinctrl-amd.c Core changes: 2023-02-22 11:05:56 -08:00
pinctrl-amd.h pinctrl: amd: Add Z-state wake control bits 2022-12-29 01:59:41 +01:00
pinctrl-apple-gpio.c pinctrl: apple-gpio: Add missing header(s) 2022-10-24 12:31:17 +03:00
pinctrl-artpec6.c
pinctrl-as3722.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_318.RULE 2022-06-10 14:51:36 +02:00
pinctrl-at91-pio4.c pinctrl: at91: use devm_kasprintf() to avoid potential leaks 2023-02-06 12:11:51 +01:00
pinctrl-at91.c pinctrl: at91: use devm_kasprintf() to avoid potential leaks 2023-02-06 12:11:51 +01:00
pinctrl-at91.h
pinctrl-axp209.c pinctrl: axp209: Add missing header(s) 2022-10-24 12:31:55 +03:00
pinctrl-bm1880.c pinctrl: bm1880: Add missing header(s) 2022-10-24 12:53:33 +03:00
pinctrl-cy8c95x0.c intel-pinctrl for v6.1-2 2022-10-26 09:58:29 +02:00
pinctrl-da850-pupd.c pinctrl: da850-pupd: Drop empty platform remove function 2022-12-29 02:02:46 +01:00
pinctrl-da9062.c pinctrl: Propagate firmware node from a parent device 2021-12-22 03:09:56 +01:00
pinctrl-digicolor.c pinctrl: digicolor: Use proper headers and drop OF dependency 2023-01-16 15:14:03 +01:00
pinctrl-equilibrium.c pinctrl: equilibrium: Switch to use fwnode instead of of_node 2022-05-09 13:46:51 +02:00
pinctrl-equilibrium.h pinctrl: equilibrium: Switch to use fwnode instead of of_node 2022-05-09 13:46:51 +02:00
pinctrl-falcon.c pinctrl: lantiq: Add missing header(s) 2022-10-24 17:06:46 +03:00
pinctrl-gemini.c pinctrl: gemini: Add missing header(s) 2022-10-24 17:06:45 +03:00
pinctrl-ingenic.c Pin control changes for the v6.2 kernel cycle: 2022-12-13 13:03:06 -08:00
pinctrl-k210.c pinctrl: k210: call of_node_put() 2022-11-22 09:35:27 +01:00
pinctrl-keembay.c pinctrl: keembay: rework loops looking for groups names 2021-12-22 02:57:27 +01:00
pinctrl-lantiq.c pinctrl: lantiq: Add missing header(s) 2022-10-24 17:06:46 +03:00
pinctrl-lantiq.h pinctrl: lantiq: Add missing header(s) 2022-10-24 17:06:46 +03:00
pinctrl-loongson2.c pinctrl: loongson2: Fix some const correctness 2022-11-25 11:41:01 +01:00
pinctrl-lpc18xx.c pinctrl: lpc18xx: Add missing header(s) 2022-10-24 17:06:46 +03:00
pinctrl-max77620.c pinctrl: max77620: drop unneeded MODULE_ALIAS 2022-04-22 22:56:46 +02:00
pinctrl-mcp23s08_i2c.c pinctrl: mcp23s08: Convert to i2c's .probe_new() 2023-01-10 09:00:19 +01:00
pinctrl-mcp23s08_spi.c pinctrl: mcp23s08: Print error message when regmap init fails 2020-11-05 11:30:31 +01:00
pinctrl-mcp23s08.c pinctrl: mcp23s08: Drop assignment of default number of OF cells 2022-09-03 00:17:35 +02:00
pinctrl-mcp23s08.h pinctrl: mcp23s08: Add optional reset GPIO 2021-06-12 01:58:10 +02:00
pinctrl-microchip-sgpio.c pinctrl: microchip-sgpio: Add missing header(s) 2022-10-24 17:06:46 +03:00
pinctrl-ocelot.c Pin control changes for the v6.2 kernel cycle: 2022-12-13 13:03:06 -08:00
pinctrl-oxnas.c pinctrl: Get rid of duplicate of_node assignment in the drivers 2021-12-16 04:18:30 +01:00
pinctrl-palmas.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_318.RULE 2022-06-10 14:51:36 +02:00
pinctrl-pic32.c pinctrl: Get rid of duplicate of_node assignment in the drivers 2021-12-16 04:18:30 +01:00
pinctrl-pic32.h
pinctrl-pistachio.c pinctrl: pistachio: Correct the fwnode_irq_get() return value check 2022-09-08 15:18:58 +02:00
pinctrl-rk805.c pinctrl: Propagate firmware node from a parent device 2021-12-22 03:09:56 +01:00
pinctrl-rockchip.c Core changes: 2023-02-22 11:05:56 -08:00
pinctrl-rockchip.h pinctrl: rockchip: Add RV1126 pinctrl support 2022-08-22 09:51:08 +02:00
pinctrl-single.c pinctrl: single: fix potential NULL dereference 2023-01-27 13:43:55 +01:00
pinctrl-st.c intel-pinctrl for v6.1-2 2022-10-26 09:58:29 +02:00
pinctrl-stmfx.c pinctrl: stmfx: Add missing header(s) 2022-10-24 17:06:47 +03:00
pinctrl-sx150x.c pinctrl: sx150x: Convert to i2c's .probe_new() 2023-01-16 13:40:32 +01:00
pinctrl-tb10x.c
pinctrl-thunderbay.c pinctrl: thunderbay: Drop empty platform remove function 2022-12-29 02:03:51 +01:00
pinctrl-utils.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_318.RULE 2022-06-10 14:51:36 +02:00
pinctrl-utils.h pinctrl: Clean up headers 2022-10-24 17:06:48 +03:00
pinctrl-xway.c pinctrl: Get rid of duplicate of_node assignment in the drivers 2021-12-16 04:18:30 +01:00
pinctrl-zynq.c pinctrl: zynq: use module_platform_driver to simplify the code 2022-03-15 01:46:13 +01:00
pinctrl-zynqmp.c Pin control changes for the v6.2 kernel cycle: 2022-12-13 13:03:06 -08:00
pinmux.c pinctrl: pinmux: Drop duplicate error message in pinmux_select() 2023-01-10 09:03:27 +01:00
pinmux.h pinctrl: Clean up headers 2022-10-24 17:06:48 +03:00