linux-block.git
8 months agopinctrl: airoha: Add support for EN7581 SoC
Lorenzo Bianconi [Tue, 22 Oct 2024 23:20:05 +0000 (01:20 +0200)]
pinctrl: airoha: Add support for EN7581 SoC

Introduce pinctrl driver for EN7581 SoC. Current EN7581 pinctrl driver
supports the following functionalities:
- pin multiplexing
- pin pull-up, pull-down, open-drain, current strength,
  {input,output}_enable, output_{low,high}
- gpio controller
- irq controller

Tested-by: Benjamin Larsson <benjamin.larsson@genexis.eu>
Co-developed-by: Benjamin Larsson <benjamin.larsson@genexis.eu>
Signed-off-by: Benjamin Larsson <benjamin.larsson@genexis.eu>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/20241023-en7581-pinctrl-v9-5-afb0cbcab0ec@kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 months agodt-bindings: mfd: Add support for Airoha EN7581 GPIO System Controller
Christian Marangi [Tue, 22 Oct 2024 23:20:04 +0000 (01:20 +0200)]
dt-bindings: mfd: Add support for Airoha EN7581 GPIO System Controller

Add support for Airoha EN7581 GPIO System Controller which provide a
register map for controlling the GPIO, pinctrl and PWM of the SoC via
dedicated pinctrl and pwm child nodes.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/20241023-en7581-pinctrl-v9-4-afb0cbcab0ec@kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 months agodt-bindings: pwm: airoha: Add EN7581 pwm
Lorenzo Bianconi [Tue, 22 Oct 2024 23:20:03 +0000 (01:20 +0200)]
dt-bindings: pwm: airoha: Add EN7581 pwm

Introduce device-tree binding documentation for Airoha EN7581 pwm
controller.

Co-developed-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/20241023-en7581-pinctrl-v9-3-afb0cbcab0ec@kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 months agodt-bindings: pinctrl: airoha: Add EN7581 pinctrl
Lorenzo Bianconi [Tue, 22 Oct 2024 23:20:02 +0000 (01:20 +0200)]
dt-bindings: pinctrl: airoha: Add EN7581 pinctrl

Introduce device-tree binding documentation for Airoha EN7581 pinctrl
controller.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/20241023-en7581-pinctrl-v9-2-afb0cbcab0ec@kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 months agodt-bindings: arm: airoha: Add the chip-scu node for EN7581 SoC
Lorenzo Bianconi [Tue, 22 Oct 2024 23:20:01 +0000 (01:20 +0200)]
dt-bindings: arm: airoha: Add the chip-scu node for EN7581 SoC

This patch adds the chip-scu document bindings for EN7581 SoC.
The airoha chip-scu block provides a configuration interface for clock,
io-muxing and other functionalities used by multiple controllers (e.g.
clock, pinctrl, ecc.) on EN7581 SoC.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/20241023-en7581-pinctrl-v9-1-afb0cbcab0ec@kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 months agoMerge tag 'samsung-pinctrl-6.13' of https://git.kernel.org/pub/scm/linux/kernel/git...
Linus Walleij [Tue, 29 Oct 2024 10:04:08 +0000 (11:04 +0100)]
Merge tag 'samsung-pinctrl-6.13' of https://git./linux/kernel/git/pinctrl/samsung into devel

Samsung pinctrl drivers changes for v6.13

1. Add new pin controller drivers for new Samsung SoCs: Exynos8895,
   Exynos9810, Exynos990.

2. Correct the condition when applying further interrupt constraints on
   certain Samsung pin controllers.  The condition was simply not
   effective.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 months agopinctrl: aspeed-g6: Support drive-strength for GPIOF/G
Billy Tsai [Wed, 23 Oct 2024 10:44:06 +0000 (18:44 +0800)]
pinctrl: aspeed-g6: Support drive-strength for GPIOF/G

Add drive strength configuration support for GPIO F and G groups.

Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
Reviewed-by: Andrew Jeffery <andrew@codeconstruct.com.au>
Link: https://lore.kernel.org/20241023104406.4083460-1-billy_tsai@aspeedtech.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 months agopinctrl: spacemit: fix double free of map
Dan Carpenter [Wed, 23 Oct 2024 08:39:47 +0000 (11:39 +0300)]
pinctrl: spacemit: fix double free of map

The map pointer is freed by pinctrl_utils_free_map().  It must not be a
devm_ pointer or it leads to a double free when the device is unloaded.

