linux/drivers/pinctrl/qcom
Krzysztof Kozlowski 0f482ad7b1 pinctrl: qcom: lpass-lpi: fix concurrent register updates
[ Upstream commit c8befdc411 ]

The Qualcomm LPASS LPI pin controller driver uses one lock for guarding
Read-Modify-Write code for slew rate registers.  However the pin
configuration and muxing registers have exactly the same RMW code but
are not protected.

Pin controller framework does not provide locking here, thus it is
possible to trigger simultaneous change of pin configuration registers
resulting in non-atomic changes.

Protect from concurrent access by re-using the same lock used to cover
the slew rate register.  Using the same lock instead of adding second
one will make more sense, once we add support for newer Qualcomm SoC,
where slew rate is configured in the same register as pin
configuration/muxing.

Fixes: 6e261d1090 ("pinctrl: qcom: Add sm8250 lpass lpi pinctrl driver")
Cc: stable@vger.kernel.org
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231013145705.219954-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2023-11-08 17:26:35 +01:00
..
Kconfig pinctrl: qcom: fix unmet dependencies on GPIOLIB for GPIOLIB_IRQCHIP 2021-12-08 09:04:38 +01:00
Makefile drivers: qcom: pinctrl: Add pinctrl driver for sm6115 2021-07-31 23:23:06 +02:00
pinctrl-apq8064.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 284 2019-06-05 17:36:37 +02:00
pinctrl-apq8084.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 284 2019-06-05 17:36:37 +02:00
pinctrl-ipq4019.c pinctrl: qcom: ipq4019: add open drain support 2020-07-16 10:46:24 +02:00
pinctrl-ipq6018.c pinctrl: qcom: ipq6018 Add missing pins in qpic pin group 2020-06-20 22:05:24 +02:00
pinctrl-ipq8064.c ipq8064: pinctrl: Fixed missing RGMII pincontrol definitions 2020-02-21 16:23:26 +01:00
pinctrl-ipq8074.c pinctrl: qcom: ipq8074: route gpio interrupts to APPS 2020-07-11 23:11:00 +02:00
pinctrl-lpass-lpi.c pinctrl: qcom: lpass-lpi: fix concurrent register updates 2023-11-08 17:26:35 +01:00
pinctrl-mdm9607.c pinctrl: qcom: Add MDM9607 pinctrl driver 2021-07-23 17:44:13 +02:00
pinctrl-mdm9615.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 284 2019-06-05 17:36:37 +02:00
pinctrl-msm.c pinctrl: Bulk conversion to generic_handle_domain_irq() 2021-08-12 11:39:39 +01:00
pinctrl-msm.h pinctrl: qcom: Allow SoCs to specify a GPIO function that's not 0 2021-01-18 16:07:08 +01:00
pinctrl-msm8x74.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 284 2019-06-05 17:36:37 +02:00
pinctrl-msm8226.c pinctrl: qcom: Add msm8226 pinctrl driver. 2020-08-27 10:27:14 +02:00
pinctrl-msm8660.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 284 2019-06-05 17:36:37 +02:00
pinctrl-msm8916.c pinctrl: qcom: msm8916: Allow CAMSS GP clocks to be muxed 2022-08-25 11:40:07 +02:00
pinctrl-msm8953.c pinctrl: qcom: add pinctrl driver for msm8953 2020-11-10 14:58:14 +01:00
pinctrl-msm8960.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 284 2019-06-05 17:36:37 +02:00
pinctrl-msm8976.c pinctrl: qcom: pinctrl-msm8976: Correct function names for wcss pins 2023-03-10 09:39:21 +01:00
pinctrl-msm8994.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 284 2019-06-05 17:36:37 +02:00
pinctrl-msm8996.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 284 2019-06-05 17:36:37 +02:00
pinctrl-msm8998.c pinctrl: msm8998: Squash TSIF pins together 2019-07-29 23:28:57 +02:00
pinctrl-qcs404.c This is the bulk of pin control changes for the v5.1 kernel cycle. 2019-03-11 11:12:50 -07:00
pinctrl-qdf2xxx.c pinctrl: qdf2xxx: Switch to use device_property_count_uXX() 2019-08-05 12:01:45 +02:00
pinctrl-sc7180.c pinctrl: qcom: Handle broken/missing PDC dual edge IRQs on sc7180 2020-07-16 15:41:41 +02:00
pinctrl-sc7280.c pinctrl: qcom: sc7280: Add PM suspend callbacks 2021-09-23 23:09:14 +02:00
pinctrl-sc8180x.c pinctrl: qcom: sc8180x: Fix wrong pin numbers 2022-09-23 14:15:47 +02:00
pinctrl-sdm660.c pinctrl: sdm660: Set tile property for pingroups 2018-11-19 15:40:55 +01:00
pinctrl-sdm845.c pinctrl: qcom: sdm845: Enable dual edge errata 2021-11-25 09:48:41 +01:00
pinctrl-sdx55.c pinctrl: qcom: Fix duplication in gpio_groups 2021-06-07 00:18:55 +02:00
pinctrl-sm6115.c drivers: qcom: pinctrl: Add pinctrl driver for sm6115 2021-07-31 23:23:06 +02:00
pinctrl-sm6125.c drivers: qcom: pinctrl: Add pinctrl driver for sm6125 2021-06-18 11:21:45 +02:00
pinctrl-sm8150.c pinctrl: qcom: Add SM8150 pinctrl driver 2019-07-04 09:47:13 +02:00
pinctrl-sm8250.c pinctrl: qcom: sm8250: Fix PDC map 2022-08-25 11:40:08 +02:00
pinctrl-sm8350.c pinctrl: qcom: sm8350: Correct UFS and SDC offsets 2021-11-25 09:48:41 +01:00
pinctrl-spmi-gpio.c pinctrl: qcom: spmi-gpio: correct parent irqspec translation 2021-09-17 01:06:44 +02:00
pinctrl-spmi-mpp.c pinctrl: qcom: spmi-mpp: Add compatible for pmi8994 2021-05-19 02:23:52 +02:00
pinctrl-ssbi-gpio.c pinctrl: qcom: spmi-gpio: Use fallthrough pseudo-keyword 2020-07-20 15:38:27 +02:00
pinctrl-ssbi-mpp.c pinctrl: remove empty lines in pinctrl subsystem 2021-01-05 16:09:24 +01:00