linux/drivers
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
..
accel - Daniel Verkamp has contributed a memfd series ("mm/memfd: add 2023-02-23 17:09:35 -08:00
accessibility
acpi More ACPI updates for 6.3-rc1 2023-03-03 10:36:01 -08:00
amba
android Char/Misc and other driver subsystem changes for 6.3-rc1 2023-02-24 12:47:33 -08:00
ata ata: ahci: Revert "ata: ahci: Add Tiger Lake UP{3,4} AHCI controller" 2023-03-03 18:43:02 +09:00
atm
auxdisplay
base A set of updates for the interrupt susbsystem: 2023-03-05 11:19:16 -08:00
bcma
block block-6.3-2023-03-03 2023-03-03 10:21:39 -08:00
bluetooth
bus ARM: SoC drivers for 6.3 2023-02-27 10:04:49 -08:00
cdrom
char Char/Misc and other driver subsystem changes for 6.3-rc1 2023-02-24 12:47:33 -08:00
clk We have one small patch to the clk core this time around. It fixes a corner 2023-02-25 15:16:23 -08:00
clocksource Updates for timekeeping, timers and clockevent/source drivers: 2023-02-21 09:45:13 -08:00
comedi
connector
counter
cpufreq More power management updates for 6.3-rc1 2023-03-03 10:30:58 -08:00
cpuidle ARM: SoC drivers for 6.3 2023-02-27 10:04:49 -08:00
crypto This push fixes a regression in the caam driver. 2023-03-05 11:32:30 -08:00
cxl cxl for v6.3 2023-02-25 09:19:23 -08:00
dax cxl for v6.3 2023-02-25 09:19:23 -08:00
dca
devfreq
dio
dma dmaengine updates for v6.3 2023-02-24 17:18:54 -08:00
dma-buf dma-buf: make kobj_type structure constant 2023-02-17 09:16:34 +01:00
edac - Add a driver for the RAS functionality on Xilinx's on chip memory 2023-02-21 08:10:03 -08:00
eisa
extcon
firewire Driver core changes for 6.3-rc1 2023-02-24 12:58:55 -08:00
firmware ARM: SoC drivers for 6.3 2023-02-27 10:04:49 -08:00
fpga Driver core changes for 6.3-rc1 2023-02-24 12:58:55 -08:00
fsi
gnss
gpio Driver core changes for 6.3-rc1 2023-02-24 12:58:55 -08:00
gpu drm-next-fixes for 6.3-rc1 2023-03-02 15:08:54 -08:00
greybus
hid Driver core changes for 6.3-rc1 2023-02-24 12:58:55 -08:00
hsi Driver core changes for 6.3-rc1 2023-02-24 12:58:55 -08:00
hte
hv Driver core changes for 6.3-rc1 2023-02-24 12:58:55 -08:00
hwmon - Core Frameworks 2023-02-23 15:03:05 -08:00
hwspinlock
hwtracing Driver core changes for 6.3-rc1 2023-02-24 12:58:55 -08:00
i2c i2c: gxp: fix an error code in probe 2023-03-03 21:00:54 +01:00
i3c I3C for 6.3 2023-02-28 16:05:01 -08:00
idle Power management updates for 6.3-rc1 2023-02-21 12:13:58 -08:00
iio Char/Misc and other driver subsystem changes for 6.3-rc1 2023-02-24 12:47:33 -08:00
infiniband v6.3 RDMA pull request 2023-02-24 15:11:03 -08:00
input ARM: SoC drivers for 6.3 2023-02-27 10:04:49 -08:00
interconnect SoC: DT changes for 6.3 2023-02-20 15:49:56 -08:00
iommu ARM: SoC drivers for 6.3 2023-02-27 10:04:49 -08:00
ipack Driver core changes for 6.3-rc1 2023-02-24 12:58:55 -08:00
irqchip ARM: 2023-02-25 11:30:21 -08:00
isdn
leds - Remove Drivers 2023-02-23 15:09:31 -08:00
macintosh powerpc updates for 6.3 2023-02-25 11:00:06 -08:00
mailbox mailbox: qcom-apcs-ipc: add IPQ5332 APSS clock support 2023-02-23 14:47:13 -06:00
mcb
md flexible-array transformations for 6.3-rc1 2023-02-25 12:53:42 -08:00
media ARM: SoC drivers for 6.3 2023-02-27 10:04:49 -08:00
memory ARM: SoC drivers for 6.3 2023-02-27 10:04:49 -08:00
memstick MMC core: 2023-02-27 09:47:26 -08:00
message
mfd Including fixes from wireless and netfilter. 2023-02-27 14:05:08 -08:00
misc ARM: SoC drivers for 6.3 2023-02-27 10:04:49 -08:00
mmc ARM: SoC drivers for 6.3 2023-02-27 10:04:49 -08:00
most
mtd This pull request contains updates for JFFS2, UBI and UBIFS 2023-03-01 09:06:51 -08:00
mux
net Including fixes from wireless and netfilter. 2023-02-27 14:05:08 -08:00
nfc nfc: fix memory leak of se_io context in nfc_genl_se_io 2023-02-26 14:55:13 +00:00
ntb
nubus
nvdimm virtio,vhost,vdpa: features, fixes 2023-02-25 11:48:02 -08:00
nvme block-6.3-2023-03-03 2023-03-03 10:21:39 -08:00
nvmem
of IOMMU Updates for Linux v6.3: 2023-02-24 13:40:13 -08:00
opp OPP: fix error checking in opp_migrate_dentry() 2023-02-16 13:48:53 +01:00
parisc
parport Char/Misc and other driver subsystem changes for 6.3-rc1 2023-02-24 12:47:33 -08:00
pci A set of updates for the interrupt susbsystem: 2023-03-05 11:19:16 -08:00
pcmcia Driver core changes for 6.3-rc1 2023-02-24 12:58:55 -08:00
peci
perf RISC-V Patches for the 6.3 Merge Window, Part 2 2023-03-03 09:32:51 -08:00
phy ARM: SoC drivers for 6.3 2023-02-27 10:04:49 -08:00
pinctrl pinctrl: qcom: Support OUTPUT_ENABLE; deprecate INPUT_ENABLE 2023-03-29 10:46:59 +02:00
platform power supply and reset changes for the v6.3 series 2023-02-24 17:04:23 -08:00
pnp
power power supply changes for the v6.3 series (part 2) 2023-03-03 16:33:28 -08:00
powercap More power management updates for 6.3-rc1 2023-03-03 10:30:58 -08:00
pps
ps3
ptp ptp: vclock: use mutex to fix "sleep on atomic" bug 2023-02-22 21:23:48 -08:00
pwm pwm: dwc: Use devm_pwmchip_add() 2023-02-20 12:26:35 +01:00
rapidio
ras
regulator regulator: Fixes for v6.3 2023-03-02 09:21:25 -08:00
remoteproc ARM: SoC drivers for 6.3 2023-02-27 10:04:49 -08:00
reset
rpmsg rpmsg updates for v6.3 2023-02-26 12:10:28 -08:00
rtc RTC for 6.3 2023-03-03 09:15:50 -08:00
s390 SCSI misc on 20230303 2023-03-03 14:41:50 -08:00
sbus
scsi SCSI misc on 20230303 2023-03-03 14:41:50 -08:00
sh sh updates for v6.3 2023-03-01 09:44:22 -08:00
siox
slimbus
soc ARM: SoC drivers for 6.3 2023-02-27 10:04:49 -08:00
soundwire soundwire updates for 6.3 2023-02-24 17:29:52 -08:00
spi spi: Fixes for v6.3 2023-03-02 09:25:38 -08:00
spmi
ssb
staging media updates for v6.3-rc1 2023-02-26 11:47:26 -08:00
target - Daniel Verkamp has contributed a memfd series ("mm/memfd: add 2023-02-23 17:09:35 -08:00
tc
tee Driver core changes for 6.3-rc1 2023-02-24 12:58:55 -08:00
thermal More thermal control updates for 6.3-rc1 2023-03-03 10:41:59 -08:00
thunderbolt Driver core changes for 6.3-rc1 2023-02-24 12:58:55 -08:00
tty vc_screen: don't clobber return value in vcs_read 2023-02-27 18:35:28 -08:00
ufs SCSI misc on 20230303 2023-03-03 14:41:50 -08:00
uio - Daniel Verkamp has contributed a memfd series ("mm/memfd: add 2023-02-23 17:09:35 -08:00
usb phy-for-6.3 2023-02-24 17:22:11 -08:00
vdpa virtio,vhost,vdpa: features, fixes 2023-02-25 11:48:02 -08:00
vfio VFIO updates for v6.3-rc1 2023-02-25 11:52:57 -08:00
vhost virtio,vhost,vdpa: features, fixes 2023-02-25 11:48:02 -08:00
video TTY/Serial driver updates for 6.3-rc1 2023-02-24 12:17:14 -08:00
virt virt/sev-guest: Return -EIO if certificate buffer is not large enough 2023-03-01 10:17:46 +01:00
virtio virtio,vhost,vdpa: features, fixes 2023-02-25 11:48:02 -08:00
vlynq
w1 Driver core changes for 6.3-rc1 2023-02-24 12:58:55 -08:00
watchdog linux-watchdog 6.3-rc1 tag 2023-03-02 11:12:01 -08:00
xen Driver core changes for 6.3-rc1 2023-02-24 12:58:55 -08:00
zorro
Kconfig
Makefile Kbuild updates for v6.3 2023-02-26 11:53:25 -08:00