This is similar to a couple bugs Harshit Mogalapalli fixed earlier in
commits 3fd976afe974 ("pinctrl: nuvoton: fix a double free in
ma35_pinctrl_dt_node_to_map_func()") and 4575962aeed6 ("pinctrl: sophgo:
fix double free in cv1800_pctrl_dt_node_to_map()").

Fixes: a83c29e1d145 ("pinctrl: spacemit: add support for SpacemiT K1 SoC")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Yixun Lan <dlan@gentoo.org>
Link: https://lore.kernel.org/4b5f1306-dc01-4edc-96d3-b232b930ddf2@stanley.mountain
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 months agodt-bindings: pinctrl: convert pinctrl-mcp23s08.txt to yaml format
Himanshu Bhavani [Mon, 28 Oct 2024 06:39:11 +0000 (12:09 +0530)]
dt-bindings: pinctrl: convert pinctrl-mcp23s08.txt to yaml format

YAML binding file provides the conversion of the original text-based
binding for the pinctrl-mcp23s08 to microchip,mcp23s08.yaml.

following compatible strings using the deprecated mcp prefix have been
removed from this binding:

- mcp,mcp23s08
- mcp,mcp23s17
- mcp,mcp23008
- mcp,mcp23017

Signed-off-by: Himanshu Bhavani <himanshu.bhavani@siliconsignals.io>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/20241028063939.6276-1-himanshu.bhavani@siliconsignals.io
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 months agopinctrl: samsung: Add Exynos9810 SoC specific data
Markuss Broks [Sat, 26 Oct 2024 20:32:39 +0000 (23:32 +0300)]
pinctrl: samsung: Add Exynos9810 SoC specific data

Add Samsung Exynos9810 SoC specific data to enable pinctrl
support for platforms based on Exynos9810.

Co-developed-by: Maksym Holovach <nergzd@nergzd723.xyz>
Signed-off-by: Maksym Holovach <nergzd@nergzd723.xyz>
Signed-off-by: Markuss Broks <markuss.broks@gmail.com>
Link: https://lore.kernel.org/r/20241026-exynos9810-v3-8-b89de9441ea8@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
8 months agodt-bindings: pinctrl: samsung: Add compatible for exynos9810-wakeup-eint
Markuss Broks [Sat, 26 Oct 2024 20:32:35 +0000 (23:32 +0300)]
dt-bindings: pinctrl: samsung: Add compatible for exynos9810-wakeup-eint

Add the compatible for Samsung Exynos9810 pinctrl eint block
to the schema. It is compatible with Exynos850 EINT controller,
and doesn't have a dedicated IRQ line.

Co-developed-by: Maksym Holovach <nergzd@nergzd723.xyz>
Signed-off-by: Maksym Holovach <nergzd@nergzd723.xyz>
Signed-off-by: Markuss Broks <markuss.broks@gmail.com>
Link: https://lore.kernel.org/r/20241026-exynos9810-v3-4-b89de9441ea8@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
8 months agodt-bindings: pinctrl: samsung: Add compatible for Exynos9810 SoC
Markuss Broks [Sat, 26 Oct 2024 20:32:34 +0000 (23:32 +0300)]
dt-bindings: pinctrl: samsung: Add compatible for Exynos9810 SoC

Add a compatible for Samsung Exynos9810 pinctrl block to the schema.
Exynos9810 has 9 total pin banks and it's similar to other Samsung
SoC pinctrl blocks.

Co-developed-by: Maksym Holovach <nergzd@nergzd723.xyz>
Signed-off-by: Maksym Holovach <nergzd@nergzd723.xyz>
Signed-off-by: Markuss Broks <markuss.broks@gmail.com>
Link: https://lore.kernel.org/r/20241026-exynos9810-v3-3-b89de9441ea8@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
8 months agodt-bindings: pinctrl: qcom,sm8650-lpass-lpi-pinctrl: Add SM8750
Krzysztof Kozlowski [Tue, 22 Oct 2024 06:42:45 +0000 (08:42 +0200)]
dt-bindings: pinctrl: qcom,sm8650-lpass-lpi-pinctrl: Add SM8750

Document compatible for Qualcomm SM8750 SoC LPASS TLMM pin controller,
fully compatible with previous SM8650 generation (same amount of pins
and functions).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/20241022064245.22983-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinmux: Use sequential access to access desc->pinmux data
Mukesh Ojha [Mon, 14 Oct 2024 19:29:30 +0000 (00:59 +0530)]
pinmux: Use sequential access to access desc->pinmux data

When two client of the same gpio call pinctrl_select_state() for the
same functionality, we are seeing NULL pointer issue while accessing
desc->mux_owner.

Let's say two processes A, B executing in pin_request() for the same pin
and process A updates the desc->mux_usecount but not yet updated the
desc->mux_owner while process B see the desc->mux_usecount which got
updated by A path and further executes strcmp and while accessing
desc->mux_owner it crashes with NULL pointer.

Serialize the access to mux related setting with a mutex lock.

cpu0 (process A) cpu1(process B)

pinctrl_select_state() {   pinctrl_select_state() {
  pin_request() { pin_request() {
  ...
 ....
    } else {
         desc->mux_usecount++;
     desc->mux_usecount && strcmp(desc->mux_owner, owner)) {

         if (desc->mux_usecount > 1)
               return 0;
         desc->mux_owner = owner;

  } }

Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
Link: https://lore.kernel.org/20241014192930.1539673-1-quic_mojha@quicinc.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agodt-bindings: pinctrl: fsl,imx6ul-pinctrl: Convert i.MX35/5x/6 to YAML
Marek Vasut [Thu, 17 Oct 2024 21:11:18 +0000 (23:11 +0200)]
dt-bindings: pinctrl: fsl,imx6ul-pinctrl: Convert i.MX35/5x/6 to YAML

The IOMUXC controller description is almost identical on i.MX35/5x/6 SoCs,
except for the configuration bits which differ across SoCs. Rename the
fsl,imx6ul-pinctrl.yaml to fsl,imx35-pinctrl.yaml, fill in compatible
strings for the other SoCs and fill in the various bits into desciption.
This way, i.MX35/5x/6 series SoCs can all be converted to DT schema.
Remove the old text DT bindings description.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Marek Vasut <marex@denx.de>
Link: https://lore.kernel.org/20241017211241.170861-1-marex@denx.de
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: imx-scmi: Drop obsolete dependency on COMPILE_TEST
Jean Delvare [Tue, 22 Oct 2024 11:40:17 +0000 (13:40 +0200)]
pinctrl: imx-scmi: Drop obsolete dependency on COMPILE_TEST

Since commit 0166dc11be91 ("of: make CONFIG_OF user selectable"), OF
can be enabled on all architectures. Therefore depending on
COMPILE_TEST as an alternative is no longer needed.

As ARM_SCMI_PROTOCOL already depends on COMPILE_TEST, we also don't
need to add COMPILE_TEST as an alternative dependency for it.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Link: https://lore.kernel.org/20241022134017.172411db@endymion.delvare
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: qcom: add support for TLMM on SAR2130P
Dmitry Baryshkov [Fri, 18 Oct 2024 08:42:40 +0000 (11:42 +0300)]
pinctrl: qcom: add support for TLMM on SAR2130P

Add driver for the pincontrol device as present on the Qualcomm
SAR2130P platform. This is based on the msm-5.10 tree, tag
KERNEL.PLATFORM.1.0.r4-00400-NEO.0.

Co-developed-by: Mayank Grover <groverm@codeaurora.org>
Signed-off-by: Mayank Grover <groverm@codeaurora.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/20241018-sar2130p-tlmm-v2-2-11a1d09a6e5f@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agodt-bindings: pinctrl : qcom: document SAR2130P TLMM
Dmitry Baryshkov [Fri, 18 Oct 2024 08:42:39 +0000 (11:42 +0300)]
dt-bindings: pinctrl : qcom: document SAR2130P TLMM

Add bindings for the pin controller (TLMM) present on the
Qualcomm SAR2130P platform.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/20241018-sar2130p-tlmm-v2-1-11a1d09a6e5f@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: qcom: add the tlmm driver for QCS8300 platforms
Jingyi Wang [Fri, 18 Oct 2024 03:19:32 +0000 (11:19 +0800)]
pinctrl: qcom: add the tlmm driver for QCS8300 platforms

Add support for QCS8300 TLMM configuration and control via the
pinctrl framework.

Signed-off-by: Jingyi Wang <quic_jingyw@quicinc.com>
Link: https://lore.kernel.org/20241018-qcs8300_tlmm-v3-2-8b8d3957cf1a@quicinc.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agodt-bindings: pinctrl: describe qcs8300-tlmm
Jingyi Wang [Fri, 18 Oct 2024 03:19:31 +0000 (11:19 +0800)]
dt-bindings: pinctrl: describe qcs8300-tlmm

Add DT bindings for the TLMM controller on QCS8300 platforms.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Jingyi Wang <quic_jingyw@quicinc.com>
Link: https://lore.kernel.org/20241018-qcs8300_tlmm-v3-1-8b8d3957cf1a@quicinc.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agoMerge tag 'renesas-pinctrl-for-v6.13-tag1' of git://git.kernel.org/pub/scm/linux...
Linus Walleij [Sat, 19 Oct 2024 18:18:03 +0000 (20:18 +0200)]
Merge tag 'renesas-pinctrl-for-v6.13-tag1' of git://git./linux/kernel/git/geert/renesas-drivers into devel

pinctrl: renesas: Updates for v6.13

  - Marks GPIOs as used on RZ/A1 and RZ/A2,
  - Add open-drain and schmitt-trigger support on RZ/V2H(P),
  - Miscellaneous fixes and improvements.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: spacemit: add support for SpacemiT K1 SoC
Yixun Lan [Wed, 16 Oct 2024 00:59:42 +0000 (08:59 +0800)]
pinctrl: spacemit: add support for SpacemiT K1 SoC

SpacemiT's K1 SoC has a pinctrl controller which use single register
to describe all functions, which include bias pull up/down(strong pull),
drive strength, schmitter trigger, slew rate, mux mode.

Signed-off-by: Yixun Lan <dlan@gentoo.org>
Link: https://lore.kernel.org/20241016-02-k1-pinctrl-v5-2-03d395222e4f@gentoo.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agodt-bindings: pinctrl: spacemit: add support for K1 SoC
Yixun Lan [Wed, 16 Oct 2024 00:59:41 +0000 (08:59 +0800)]
dt-bindings: pinctrl: spacemit: add support for K1 SoC

Add dt-bindings for the pinctrl driver of SpacemiT's K1 SoC.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Yixun Lan <dlan@gentoo.org>
Link: https://lore.kernel.org/20241016-02-k1-pinctrl-v5-1-03d395222e4f@gentoo.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: samsung: Add Exynos 990 SoC pinctrl configuration
Igor Belwon [Wed, 16 Oct 2024 15:48:38 +0000 (17:48 +0200)]
pinctrl: samsung: Add Exynos 990 SoC pinctrl configuration

Add SoC pinctrl configuration for the Exynos 990. The bank types
used are the same as Exynos 850, so we can reuse its macros.

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
Link: https://lore.kernel.org/r/20241016154838.64515-4-igor.belwon@mentallysanemainliners.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
9 months agodt-bindings: pinctrl: samsung: Add exynos990-wakeup-eint compatible
Igor Belwon [Wed, 16 Oct 2024 15:48:37 +0000 (17:48 +0200)]
dt-bindings: pinctrl: samsung: Add exynos990-wakeup-eint compatible

Add a dedicated compatible for the exynos990-wakeup-eint node.
This SoC pin controller does not mux interrupts. It's compatible with
Exynos 850's node, while also being compatible with the Exynos7
fallback.

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
Link: https://lore.kernel.org/r/20241016154838.64515-3-igor.belwon@mentallysanemainliners.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
9 months agodt-bindings: pinctrl: samsung: Add exynos990-pinctrl compatible
Igor Belwon [Wed, 16 Oct 2024 15:48:36 +0000 (17:48 +0200)]
dt-bindings: pinctrl: samsung: Add exynos990-pinctrl compatible

Add a dedicated compatible for the exynos990-pinctrl node.

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
Link: https://lore.kernel.org/r/20241016154838.64515-2-igor.belwon@mentallysanemainliners.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
9 months agopinctrl: th1520: Fix potential null pointer dereference on func
Colin Ian King [Wed, 16 Oct 2024 15:56:55 +0000 (16:56 +0100)]
pinctrl: th1520: Fix potential null pointer dereference on func

The initialization of muxtype deferences pointer func before func
is sanity checked with a null pointer check, hence we have a null
pointer deference issue. Fix this by only deferencing func with
the assignment to muxtype after func has been null pointer checked.

Fixes: 1fc30cd92770 ("pinctrl: th1520: Factor out casts")
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reported-by: Kees Bakker <kees@ijzerbout.nl>
Acked-by: Drew Fustini <dfustini@tenstorrent.com>
Link: https://lore.kernel.org/20241016155655.334518-1-colin.i.king@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: sophgo: fix typo in tristate of SG2002
Thomas Bonnefille [Wed, 16 Oct 2024 10:11:42 +0000 (12:11 +0200)]
pinctrl: sophgo: fix typo in tristate of SG2002

Fix typo in tristate definition of the SG2002 Pinctrl driver.

Signed-off-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
Link: https://lore.kernel.org/20241016-typo-pinctrl-sg2002-v1-1-2bdacb2d41e3@bootlin.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agodt-bindings: pinctrl: samsung: Add missing constraint for Exynos8895 interrupts
Krzysztof Kozlowski [Tue, 15 Oct 2024 06:58:48 +0000 (08:58 +0200)]
dt-bindings: pinctrl: samsung: Add missing constraint for Exynos8895 interrupts

Expect only one interrupt on Exynos8895 wake-up pin controller.

Fixes: e2d58d1e1c61 ("dt-bindings: pinctrl: samsung: add exynos8895-wakeup-eint compatible")
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20241015065848.29429-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
9 months agodt-bindings: pinctrl: samsung: Fix interrupt constraint for variants with fallbacks
Krzysztof Kozlowski [Tue, 15 Oct 2024 06:58:47 +0000 (08:58 +0200)]
dt-bindings: pinctrl: samsung: Fix interrupt constraint for variants with fallbacks

Commit 904140fa4553 ("dt-bindings: pinctrl: samsung: use Exynos7
fallbacks for newer wake-up controllers") added
samsung,exynos7-wakeup-eint fallback to some compatibles, so the
intention in the if:then: conditions was to handle the cases:

1. Single Exynos7 compatible or Exynos5433+Exynos7 or
   Exynos7885+Exynos7: only one interrupt

2. Exynos850+Exynos7: no interrupts

This was not implemented properly however and if:then: block matches
only single Exynos5433 or Exynos7885 compatibles, which do not exist in
DTS anymore, so basically is a no-op and no enforcement on number of
interrupts is made by the binding.

Fix the if:then: condition so interrupts in the Exynos5433 and
Exynos7885 wake-up pin controller will be properly constrained.

Fixes: 904140fa4553 ("dt-bindings: pinctrl: samsung: use Exynos7 fallbacks for newer wake-up controllers")
Cc: stable@vger.kernel.org
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20241015065848.29429-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
9 months agopinctrl: PINCTRL_K230 should depend on ARCH_CANAAN
Geert Uytterhoeven [Tue, 15 Oct 2024 09:55:58 +0000 (11:55 +0200)]
pinctrl: PINCTRL_K230 should depend on ARCH_CANAAN

The Canaan Kendryte K230 pin controller is only present on Canaan
Kendryte K230 SoCs.  Hence add a dependency on ARCH_CANAAN, to prevent
asking the user about this driver when configuring a kernel without
Canaan Kendryte series SoC platform support.

Fixes: 545887eab6f6776a ("pinctrl: canaan: Add support for k230 SoC")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/d70279ba02a67250203744b38314f4475b3c5671.1728986052.git.geert+renesas@glider.be
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: th1520: add a CONFIG_OF dependency
Arnd Bergmann [Tue, 15 Oct 2024 15:11:13 +0000 (15:11 +0000)]
pinctrl: th1520: add a CONFIG_OF dependency

When compile-testing without CONfIG_OF:

drivers/pinctrl/pinctrl-th1520.c: In function 'th1520_pinctrl_dt_node_to_map':
drivers/pinctrl/pinctrl-th1520.c:455:23: error: implicit declaration of function 'pinconf_generic_parse_dt_config'; did you mean 'pinconf_generic_dump_config'? [-Wimplicit-function-declaration]
  455 |                 ret = pinconf_generic_parse_dt_config(child, pctldev, &configs, &nconfigs);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                       pinconf_generic_dump_config

Enforce this using Kconig dependencies.

Fixes: bed5cd6f8a98 ("pinctrl: Add driver for the T-Head TH1520 SoC")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Drew Fustini <drew@pdp7.com>
Link: https://lore.kernel.org/20241015151126.2401855-1-arnd@kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: renesas: Select PINCTRL_RZG2L for RZ/V2H(P) SoC
Lad Prabhakar [Thu, 10 Oct 2024 13:27:26 +0000 (14:27 +0100)]
pinctrl: renesas: Select PINCTRL_RZG2L for RZ/V2H(P) SoC

Add explicit selection of the PINCTRL_RZG2L config option for the
RZ/V2H(P) (R9A09G057) SoC, ensuring pin control driver is enabled
for this SoC.

Fixes: 9bd95ac86e70 ("pinctrl: renesas: rzg2l: Add support for RZ/V2H SoC")
Reported-by: Biju Das <biju.das.jz@bp.renesas.com>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20241010132726.702658-1-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
9 months agopinctrl: renesas: rzg2l: Add support for configuring schmitt-trigger
Lad Prabhakar [Fri, 4 Oct 2024 12:36:58 +0000 (13:36 +0100)]
pinctrl: renesas: rzg2l: Add support for configuring schmitt-trigger

Add support for configuring the multiplexed pins as schmitt-trigger
inputs.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Link: https://lore.kernel.org/20241004123658.764557-4-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
9 months agopinctrl: renesas: rzg2l: Add support for enabling/disabling open-drain outputs
Lad Prabhakar [Fri, 4 Oct 2024 12:36:57 +0000 (13:36 +0100)]
pinctrl: renesas: rzg2l: Add support for enabling/disabling open-drain outputs

Add support for enabling and disabling open-drain outputs.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Link: https://lore.kernel.org/20241004123658.764557-3-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
9 months agopinctrl: amd: Fix two small typos
Marc Ferland [Wed, 9 Oct 2024 15:12:49 +0000 (11:12 -0400)]
pinctrl: amd: Fix two small typos

Found those two while reading the code:

EDGE_TRAGGER -> EDGE_TRIGGER
BOTH_EADGE -> BOTH_EDGES

No functional changes, compile tested only.

Signed-off-by: Marc Ferland <marc.ferland@sonatest.com>
Link: https://lore.kernel.org/20241009151249.2086702-1-marc.ferland@sonatest.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: Switch back to struct platform_driver::remove()
Uwe Kleine-König [Mon, 7 Oct 2024 20:58:05 +0000 (22:58 +0200)]
pinctrl: Switch back to struct platform_driver::remove()

After commit 0edb555a65d1 ("platform: Make platform_driver::remove()
return void") .remove() is (again) the right callback to implement for
platform drivers.

Convert all platform drivers below drivers/pinctrl to use .remove(),
with the eventual goal to drop struct platform_driver::remove_new(). As
.remove() and .remove_new() have the same prototypes, conversion is done
by just changing the structure member name in the driver initializer.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/20241007205803.444994-8-u.kleine-koenig@baylibre.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: th1520: Factor out casts
Emil Renner Berthing [Fri, 11 Oct 2024 14:48:25 +0000 (16:48 +0200)]
pinctrl: th1520: Factor out casts

Limit the casts to get the mux data and flags from the driver data
pointer with each pin to two inline functions as requested by Andy
during review.

Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
Reviewed-by: Drew Fustini <dfustini@tenstorrent.com>
Tested-by: Drew Fustini <dfustini@tenstorrent.com>
Link: https://lore.kernel.org/20241011144826.381104-4-emil.renner.berthing@canonical.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: th1520: Update pinmux tables
Emil Renner Berthing [Fri, 11 Oct 2024 14:48:24 +0000 (16:48 +0200)]
pinctrl: th1520: Update pinmux tables

When Drew took over the pinctrl driver it seems like he didn't use the
git tree I pointed him at and thus missed some important fixes to the
tables describing valid pinmux settings.

The documentation has a nice overview table of these settings but
unfortunately it doesn't fully match the register descriptions, which
seem to be the correct version.

Fixes: bed5cd6f8a98 ("pinctrl: Add driver for the T-Head TH1520 SoC")
Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
Reviewed-by: Drew Fustini <dfustini@tenstorrent.com>
Tested-by: Drew Fustini <dfustini@tenstorrent.com>
Link: https://lore.kernel.org/20241011144826.381104-3-emil.renner.berthing@canonical.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: th1520: Fix pinconf return values
Emil Renner Berthing [Fri, 11 Oct 2024 14:48:23 +0000 (16:48 +0200)]
pinctrl: th1520: Fix pinconf return values

When Drew took over the pinctrl driver he must have changed
all the -ENOTSUPP returns into -EOPNOTSUPP. This subtle change
was most likely not spotted because it was never mentioned in the
changelog of the patchset, but it breaks all the places in the
pin control and GPIO frameworks where -ENOTSUPP is expected.

Fixes: bed5cd6f8a98 ("pinctrl: Add driver for the T-Head TH1520 SoC")
Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
Reviewed-by: Drew Fustini <dfustini@tenstorrent.com>
Tested-by: Drew Fustini <dfustini@tenstorrent.com>
Link: https://lore.kernel.org/20241011144826.381104-2-emil.renner.berthing@canonical.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: zynqmp: drop excess struct member description
Bartosz Golaszewski [Thu, 10 Oct 2024 08:04:32 +0000 (10:04 +0200)]
pinctrl: zynqmp: drop excess struct member description

The 'node' member has never been part of this structure so drop its
description.

Fixes: 8b242ca700f8 ("pinctrl: Add Xilinx ZynqMP pinctrl driver support")
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/20241010080432.7781-1-brgl@bgdev.pl
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: aw9523: fix kerneldoc for _aw9523_gpio_get_multiple()
Bartosz Golaszewski [Thu, 10 Oct 2024 08:03:47 +0000 (10:03 +0200)]
pinctrl: aw9523: fix kerneldoc for _aw9523_gpio_get_multiple()

The parameters' descriptions are wrong, drop the invalid ones and
document the ones that are missing the description.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/20241010080347.7759-1-brgl@bgdev.pl
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: s32: add missing pins definitions
Andrei Stefanescu [Wed, 2 Oct 2024 13:59:18 +0000 (16:59 +0300)]
pinctrl: s32: add missing pins definitions

Added definitions for some pins which were missing from the
S32G2 SIUL2 pinctrl driver. These pins are used by the JTAG,
PFE and LLCE hardware modules.

Reviewed-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Andrei Stefanescu <andrei.stefanescu@oss.nxp.com>
Link: https://lore.kernel.org/20241002135920.3647322-2-andrei.stefanescu@oss.nxp.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: th1520: Convert dt child node loop to scoped iterator
Drew Fustini [Wed, 9 Oct 2024 01:16:48 +0000 (18:16 -0700)]
pinctrl: th1520: Convert dt child node loop to scoped iterator

Convert th1520_pinctrl_dt_node_to_map() to use a scoped iterator with
for_each_available_child_of_node_scoped(). As a result, there is no need
to call of_node_put() anymore. The put_child label has been renamed to
free_map which is now a more accurate description.

Suggested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Drew Fustini <dfustini@tenstorrent.com>
Link: https://lore.kernel.org/20241008-th1520-pinctrl-fixes-v3-3-5b60db446a49@tenstorrent.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: th1520: Convert thp->mutex to guarded mutex
Drew Fustini [Wed, 9 Oct 2024 01:16:47 +0000 (18:16 -0700)]
pinctrl: th1520: Convert thp->mutex to guarded mutex

Convert th1520_pinctrl_dt_node_to_map() to use guarded mutex for
thp->mutex.

Suggested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Drew Fustini <dfustini@tenstorrent.com>
Link: https://lore.kernel.org/20241008-th1520-pinctrl-fixes-v3-2-5b60db446a49@tenstorrent.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: th1520: Fix return value for unknown pin error
Drew Fustini [Wed, 9 Oct 2024 01:16:46 +0000 (18:16 -0700)]
pinctrl: th1520: Fix return value for unknown pin error

Fix th1520_pinctrl_dt_node_to_map() to set the return value before
jumping to free_configs when an unknown pin error occurs.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202410022336.xyWlV0Tf-lkp@intel.com/
Signed-off-by: Drew Fustini <dfustini@tenstorrent.com>
Link: https://lore.kernel.org/20241008-th1520-pinctrl-fixes-v3-1-5b60db446a49@tenstorrent.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agodt-bindings: pinctrl: renesas,rzg2l-pinctrl: Allow schmitt and open drain properties
Lad Prabhakar [Fri, 4 Oct 2024 12:36:56 +0000 (13:36 +0100)]
dt-bindings: pinctrl: renesas,rzg2l-pinctrl: Allow schmitt and open drain properties

On the RZ/V2H(P) SoC one can configure the 'input-schmitt-{enable,disable}',
'drive-open-drain' and 'drive-push-pull' of multiplexed pins. Update the
binding documentation to include these properties.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/20241004123658.764557-2-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
9 months agopinctrl: renesas: rzg2l: Fix missing return in rzg2l_pinctrl_register()
Biju Das [Thu, 3 Oct 2024 08:25:48 +0000 (09:25 +0100)]
pinctrl: renesas: rzg2l: Fix missing return in rzg2l_pinctrl_register()

Fix the missing return statement in the error path of
rzg2l_pinctrl_register().

Fixes: f73f63b24491fa43 ("pinctrl: renesas: rzg2l: Use dev_err_probe()")
Reported-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Closes: https://lore.kernel.org/all/OS0PR01MB638837327E5487B71D88A70392712@OS0PR01MB6388.jpnprd01.prod.outlook.com/
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20241003082550.33341-1-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
9 months agopinctrl: renesas: rzg2l: Remove RZG2L_TINT_IRQ_START_INDEX
Fabrizio Castro [Mon, 30 Sep 2024 14:52:40 +0000 (15:52 +0100)]
pinctrl: renesas: rzg2l: Remove RZG2L_TINT_IRQ_START_INDEX

The RZ/V2H(P) SoC has 16 IRQ interrupts, while every other SoC has 8,
and this affects the start index of TINT interrupts (1 + 16 = 17, rather
than 1 + 8 = 9).
Macro RZG2L_TINT_IRQ_START_INDEX cannot work anymore, replace it with a
new member within struct rzg2l_hwcfg.

Signed-off-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Link: https://lore.kernel.org/20240930145244.356565-2-fabrizio.castro.jz@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
9 months agopinctrl: k230: Drop unused code
Linus Walleij [Thu, 3 Oct 2024 14:44:43 +0000 (16:44 +0200)]
pinctrl: k230: Drop unused code

The build robot complains about unused code. Let's drop it,
this can be restored with simple git revert when needed.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202410021136.ie3cFM2w-lkp@intel.com/
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/20241003-k320-unused-v1-1-72e65bc2f27b@linaro.org
9 months agopinctrl: imx27: Fix too generic defines
Linus Walleij [Thu, 3 Oct 2024 14:16:47 +0000 (16:16 +0200)]
pinctrl: imx27: Fix too generic defines

The "PC" define is colliding with the (apparently broadcased)
define for "program counter" on Loongarch, so let's rename all
these 2-letter defines so they don't collide with stuff.

Fixes: a55222b7a132 ("pinctrl: freescale: enable use with COMPILE_TEST")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202410030214.dPrgmUqd-lkp@intel.com/
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/20241003-fix-imx27-pc-v1-1-0e78d1fc6175@linaro.org
9 months agopinctrl: aw9523: use devm_mutex_init
Rosen Penev [Thu, 3 Oct 2024 21:47:46 +0000 (14:47 -0700)]
pinctrl: aw9523: use devm_mutex_init

Simplifies probe by removing all gotos and removing mutex_destroy from
_remove.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://lore.kernel.org/20241003214746.146207-1-rosenp@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: aw9523: add missing mutex_destroy
Rosen Penev [Tue, 1 Oct 2024 21:27:22 +0000 (14:27 -0700)]
pinctrl: aw9523: add missing mutex_destroy

Otherwise the mutex remains after a failed kzalloc.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://lore.kernel.org/20241001212724.309320-1-rosenp@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: freescale: fix COMPILE_TEST error with PINCTRL_IMX_SCU
Esben Haabendal [Thu, 3 Oct 2024 09:23:09 +0000 (11:23 +0200)]
pinctrl: freescale: fix COMPILE_TEST error with PINCTRL_IMX_SCU

When PINCTRL_IMX_SCU was selected by PINCTRL_IMX8DXL or PINCTRL_IMX8QM
combined with COMPILE_TEST on a non-arm platforms, the IMX_SCU
dependency could not be enabled.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202410031439.GyTSa0kX-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202410030852.q0Hukplf-lkp@intel.com/
Signed-off-by: Esben Haabendal <esben@geanix.com>
Link: https://lore.kernel.org/20241003-imx-pinctrl-compile-test-fix-v1-1-145ca1948cc3@geanix.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: thead1520: Fix Null pointer dereference
clingfei [Thu, 3 Oct 2024 02:33:07 +0000 (10:33 +0800)]
pinctrl: thead1520: Fix Null pointer dereference

pinmux_generic_get_function may return NULL, and its retval is
dereferenced without check, which will cause a NULL pointer
dereference.

Signed-off-by: clingfei <clf700383@gmail.com>
Reviewed-by: Drew Fustini <dfustini@tenstorrent.com>
Link: https://lore.kernel.org/20241003023307.2138695-1-clf700383@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: imx1: Fix too generic defines
Linus Walleij [Wed, 2 Oct 2024 14:18:36 +0000 (16:18 +0200)]
pinctrl: imx1: Fix too generic defines

The "PC" define is colliding with the (apparently broadcased)
define for "program counter" on Loongarch, so let's rename all
these 2-letter defines so they don't collide with stuff.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202410020940.wGISlWfV-lkp@intel.com/
Fixes: a55222b7a132 ("pinctrl: freescale: enable use with COMPILE_TEST")
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: rockchip: improve error message for incorrect rockchip,pins property
Quentin Schulz [Wed, 2 Oct 2024 12:03:03 +0000 (14:03 +0200)]
pinctrl: rockchip: improve error message for incorrect rockchip,pins property

If one improperly writes a rockchip,pins property, the pinctrl driver
basically just states that one in the myriad of pinctrl nodes is
improper but does not tell you which one.

Instead, let's print the full name of the Device Tree node that is
improper as well as provide more context on what the expected content
is.

Note that this should be rather unnecessary if one reads the output of
the dtbs_check as it would be highlighted as an error.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/20241002-pinctrl-rockchip-error-modulo-4-v1-1-4addb4e5732a@cherry.de
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: aw9523: use enable for regulator
Rosen Penev [Tue, 1 Oct 2024 21:27:23 +0000 (14:27 -0700)]
pinctrl: aw9523: use enable for regulator

devm_regulator_get_enable_optional can be used to simplify the logic
here.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://lore.kernel.org/20241001212724.309320-2-rosenp@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: samsung: Add exynos8895 SoC pinctrl configuration
Ivaylo Ivanov [Fri, 20 Sep 2024 15:45:03 +0000 (18:45 +0300)]
pinctrl: samsung: Add exynos8895 SoC pinctrl configuration

Add support for the pin-controller found on the Exynos8895 SoC
used in Samsung Galaxy S8 and S8 Plus phones.

It has a newly applied pinctrl register layer for FSYS0 with a
different bank type offset that consists of the following bit
fields:

CON: 4, DAT: 1, PUD: 2, DRV: 3, CONPDN: 2, PUDPDN: 2

Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20240920154508.1618410-6-ivo.ivanov.ivanov1@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
9 months agodt-bindings: pinctrl: samsung: add exynos8895-wakeup-eint compatible
Ivaylo Ivanov [Fri, 20 Sep 2024 15:45:04 +0000 (18:45 +0300)]
dt-bindings: pinctrl: samsung: add exynos8895-wakeup-eint compatible

Add a dedicated compatible for exynos8895.

Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20240920154508.1618410-7-ivo.ivanov.ivanov1@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
9 months agodt-bindings: pinctrl: samsung: Add compatible for Exynos8895 SoC
Ivaylo Ivanov [Fri, 20 Sep 2024 15:45:02 +0000 (18:45 +0300)]
dt-bindings: pinctrl: samsung: Add compatible for Exynos8895 SoC

Add compatible for Exynos8895 SoC.

Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20240920154508.1618410-5-ivo.ivanov.ivanov1@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
9 months agopinctrl: sx150x: Use maple tree register cache
Mark Brown [Tue, 24 Sep 2024 15:39:18 +0000 (17:39 +0200)]
pinctrl: sx150x: Use maple tree register cache

The sx150x driver uses a rbtree register cache with no obvious reason for
specifically preferring it. The maple tree register cache is based on a
more modern data structure and makes implementation decisions more suitable
for modern systems so let's switch the driver to use that. No functional
change.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/20240924-pinctl-sx150x-maple-v1-1-17dcfefefd17@kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: aw9523: Drop explicit initialization of struct i2c_device_id::driver_data...
Uwe Kleine-König [Fri, 20 Sep 2024 15:34:31 +0000 (17:34 +0200)]
pinctrl: aw9523: Drop explicit initialization of struct i2c_device_id::driver_data to 0

These drivers don't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.

This prepares putting driver_data in an anonymous union which requires
either no initialization or named designators. But it's also a nice
cleanup on its own.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/20240920153430.503212-13-u.kleine-koenig@baylibre.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: qcom: add the tlmm driver for QCS615 platform
Lijuan Gao [Fri, 20 Sep 2024 08:00:10 +0000 (16:00 +0800)]
pinctrl: qcom: add the tlmm driver for QCS615 platform

Add support for QCS615 TLMM configuration and control via the
pinctrl framework.

Signed-off-by: Lijuan Gao <quic_lijuang@quicinc.com>
Link: https://lore.kernel.org/20240920-add_qcs615_pinctrl_driver-v2-2-e03c42a9d055@quicinc.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agodt-bindings: pinctrl: document the QCS615 Top Level Mode Multiplexer
Lijuan Gao [Fri, 20 Sep 2024 08:00:09 +0000 (16:00 +0800)]
dt-bindings: pinctrl: document the QCS615 Top Level Mode Multiplexer

Document the Top Level Mode Multiplexer on the QCS615 Platform.
It concisely explains the pin multiplexing and configuration in
the device tree, and includes simple examples of typical device
tree snippets, making it easier for designers to configure and
manage chip pins.

Signed-off-by: Lijuan Gao <quic_lijuang@quicinc.com>
Link: https://lore.kernel.org/20240920-add_qcs615_pinctrl_driver-v2-1-e03c42a9d055@quicinc.com
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agodt-bindings: pinctrl: amlogic,meson-pinctrl: lower gpio-line-names minItems for meson8b
Neil Armstrong [Wed, 11 Sep 2024 15:24:38 +0000 (17:24 +0200)]
dt-bindings: pinctrl: amlogic,meson-pinctrl: lower gpio-line-names minItems for meson8b

The Amlogic Meson8b SoC has 83 CBUS GPIOs, thus lower the minItems
for gpio-line-names to account for it, fixing DTBs check on Meson8b
based boards.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/20240911-topic-amlogic-arm32-upstream-bindings-fixes-meson-pinctrl-gpio-line-names-v1-1-4345ba336ea4@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: canaan: Add support for k230 SoC
Ze Huang [Thu, 26 Sep 2024 15:57:44 +0000 (23:57 +0800)]
pinctrl: canaan: Add support for k230 SoC

Configuration of the K230 is similar to that of the K210. However, in
K210, the 256 functions for each pin are shared, whereas in K230,
multiplex functions are different for every pin.

`drv_data` of `pinctrl_pin_desc` is pointing to currently activated
group, which is used to print the name of current function of pin in
`pin_dbg_show` and will be updated in `set_mux`, so they are not set
const.

Signed-off-by: Ze Huang <18771902331@163.com>
Link: https://lore.kernel.org/20240926-k230-pinctrl-v2-2-a9a36fba4b34@163.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agodt-bindings: pinctrl: Add support for canaan,k230 SoC
Ze Huang [Thu, 26 Sep 2024 15:57:43 +0000 (23:57 +0800)]
dt-bindings: pinctrl: Add support for canaan,k230 SoC

Add device tree binding details for Canaan K230 pinctrl device.

Signed-off-by: Ze Huang <18771902331@163.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/20240926-k230-pinctrl-v2-1-a9a36fba4b34@163.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: qcom: Introduce IPQ5424 TLMM driver
Sricharan Ramabadhran [Fri, 27 Sep 2024 06:52:40 +0000 (12:22 +0530)]
pinctrl: qcom: Introduce IPQ5424 TLMM driver

The IPQ5424 SoC comes with a TLMM block, like all other Qualcomm
platforms, so add a driver for it.

Co-developed-by: Varadarajan Narayanan <quic_varada@quicinc.com>
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
Link: https://lore.kernel.org/20240927065244.3024604-6-quic_srichara@quicinc.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agodt-bindings: pinctrl: qcom: add IPQ5424 pinctrl
Sricharan Ramabadhran [Fri, 27 Sep 2024 06:52:38 +0000 (12:22 +0530)]
dt-bindings: pinctrl: qcom: add IPQ5424 pinctrl

Add device tree bindings for IPQ5424 TLMM block.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
Link: https://lore.kernel.org/20240927065244.3024604-4-quic_srichara@quicinc.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agoMerge branch 'ib-thead-th1520' into devel
Linus Walleij [Tue, 1 Oct 2024 12:05:16 +0000 (14:05 +0200)]
Merge branch 'ib-thead-th1520' into devel

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: Add driver for the T-Head TH1520 SoC
Emil Renner Berthing [Mon, 30 Sep 2024 19:50:52 +0000 (12:50 -0700)]
pinctrl: Add driver for the T-Head TH1520 SoC

Add pinctrl driver for the T-Head TH1520 RISC-V SoC.

Tested-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
[dfustini: use thead,pad-group to identify the pin controller instance]
Signed-off-by: Drew Fustini <dfustini@tenstorrent.com>
Link: https://lore.kernel.org/20240930-th1520-pinctrl-v3-2-32cea2bdbecb@tenstorrent.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agodt-bindings: pinctrl: Add thead,th1520-pinctrl bindings
Emil Renner Berthing [Mon, 30 Sep 2024 19:50:51 +0000 (12:50 -0700)]
dt-bindings: pinctrl: Add thead,th1520-pinctrl bindings

Add bindings for the pin controllers on the T-Head TH1520 RISC-V SoC.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Tested-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
[dfustini: add thead,pad-group to select the pin controller instance]
Signed-off-by: Drew Fustini <dfustini@tenstorrent.com>
Link: https://lore.kernel.org/20240930-th1520-pinctrl-v3-1-32cea2bdbecb@tenstorrent.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: ocelot: add support for lan969x SoC pinctrl
Daniel Machon [Tue, 17 Sep 2024 12:45:41 +0000 (14:45 +0200)]
pinctrl: ocelot: add support for lan969x SoC pinctrl

This adds support for lan969x SoC pinctrl, reusing the existing ocelot
driver. There are 66 General Purpose I/O pins that are individually
configurable to multiple interfaces.

Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
Link: https://lore.kernel.org/20240917-lan969x-pinctrl-v2-2-ea02cbc56831@microchip.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agodt-bindings: ocelot: document lan969x-pinctrl
Daniel Machon [Tue, 17 Sep 2024 12:45:40 +0000 (14:45 +0200)]
dt-bindings: ocelot: document lan969x-pinctrl

Lan969x is going to reuse the existing Ocelot pinctrl driver - document
that by adding compatible strings for the different SKU's that we
support.

Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/20240917-lan969x-pinctrl-v2-1-ea02cbc56831@microchip.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: freescale: enable use with COMPILE_TEST
Esben Haabendal [Mon, 6 May 2024 10:23:55 +0000 (12:23 +0200)]
pinctrl: freescale: enable use with COMPILE_TEST

Allow compile-testing of i.MX pinctrl drivers using CONFIG_COMPILE_TEST.

Signed-off-by: Esben Haabendal <esben@geanix.com>
Link: https://lore.kernel.org/20240506-imx-pinctrl-optional-v2-3-bdff75085156@geanix.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: freescale: Use CONFIG_SOC_IMXRT to guard i.MX RT1xxx drivers
Esben Haabendal [Mon, 6 May 2024 10:23:54 +0000 (12:23 +0200)]
pinctrl: freescale: Use CONFIG_SOC_IMXRT to guard i.MX RT1xxx drivers

This aligns with the use of SOC_IMX* as dependencies for all the other
mach-imx pinctrl drivers. Enabling i.MX RT pinctrl drivers for a kernel
with out i.MX RT SOC support is pointless.

Signed-off-by: Esben Haabendal <esben@geanix.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/20240506-imx-pinctrl-optional-v2-2-bdff75085156@geanix.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agoARM: imx: Allow user to disable pinctrl
Esben Haabendal [Mon, 6 May 2024 10:23:53 +0000 (12:23 +0200)]
ARM: imx: Allow user to disable pinctrl

Making pinctrl drivers and subsequently the pinctrl framework
user-controllable, allows building a kernel without this.
While in many (most) cases, this could make the system unbootable, it
does allow building smaller kernels for those situations where picntrl
is not needed.

One such situation is when building a kernel for NXP LS1021A systems,
which does not have run-time controllable pinctrl, so pinctrl framework
and drivers are 100% dead-weight.

Signed-off-by: Esben Haabendal <esben@geanix.com>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/20240506-imx-pinctrl-optional-v2-1-bdff75085156@geanix.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agodt-bindings: pinctrl: Add SA8255p TLMM
Nikunj Kela [Thu, 5 Sep 2024 20:02:18 +0000 (13:02 -0700)]
dt-bindings: pinctrl: Add SA8255p TLMM

Add compatible for TLMM block representing support on SA8255p.

SA8255p uses the same TLMM block as SA8775p however the ownership
of pins are split between Firmware VM and Linux VM on SA8255p. For
example, pins used by UART are owned and configured by Firmware VM
while pins used by ethernet are owned and configured by Linux VM.
Therefore, adding a sa8255p specific compatible to mark the difference.

Signed-off-by: Nikunj Kela <quic_nkela@quicinc.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/20240905200218.3810712-1-quic_nkela@quicinc.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: k210: Make (p)clk local to k210_fpioa_probe()
Geert Uytterhoeven [Wed, 4 Sep 2024 09:08:53 +0000 (11:08 +0200)]
pinctrl: k210: Make (p)clk local to k210_fpioa_probe()

There were never any users of k210_fpioa_data.clk and
k210_fpioa_data.pclk outside k210_fpioa_probe().

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/77f543046d4d5c19206f829ddcf8e093d3e3f6da.1725440917.git.geert+renesas@glider.be
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: pinctrl-zynqmp: Add support for Versal platform
Sai Krishna Potthuri [Fri, 6 Sep 2024 11:01:13 +0000 (16:31 +0530)]
pinctrl: pinctrl-zynqmp: Add support for Versal platform

Add Pinctrl support for Xilinx Versal platform.
Driver checks for firmware support to retrieve the Pin information, if it
is supported then proceed further otherwise it returns error saying
operation not supported. Latest Xilinx Platform Management Firmware must
be used to make use of the Pinctrl driver for Versal platform.

Signed-off-by: Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>
Link: https://lore.kernel.org/20240906110113.3154327-4-sai.krishna.potthuri@amd.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agofirmware: xilinx: Add Pinctrl Get Attribute ID
Sai Krishna Potthuri [Fri, 6 Sep 2024 11:01:12 +0000 (16:31 +0530)]
firmware: xilinx: Add Pinctrl Get Attribute ID

Add Pinctrl Get Attribute ID to the query ids list.

Signed-off-by: Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>
Link: https://lore.kernel.org/20240906110113.3154327-3-sai.krishna.potthuri@amd.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agodt-bindings: pinctrl: Add support for Xilinx Versal platform
Sai Krishna Potthuri [Fri, 6 Sep 2024 11:01:11 +0000 (16:31 +0530)]
dt-bindings: pinctrl: Add support for Xilinx Versal platform

Add Xilinx Versal compatible string and corresponding groups, function and
pins properties to support pin controller features on Versal platform.

Signed-off-by: Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/20240906110113.3154327-2-sai.krishna.potthuri@amd.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 months agopinctrl: renesas: rza1: Mark GPIOs as used
Wolfram Sang [Mon, 30 Sep 2024 19:14:43 +0000 (21:14 +0200)]
pinctrl: renesas: rza1: Mark GPIOs as used

GPIOs showed up as unclaimed, so they could be muxed to something else
even though they were in use. Mark GPIOs as claimed to avoid that.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20240930191523.7030-2-wsa+renesas@sang-engineering.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
9 months agopinctrl: renesas: rza2: Mark GPIOs as used
Geert Uytterhoeven [Mon, 30 Sep 2024 15:47:19 +0000 (17:47 +0200)]
pinctrl: renesas: rza2: Mark GPIOs as used

GPIOs showed up as unclaimed in debugfs, so they could be muxed to
something else even though they were in use.  Mark GPIOs as claimed when
in use to avoid that.

Reported-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/2862093f7701dcaf29f37c0b2f9268234168338f.1727711124.git.geert+renesas@glider.be
9 months agoLinux 6.12-rc1 v6.12-rc1
Linus Torvalds [Sun, 29 Sep 2024 22:06:19 +0000 (15:06 -0700)]
Linux 6.12-rc1

9 months agox86: kvm: fix build error
Linus Torvalds [Sun, 29 Sep 2024 21:47:33 +0000 (14:47 -0700)]
x86: kvm: fix build error

The cpu_emergency_register_virt_callback() function is used
unconditionally by the x86 kvm code, but it is declared (and defined)
conditionally:

  #if IS_ENABLED(CONFIG_KVM_INTEL) || IS_ENABLED(CONFIG_KVM_AMD)
  void cpu_emergency_register_virt_callback(cpu_emergency_virt_cb *callback);
  ...

leading to a build error when neither KVM_INTEL nor KVM_AMD support is
enabled:

  arch/x86/kvm/x86.c: In function ‘kvm_arch_enable_virtualization’:
  arch/x86/kvm/x86.c:12517:9: error: implicit declaration of function ‘cpu_emergency_register_virt_callback’ [-Wimplicit-function-declaration]
  12517 |         cpu_emergency_register_virt_callback(kvm_x86_ops.emergency_disable_virtualization_cpu);
        |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  arch/x86/kvm/x86.c: In function ‘kvm_arch_disable_virtualization’:
  arch/x86/kvm/x86.c:12522:9: error: implicit declaration of function ‘cpu_emergency_unregister_virt_callback’ [-Wimplicit-function-declaration]
  12522 |         cpu_emergency_unregister_virt_callback(kvm_x86_ops.emergency_disable_virtualization_cpu);
        |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fix the build by defining empty helper functions the same way the old
cpu_emergency_disable_virtualization() function was dealt with for the
same situation.

Maybe we could instead have made the call sites conditional, since the
callers (kvm_arch_{en,dis}able_virtualization()) have an empty weak
fallback.  I'll leave that to the kvm people to argue about, this at
least gets the build going for that particular config.

Fixes: 590b09b1d88e ("KVM: x86: Register "emergency disable" callbacks when virt is enabled")
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Sean Christopherson <seanjc@google.com>
Cc: Kai Huang <kai.huang@intel.com>
Cc: Chao Gao <chao.gao@intel.com>
Cc: Farrah Chen <farrah.chen@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 months agoMerge tag 'mailbox-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar...
Linus Torvalds [Sun, 29 Sep 2024 16:53:04 +0000 (09:53 -0700)]
Merge tag 'mailbox-v6.12' of git://git./linux/kernel/git/jassibrar/mailbox

Pull mailbox updates from Jassi Brar:

 - fix kconfig dependencies (mhu-v3, omap2+)

 - use devie name instead of genereic imx_mu_chan as interrupt name
   (imx)

 - enable sa8255p and qcs8300 ipc controllers (qcom)

 - Fix timeout during suspend mode (bcm2835)

 - convert to use use of_property_match_string (mailbox)

 - enable mt8188 (mediatek)

 - use devm_clk_get_enabled helpers (spreadtrum)

 - fix device-id typo (rockchip)

* tag 'mailbox-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox:
  mailbox, remoteproc: omap2+: fix compile testing
  dt-bindings: mailbox: qcom-ipcc: Document QCS8300 IPCC
  dt-bindings: mailbox: qcom-ipcc: document the support for SA8255p
  dt-bindings: mailbox: mtk,adsp-mbox: Add compatible for MT8188
  mailbox: Use of_property_match_string() instead of open-coding
  mailbox: bcm2835: Fix timeout during suspend mode
  mailbox: sprd: Use devm_clk_get_enabled() helpers
  mailbox: rockchip: fix a typo in module autoloading
  mailbox: imx: use device name in interrupt name
  mailbox: ARM_MHU_V3 should depend on ARM64

9 months agoMerge tag 'i2c-for-6.12-rc1-additional_fixes' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Sun, 29 Sep 2024 16:47:33 +0000 (09:47 -0700)]
Merge tag 'i2c-for-6.12-rc1-additional_fixes' of git://git./linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:

 - fix DesignWare driver ENABLE-ABORT sequence, ensuring ABORT can
   always be sent when needed

 - check for PCLK in the SynQuacer controller as an optional clock,
   allowing ACPI to directly provide the clock rate

 - KEBA driver Kconfig dependency fix

 - fix XIIC driver power suspend sequence

* tag 'i2c-for-6.12-rc1-additional_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: xiic: Fix pm_runtime_set_suspended() with runtime pm enabled
  i2c: keba: I2C_KEBA should depend on KEBA_CP500
  i2c: synquacer: Deal with optional PCLK correctly
  i2c: designware: fix controller is holding SCL low while ENABLE bit is disabled

9 months agoMerge tag 'dma-mapping-6.12-2024-09-29' of git://git.infradead.org/users/hch/dma...
Linus Torvalds [Sun, 29 Sep 2024 16:35:10 +0000 (09:35 -0700)]
Merge tag 'dma-mapping-6.12-2024-09-29' of git://git.infradead.org/users/hch/dma-mapping

Pull dma-mapping fix from Christoph Hellwig:

 - handle chained SGLs in the new tracing code (Christoph Hellwig)

* tag 'dma-mapping-6.12-2024-09-29' of git://git.infradead.org/users/hch/dma-mapping:
  dma-mapping: fix DMA API tracing for chained scatterlists

9 months agoMerge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Sun, 29 Sep 2024 16:22:34 +0000 (09:22 -0700)]
Merge tag 'scsi-misc' of git://git./linux/kernel/git/jejb/scsi

Pull more SCSI updates from James Bottomley:
 "These are mostly minor updates.

  There are two drivers (lpfc and mpi3mr) which missed the initial
  pull and a core change to retry a start/stop unit which affect
  suspend/resume"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (32 commits)
  scsi: lpfc: Update lpfc version to 14.4.0.5
  scsi: lpfc: Support loopback tests with VMID enabled
  scsi: lpfc: Revise TRACE_EVENT log flag severities from KERN_ERR to KERN_WARNING
  scsi: lpfc: Ensure DA_ID handling completion before deleting an NPIV instance
  scsi: lpfc: Fix kref imbalance on fabric ndlps from dev_loss_tmo handler
  scsi: lpfc: Restrict support for 32 byte CDBs to specific HBAs
  scsi: lpfc: Update phba link state conditional before sending CMF_SYNC_WQE
  scsi: lpfc: Add ELS_RSP cmd to the list of WQEs to flush in lpfc_els_flush_cmd()
  scsi: mpi3mr: Update driver version to 8.12.0.0.50
  scsi: mpi3mr: Improve wait logic while controller transitions to READY state
  scsi: mpi3mr: Update MPI Headers to revision 34
  scsi: mpi3mr: Use firmware-provided timestamp update interval
  scsi: mpi3mr: Enhance the Enable Controller retry logic
  scsi: sd: Fix off-by-one error in sd_read_block_characteristics()
  scsi: pm8001: Do not overwrite PCI queue mapping
  scsi: scsi_debug: Remove a useless memset()
  scsi: pmcraid: Convert comma to semicolon
  scsi: sd: Retry START STOP UNIT commands
  scsi: mpi3mr: A performance fix
  scsi: ufs: qcom: Update MODE_MAX cfg_bw value
  ...

9 months agoMerge tag 'bcachefs-2024-09-28' of git://evilpiepirate.org/bcachefs
Linus Torvalds [Sun, 29 Sep 2024 16:17:44 +0000 (09:17 -0700)]
Merge tag 'bcachefs-2024-09-28' of git://evilpiepirate.org/bcachefs

Pull more bcachefs updates from Kent Overstreet:
 "Assorted minor syzbot fixes, and for bigger stuff:

  Fix two disk accounting rewrite bugs:

   - Disk accounting keys use the version field of bkey so that journal
     replay can tell which updates have been applied to the btree.

     This is set in the transaction commit path, after we've gotten our
     journal reservation (and our time ordering), but the
     BCH_TRANS_COMMIT_skip_accounting_apply flag that journal replay
     uses was incorrectly skipping this for new updates generated prior
     to journal replay.

     This fixes the underlying cause of an assertion pop in
     disk_accounting_read.

   - A couple of fixes for disk accounting + device removal.

     Checking if acocunting replicas entries were marked in the
     superblock was being done at the wrong point, when deltas in the
     journal could still zero them out, and then additionally we'd try
     to add a missing replicas entry to the superblock without checking
     if it referred to an invalid (removed) device.

  A whole slew of repair fixes:

   - fix infinite loop in propagate_key_to_snapshot_leaves(), this fixes
     an infinite loop when repairing a filesystem with many snapshots

   - fix incorrect transaction restart handling leading to occasional
     "fsck counted ..." warnings

   - fix warning in __bch2_fsck_err() for bkey fsck errors

   - check_inode() in fsck now correctly checks if the filesystem was
     clean

   - there shouldn't be pending logged ops if the fs was clean, we now
     check for this

   - remove_backpointer() doesn't remove a dirent that doesn't actually
     point to the inode

   - many more fsck errors are AUTOFIX"

* tag 'bcachefs-2024-09-28' of git://evilpiepirate.org/bcachefs: (35 commits)
  bcachefs: check_subvol_path() now prints subvol root inode
  bcachefs: remove_backpointer() now checks if dirent points to inode
  bcachefs: dirent_points_to_inode() now warns on mismatch
  bcachefs: Fix lost wake up
  bcachefs: Check for logged ops when clean
  bcachefs: BCH_FS_clean_recovery
  bcachefs: Convert disk accounting BUG_ON() to WARN_ON()
  bcachefs: Fix BCH_TRANS_COMMIT_skip_accounting_apply
  bcachefs: Check for accounting keys with bversion=0
  bcachefs: rename version -> bversion
  bcachefs: Don't delete unlinked inodes before logged op resume
  bcachefs: Fix BCH_SB_ERRS() so we can reorder
  bcachefs: Fix fsck warnings from bkey validation
  bcachefs: Move transaction commit path validation to as late as possible
  bcachefs: Fix disk accounting attempting to mark invalid replicas entry
  bcachefs: Fix unlocked access to c->disk_sb.sb in bch2_replicas_entry_validate()
  bcachefs: Fix accounting read + device removal
  bcachefs: bch_accounting_mode
  bcachefs: fix transaction restart handling in check_extents(), check_dirents()
  bcachefs: kill inode_walker_entry.seen_this_pos
  ...

9 months agoMerge tag 'x86-urgent-2024-09-29' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 29 Sep 2024 16:10:00 +0000 (09:10 -0700)]
Merge tag 'x86-urgent-2024-09-29' of git://git./linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
 "Fix TDX MMIO #VE fault handling, and add two new Intel model numbers
  for 'Pantherlake' and 'Diamond Rapids'"

* tag 'x86-urgent-2024-09-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/cpu: Add two Intel CPU model numbers
  x86/tdx: Fix "in-kernel MMIO" check

9 months agoMerge tag 'locking-urgent-2024-09-29' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 29 Sep 2024 15:51:30 +0000 (08:51 -0700)]
Merge tag 'locking-urgent-2024-09-29' of git://git./linux/kernel/git/tip/tip

Pull locking updates from Ingo Molnar:
 "lockdep:
    - Fix potential deadlock between lockdep and RCU (Zhiguo Niu)
    - Use str_plural() to address Coccinelle warning (Thorsten Blum)
    - Add debuggability enhancement (Luis Claudio R. Goncalves)

  static keys & calls:
    - Fix static_key_slow_dec() yet again (Peter Zijlstra)
    - Handle module init failure correctly in static_call_del_module()
      (Thomas Gleixner)
    - Replace pointless WARN_ON() in static_call_module_notify() (Thomas
      Gleixner)

  <linux/cleanup.h>:
    - Add usage and style documentation (Dan Williams)

  rwsems:
    - Move is_rwsem_reader_owned() and rwsem_owner() under
      CONFIG_DEBUG_RWSEMS (Waiman Long)

  atomic ops, x86:
    - Redeclare x86_32 arch_atomic64_{add,sub}() as void (Uros Bizjak)
    - Introduce the read64_nonatomic macro to x86_32 with cx8 (Uros
      Bizjak)"

Signed-off-by: Ingo Molnar <mingo@kernel.org>
* tag 'locking-urgent-2024-09-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  locking/rwsem: Move is_rwsem_reader_owned() and rwsem_owner() under CONFIG_DEBUG_RWSEMS
  jump_label: Fix static_key_slow_dec() yet again
  static_call: Replace pointless WARN_ON() in static_call_module_notify()
  static_call: Handle module init failure correctly in static_call_del_module()
  locking/lockdep: Simplify character output in seq_line()
  lockdep: fix deadlock issue between lockdep and rcu
  lockdep: Use str_plural() to fix Coccinelle warning
  cleanup: Add usage and style documentation
  lockdep: suggest the fix for "lockdep bfs error:-1" on print_bfs_bug
  locking/atomic/x86: Redeclare x86_32 arch_atomic64_{add,sub}() as void
  locking/atomic/x86: Introduce the read64_nonatomic macro to x86_32 with cx8

9 months agoMerge tag 'cocci-for-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall...
Linus Torvalds [Sun, 29 Sep 2024 15:44:28 +0000 (08:44 -0700)]
Merge tag 'cocci-for-6.12' of git://git./linux/kernel/git/jlawall/linux

Pull coccinelle updates from Julia Lawall:
 "Extend string_choices.cocci to use more available helpers

  Ten patches from Hongbo Li extending string_choices.cocci with the
  complete set of functions offered by include/linux/string_choices.h.

  One patch from myself reducing the number of redundant cases that are
  checked by Coccinelle, giving a small performance improvement"

* tag 'cocci-for-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux:
  Reduce Coccinelle choices in string_choices.cocci
  coccinelle: Remove unnecessary parentheses for only one possible change.
  coccinelle: Add rules to find str_yes_no() replacements
  coccinelle: Add rules to find str_on_off() replacements
  coccinelle: Add rules to find str_write_read() replacements
  coccinelle: Add rules to find str_read_write() replacements
  coccinelle: Add rules to find str_enable{d}_disable{d}() replacements
  coccinelle: Add rules to find str_lo{w}_hi{gh}() replacements
  coccinelle: Add rules to find str_hi{gh}_lo{w}() replacements
  coccinelle: Add rules to find str_false_true() replacements
  coccinelle: Add rules to find str_true_false() replacements

9 months agoMerge tag 'linux_kselftest-next-6.12-rc1-fixes' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Sun, 29 Sep 2024 15:37:03 +0000 (08:37 -0700)]
Merge tag 'linux_kselftest-next-6.12-rc1-fixes' of git://git./linux/kernel/git/shuah/linux-kselftest

Pull kselftest fix from Shuah Khan:
 "One urgent fix to vDSO as automated testing is failing due to this
  bug"

* tag 'linux_kselftest-next-6.12-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
  selftests: vDSO: align stack for O2-optimized memcpy

9 months agoMerge branch 'locking/core' into locking/urgent, to pick up pending commits
Ingo Molnar [Sun, 29 Sep 2024 06:57:18 +0000 (08:57 +0200)]
Merge branch 'locking/core' into locking/urgent, to pick up pending commits

Merge all pending locking commits into a single branch.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
9 months agoReduce Coccinelle choices in string_choices.cocci
Julia Lawall [Sat, 28 Sep 2024 19:26:22 +0000 (21:26 +0200)]
Reduce Coccinelle choices in string_choices.cocci

The isomorphism neg_if_exp negates the test of a ?: conditional,
making it unnecessary to have an explicit case for a negated test
with the branches inverted.

At the same time, we can disable neg_if_exp in cases where a
different API function may be more suitable for a negated test.

Finally, in the non-patch cases, E matches an expression with
parentheses around it, so there is no need to mention ()
explicitly in the pattern.  The () are still needed in the patch
cases, because we want to drop them, if they are present.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
9 months agococcinelle: Remove unnecessary parentheses for only one possible change.
Hongbo Li [Wed, 11 Sep 2024 01:09:27 +0000 (09:09 +0800)]
coccinelle: Remove unnecessary parentheses for only one possible change.

The parentheses are only needed if there is a disjunction, ie a
set of possible changes. If there is only one pattern, we can
remove these parentheses. Just like the format:

  -  x
  +  y

not:

  (
  -  x
  +  y
  )

Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
9 months agococcinelle: Add rules to find str_yes_no() replacements
Hongbo Li [Wed, 11 Sep 2024 01:09:26 +0000 (09:09 +0800)]
coccinelle: Add rules to find str_yes_no() replacements

As other rules done, we add rules for str_yes_no()
to check the relative opportunities.

Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>