Commit Graph

7404 Commits

Author SHA1 Message Date
Bartosz Golaszewski
d9d87d90cc treewide: rename GPIO set callbacks back to their original names
The conversion of all GPIO drivers to using the .set_rv() and
.set_multiple_rv() callbacks from struct gpio_chip (which - unlike their
predecessors - return an integer and allow the controller drivers to
indicate failures to users) is now complete and the legacy ones have
been removed. Rename the new callbacks back to their original names in
one sweeping change.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-08-07 10:07:06 +02:00
Linus Torvalds
186f3edfdd Pin control changes for v6.17
Core changes:
 
 - Open code PINCTRL_FUNCTION_DESC() instead of defining
   a complex macro only used in one place.
 
 - Add pinmux_generic_add_pinfunction() helper and
   use this in a few drivers.
 
 New drivers:
 
 - Amlogic S7, S7D and S6 pin control support.
 
 - Eswin EIC7700 pin control support.
 
 - Qualcomm PMIV0104, PM7550 and Milos pin control
   support.
 
   Because of unhelpful numbering schemes, the Qualcomm
   driver now needs to start to rely on SoC codenames.
 
 - STM32 HDP pin control support.
 
 - Mediatek MT8189 pin control support.
 
 Improvements:
 
 - Switch remaining pin control drivers over to the
   new GPIO set callback that provides a return value.
 
 - Support RSVD (reserved) pins in the STM32 driver.
 
 - Move many fixed assignments over to pinctrl_desc
   definitions.
 
 - Handle multiple TLMM regions in the Qualcomm driver.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEElDRnuGcz/wPCXQWMQRCzN7AZXXMFAmiN/SkACgkQQRCzN7AZ
 XXPeGw/7BMBf6Uuhs39qHjnLUUgp/H2yzRV7JB3Q99AZh++7mK0z4MchsZfjvXmv
 Ql2ADPHzmP9AJwSor/Ssvn4SrPwvC62IFBznB4eqPIL4UgWuIEYSJQNFMbZniFex
 kd8+7GAK7K5R5ReIWfUCs3xusO4+MShXZNKkWVaQZT+603kVznADGANBbEkOnXxY
 06JKEo++QuChvLMckGOzyW8zAOV68YM2VYaZkuxxCIaIwKoNzGPKDt8NpPvaIijE
 S6EhrhRiM595Jt+qAC6lWtwGnFL5DI69Au2IDzaOSyamNLBoA/bmUu9UWB6/HxW2
 yOhDW3DbXOB2xhUORlwCBtGsDyxLB9cIyBMjr6JantwPHdz8dzetxaTrwpuNdBQ+
 +BgTodEuZf+TXroUQZ5sPRycEKZm1rtO7ctiZ5bG+CtP8qXcc+enMmC8BSCNCWzl
 bMOLsvP4ZMOuVU2ryOvhqKnbWxLS2RV5nHChtTF2JoE4ZX0dN/dhvGOe/A4dINhG
 3Nb+ETmyEnid9PIPARYNy/7BkT92eEUQJlbI9qeU1AojGmRRQLS3+mJD9VcFSe1F
 /sjp5OYL2M/7SUpqBtlapLXN014gSAVV7zzQThndOYf8RJgohQkOWZsZUx7jyieA
 4VYQzLWKAfP/IdOnKzM/8mAHw6VT9gJiWtNsc8ZdeYMwhYGSbbM=
 =hEj7
 -----END PGP SIGNATURE-----

Merge tag 'pinctrl-v6.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull pin control updates from Linus Walleij:
 "Nothing stands out, apart from maybe the interesting Eswin EIC7700, a
  RISC-V SoC I've never seen before.

  Core changes:

   - Open code PINCTRL_FUNCTION_DESC() instead of defining a complex
     macro only used in one place

   - Add pinmux_generic_add_pinfunction() helper and use this in a few
     drivers

  New drivers:

   - Amlogic S7, S7D and S6 pin control support

   - Eswin EIC7700 pin control support

   - Qualcomm PMIV0104, PM7550 and Milos pin control support

     Because of unhelpful numbering schemes, the Qualcomm driver now
     needs to start to rely on SoC codenames

   - STM32 HDP pin control support

   - Mediatek MT8189 pin control support

  Improvements:

   - Switch remaining pin control drivers over to the new GPIO set
     callback that provides a return value

   - Support RSVD (reserved) pins in the STM32 driver

   - Move many fixed assignments over to pinctrl_desc definitions

   - Handle multiple TLMM regions in the Qualcomm driver"

* tag 'pinctrl-v6.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (105 commits)
  pinctrl: mediatek: Add pinctrl driver for mt8189
  dt-bindings: pinctrl: mediatek: Add support for mt8189
  pinctrl: aspeed-g6: Add PCIe RC PERST pin group
  pinctrl: ingenic: use pinmux_generic_add_pinfunction()
  pinctrl: keembay: use pinmux_generic_add_pinfunction()
  pinctrl: mediatek: moore: use pinmux_generic_add_pinfunction()
  pinctrl: airoha: use pinmux_generic_add_pinfunction()
  pinctrl: equilibrium: use pinmux_generic_add_pinfunction()
  pinctrl: provide pinmux_generic_add_pinfunction()
  pinctrl: pinmux: open-code PINCTRL_FUNCTION_DESC()
  pinctrl: ma35: use new GPIO line value setter callbacks
  MAINTAINERS: add Clément Le Goffic as STM32 HDP maintainer
  pinctrl: stm32: Introduce HDP driver
  dt-bindings: pinctrl: stm32: Introduce HDP
  pinctrl: qcom: Add Milos pinctrl driver
  dt-bindings: pinctrl: document the Milos Top Level Mode Multiplexer
  pinctrl: qcom: spmi: Add PM7550
  dt-bindings: pinctrl: qcom,pmic-gpio: Add PM7550 support
  pinctrl: qcom: spmi: Add PMIV0104
  dt-bindings: pinctrl: qcom,pmic-gpio: Add PMIV0104 support
  ...
2025-08-02 12:07:09 -07:00
Linus Torvalds
0f46f50845 soc: driver updates for 6.17
Changes are all over the place, but very little sticks out as
 noteworthy.
 
 There is a new misc driver for the Raspberry Pi 5's RP1 multifunction
 I/O chip, along with hooking it up to the pinctrl and clk frameworks.
 
 The reset controller and memory subsystems have mainly small updates,
 but there are two new reset drivers for the K230 and VC1800B SoCs,
 and new memory driver support for Tegra264.
 
 The ARM SMCCC and SCMI firmware drivers gain a few more features that
 should help them be supported across more environments. Similarly,
 the SoC specific firmware on Tegra and Qualcomm get minor enhancements
 and chip support.
 
 In the drivers/soc/ directory, the ASPEED LPC snoop driver gets an
 overhaul for code robustness, the Tegra and Qualcomm and NXP drivers
 grow to support more chips, while the Hisilicon, Mediatek and Renesas
 drivers see mostly janitorial fixes.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmiEmIcACgkQmmx57+YA
 GNkE4g/6A2OKti+qtIsLt10zS7paGP38ftu9ad27WC54AOGgVk4ZXt8mVGRmqOf+
 BICIM+wc4gehdvRJTRnq3gZg3e1puuYdcMuBOh4qsghRMjdYUKfNairtn/iX7d+f
 e5auzz5/gV7MWNM7jiQNydCqZSeV6u2/cqD5iRCrRgaB5FOG4yY1BkAsah1UzZjk
 MycudqjkK4IX5zp5oqXB/PoesULAbB2unjvfw194LATYSqmcRLQRWFdv4aM0R6ba
 TDP5x0d95nhMTNWif3495zc2WxdSYzbD4lNv44RPpKDywqBj+qFBI/EpMFkxQ5Hy
 cqv60Dm+/tx+DBO/Ma0zJzsV4ChRIEBNkTUh36OxmYxq70x1T4FEynZ6IT8a8dXD
 ltjHwOcTHp1M0OpNj+PIFBD+ohWFWKOo+T9GRtTInLjUGBlJA6LK9i4Lb0DaIyRt
 DmmvbZCwh0PI/nZiyQzw7rsXWwqDcqeF8FScw+9ooBk7Z7Jr1gMc52ya0qrRWQ8w
 Tr3D+lNE0aDfErnx4RrNsjD8lpX4nOfRFvuWSTlWqkBjGhoDP/tnNi2RCWmbXo2Z
 PDDWLnECo6o1aIxYO/tHjbFKVJB38p4e/LLP89htu8dFxSZKnVzxosnOvEVWS8+Y
 a0oZb9j1tAOYHmMWDm+zaQ7BlK9CMURNTdUcnqNqIvZpHnHz9M8=
 =7T40
 -----END PGP SIGNATURE-----

Merge tag 'soc-drivers-6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull SoC driver updates from Arnd Bergmann:
 "Changes are all over the place, but very little sticks out as
  noteworthy.

  There is a new misc driver for the Raspberry Pi 5's RP1 multifunction
  I/O chip, along with hooking it up to the pinctrl and clk frameworks.

  The reset controller and memory subsystems have mainly small updates,
  but there are two new reset drivers for the K230 and VC1800B SoCs, and
  new memory driver support for Tegra264.

  The ARM SMCCC and SCMI firmware drivers gain a few more features that
  should help them be supported across more environments. Similarly, the
  SoC specific firmware on Tegra and Qualcomm get minor enhancements and
  chip support.

  In the drivers/soc/ directory, the ASPEED LPC snoop driver gets an
  overhaul for code robustness, the Tegra and Qualcomm and NXP drivers
  grow to support more chips, while the Hisilicon, Mediatek and Renesas
  drivers see mostly janitorial fixes"

* tag 'soc-drivers-6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (100 commits)
  bus: del unnecessary init var
  soc: fsl: qe: convert set_multiple() to returning an integer
  pinctrl: rp1: use new GPIO line value setter callbacks
  soc: hisilicon: kunpeng_hccs: Fix incorrect log information
  dt-bindings: soc: qcom: qcom,pmic-glink: document Milos compatible
  dt-bindings: soc: qcom,aoss-qmp: document the Milos Always-On Subsystem side channel
  dt-bindings: firmware: qcom,scm: document Milos SCM Firmware Interface
  soc: qcom: socinfo: Add support to retrieve APPSBL build details
  soc: qcom: pmic_glink: fix OF node leak
  soc: qcom: spmi-pmic: add more PMIC SUBTYPE IDs
  soc: qcom: socinfo: Add PM7550 & PMIV0108 PMICs
  soc: qcom: socinfo: Add SoC IDs for SM7635 family
  dt-bindings: arm: qcom,ids: Add SoC IDs for SM7635 family
  firmware: qcom: scm: request the waitqueue irq *after* initializing SCM
  firmware: qcom: scm: initialize tzmem before marking SCM as available
  firmware: qcom: scm: take struct device as argument in SHM bridge enable
  firmware: qcom: scm: remove unused arguments from SHM bridge routines
  soc: qcom: rpmh-rsc: Add RSC version 4 support
  memory: tegra: Add Tegra264 MC and EMC support
  firmware: tegra: bpmp: Fix build failure for tegra264-only config
  ...
2025-07-29 11:13:27 -07:00
Cathy Xu
a3fe1324c3 pinctrl: mediatek: Add pinctrl driver for mt8189
Add pinctrl driver support for MediaTek Soc mt8189.

Signed-off-by: Cathy Xu <ot_cathy.xu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/20250711094513.17073-4-ot_cathy.xu@mediatek.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-07-23 13:35:40 +02:00
Jacky Chou
b1d4c90bff pinctrl: aspeed-g6: Add PCIe RC PERST pin group
The PCIe RC PERST uses SSPRST# as PERST#  and enable this pin
to output.

Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/20250715034320.2553837-8-jacky_chou@aspeedtech.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-07-23 13:22:41 +02:00
Bartosz Golaszewski
83d92eae8d pinctrl: rp1: use new GPIO line value setter callbacks
struct gpio_chip now has callbacks for setting line values that return
an integer, allowing to indicate failures. Convert the driver to using
them.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Andrea della Porta <andrea.porta@suse.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2025-07-21 18:04:15 +02:00
Arnd Bergmann
aee4eeec7e This pull request contains Broadcom SoCs drivers updates for 6.17,
please pull the following:
 
 - Andrea adds the RP1 clock, pinctrl/pinconf/gpio and misc driver to
   bind them all
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEm+Rq3+YGJdiR9yuFh9CWnEQHBwQFAmhi3rwACgkQh9CWnEQH
 BwSCmxAAwEDCorz31+5yt1NjJfS6DVbbXlN6EcZfa4Ysri3uGVQnUC/IdBou7UOO
 t03wnrQmrl2GXKSJBp5jvA6JbuTwBMeMtPy0e3Ayg+k5iJf0s+DgVO7NJeMhEHPP
 Y/TfcHvsVQkRJ2jaXl9zLA2PRQhKxVhvj0lTmm0AtHm0ctdxfqgJct1k65fj9/Qk
 sYbSQ+ZXT+1nLnoL1WoEl0QStIJGDNp4Jns0ZfHaYxFcc1AGZRLckYHyjxLjG1i3
 b+t5uIpppbUIRLQTJpX7YlD8dk9laCACoD5P5aULPPBe2uykOeYViux/FTFgWrLY
 a8RYBZfAzw6HWYuUivWoMmnGzXPea+wKuT8IS776E/0wk/gAmuuu1eA2ioJ+pyj6
 bAfAcgTL/gkaHKL1pH4OCu3SmMnhtYQQaERzHFf49Xucjaou3XM37YOhNo2hraNp
 jeS9f1HQUuBYr31FWjw6h19dbAWkJJ4Kzux9K9g1x3XSYVZeOv4POfrCztpYtA53
 uDCdql21MNrjvRfE4xBcRGJ+j4PVOdB8UKJ77vo0+c+sKbVLLDGOSrqTbpagNSaR
 R7WBOgygPU8TSxqe7xzqds5ZGevMhQ0j8yJupxlYJoias4ak8q7hEL6WtJKDm+dQ
 pegyUzB/cYC5y+sKN3RFfQQ3s05Ee6UUXXEOntFAj8S/Ns3fOpU=
 =V+Co
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmh+VTAACgkQmmx57+YA
 GNkZWg/+OiQoQBMfhPuALhK3y/C3xE6m59Qio2EkyAVqJiDzsXEXs2AZrlqNCJ+G
 WVeJuEWHRYfeMf+XWpUZi/UL2agPNjFUOiV4m8ShikZ6mMiIhrzzpRquYcgAi1Ey
 GorgadJAOuWlDRQnVmJZ83+asRAlKnnKiwbJYmfgQTURyGd78LfUiMN2AucWH1+o
 MPZw8+uxrL56AOgHBrLAmaq5U0pLvUlp8wHByFhiIZ9jPQGTHlmoloVngHenaVfs
 hlMVghyh55G8VWrhnmls0cdz8CBvvXG3ZukcSXw7uFS7B+oJLbPyk1OSvst6dzh+
 S43cX1X5hzAyVTlpIUMR4/Lyzd+x2DZalX2VwdT3x/FG4xAwG8nH/ZG2j5oXyES7
 AMICQ2O/+heljpYYvqK4ZDR1ju+KEvOpmaO7aRWHlPIIMJnN6Z1dajdWoIpMlnv/
 dHsNFzBE00dYZ+iqLbDw/L0HTN9v2diHrStrrHvhylq0Q2og/JtAlDWUis/s9doS
 83DfSY7+BePVrwxVXb3Jf6WO0ADCQZ7xc3XuM0C9ptvQaHoyshXAHb9P6X/DTULd
 ErRYjS/5WZ9Bc0B15gY9Vwxe4UZTfryXcIdCLzVJ/4bHC1rf95b+GNILgtLNT58/
 8uDgd41fpVE2OnGIebeDOb1VBxRTMtSBg9iNWhnmfmzBNgVXHsI=
 =pldc
 -----END PGP SIGNATURE-----

Merge tag 'arm-soc/for-6.17/drivers' of https://github.com/Broadcom/stblinux into soc/drivers

This pull request contains Broadcom SoCs drivers updates for 6.17,
please pull the following:

- Andrea adds the RP1 clock, pinctrl/pinconf/gpio and misc driver to
  bind them all

* tag 'arm-soc/for-6.17/drivers' of https://github.com/Broadcom/stblinux:
  pinctrl: rp1: Implement RaspberryPi RP1 pinmux/pinconf support
  misc: rp1: RaspberryPi RP1 misc driver
  pinctrl: rp1: Implement RaspberryPi RP1 gpio support
  clk: rp1: Add support for clocks provided by RP1
  dt-bindings: clock: Add RaspberryPi RP1 clock bindings

Link: https://lore.kernel.org/r/20250630190216.1518354-4-florian.fainelli@broadcom.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2025-07-21 16:56:48 +02:00
Bartosz Golaszewski
0bbd90c2c6 pinctrl: ingenic: use pinmux_generic_add_pinfunction()
Instead of passing individual fields of struct pinfunction to
pinmux_generic_add_function(), use pinmux_generic_add_pinfunction() and
pass the entire structure directly.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Paul Cercueil <paul@crapouillou.net>
Link: https://lore.kernel.org/20250709-pinctrl-gpio-pinfuncs-v2-7-b6135149c0d9@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-07-19 18:00:28 +02:00
Bartosz Golaszewski
adb9e21052 pinctrl: keembay: use pinmux_generic_add_pinfunction()
Instead of passing individual fields of struct pinfunction to
pinmux_generic_add_function(), use pinmux_generic_add_pinfunction() and
pass the entire structure directly.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/20250709-pinctrl-gpio-pinfuncs-v2-6-b6135149c0d9@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-07-19 18:00:21 +02:00
Bartosz Golaszewski
8f8fe52c5a pinctrl: mediatek: moore: use pinmux_generic_add_pinfunction()
Instead of passing individual fields of struct pinfunction to
pinmux_generic_add_function(), use pinmux_generic_add_pinfunction() and
pass the entire structure directly.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/20250709-pinctrl-gpio-pinfuncs-v2-5-b6135149c0d9@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-07-19 18:00:14 +02:00
Bartosz Golaszewski
7d7883db6e pinctrl: airoha: use pinmux_generic_add_pinfunction()
Instead of passing individual fields of struct pinfunction to
pinmux_generic_add_function(), use pinmux_generic_add_pinfunction() and
pass the entire structure directly.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/20250709-pinctrl-gpio-pinfuncs-v2-4-b6135149c0d9@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-07-19 18:00:06 +02:00
Bartosz Golaszewski
cc154c00a6 pinctrl: equilibrium: use pinmux_generic_add_pinfunction()
Instead of passing individual fields of struct pinfunction to
pinmux_generic_add_function(), use pinmux_generic_add_pinfunction() and
pass the entire structure directly.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/20250709-pinctrl-gpio-pinfuncs-v2-3-b6135149c0d9@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-07-19 17:59:57 +02:00
Bartosz Golaszewski
431b68ae73 pinctrl: provide pinmux_generic_add_pinfunction()
Several drivers call pinmux_generic_add_function() passing it the
contents of struct pinfunction as first three arguments. We can make
this shorter by simply providing an interface allowing to pass the
address of struct pinfunction directly when adding a new function.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/20250709-pinctrl-gpio-pinfuncs-v2-2-b6135149c0d9@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-07-19 17:59:48 +02:00
Bartosz Golaszewski
dd47155a0e pinctrl: pinmux: open-code PINCTRL_FUNCTION_DESC()
This macro is only used in one place and pin function descriptors should
only be created by pinmux core so there's no point in exposing it to
other pinctrl users. Remove the macro and hand-code its functionality.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/20250709-pinctrl-gpio-pinfuncs-v2-1-b6135149c0d9@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-07-19 17:59:35 +02:00
Bartosz Golaszewski
63149542dc pinctrl: ma35: use new GPIO line value setter callbacks
struct gpio_chip now has callbacks for setting line values that return
an integer, allowing to indicate failures. Convert the driver to using
them.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/20250717125758.53141-1-brgl@bgdev.pl
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-07-19 17:36:40 +02:00
Linus Walleij
cc43eea3e1 Samsung pinctrl drivers changes for v6.17
Add support for programming wake up for Google GS101 SoC pin
 controllers, so the SoC can be properly woken up from low power states.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmh2J2YQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD18b9EACI+oLvIg7RrMvJLd08XvCWyZfxP10tZ6Ip
 vqasV4BoVTkBFmPu52NWc+HdJ+8enm3Hq62qD1J7f7ryyeZ+L8iPNiDR12cwvZEB
 xAmXyYjnGlu7h68Zso60miNERoqYxLqmxLcMAgPuaGgh9nd/bG7PJB5xgzzA/9Lt
 9RqwOLQozSXQkTc2YY8U9QUS2WVt08OltMamTzr6mNnYhVSEfEHpSW868FUL+/zk
 cA6zi4ooe3ushZ8NJFLjmLBuXw8x+BMrplg+pSg8xBUireSpFqyd+Kiv57914Arr
 +zN3ij+uxGANkaKSvwIEiLRB50fmhK0OzEL4qmDPUeK+W0WC/mYjeJ6iE5ZDCB8r
 Pt/xqvmzeS+7XMRWeyH2nsIP/RtJP2yDZYC+7mi7mpqQ3BmcBs3TOe1cXP6vp1WU
 z9888xEepbNUD1NvYvSdydgVPjHeFCPNmHkTo1fgOyTLibK9ZR8QD6HVc4UsVyP9
 z9wWcWJ39HybtzE2ukkI+Cu3VPOiQv+O0BsCeL+Yjdi0c2X/xZ0vbKOSBfJXiE0A
 WBxJDCylRWHG7aA2hHjKrz00V4YqmtD7QMbmQlqjBKJRPl+CDJrmtSIIgo7x68vh
 awmKkD2sjaj0P8yNQTN7B5wpRMJNOWILHGOuTEn3EZ1jlVdREkdXKaqhR+8q0R45
 TALsa5M0IQ==
 =CXPA
 -----END PGP SIGNATURE-----

Merge tag 'samsung-pinctrl-6.17' of https://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/samsung into devel

Samsung pinctrl drivers changes for v6.17

Add support for programming wake up for Google GS101 SoC pin
controllers, so the SoC can be properly woken up from low power states.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-07-15 15:59:48 +02:00
Linus Walleij
2427d69c3d intel-pinctrl for v6.16-1
* Use new GPIO line value setter callbacks (Bartosz Golaszewski)
 * Add missed export.h to the main driver
 
 The following is an automated git shortlog grouped by driver:
 
 baytrail:
  -  use new GPIO line value setter callbacks
 
 cherryview:
  -  use new GPIO line value setter callbacks
 
 intel:
  -  fix build warnings about export.h
  -  use new GPIO line value setter callbacks
 
 lynxpoint:
  -  use new GPIO line value setter callbacks
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEqaflIX74DDDzMJJtb7wzTHR8rCgFAmh0vkUACgkQb7wzTHR8
 rChJog//d7qFpQgZt0oDNAmiFJDThWf+Fb+AwFyDWogu1Q4k9YHpQUcUbyuvBlHk
 6U2ORV4iHBt2Elo1lcPvXwtyGzY+z3zGPR2/sFbTV1jPhxBNWtc0QF8xZZ9lrTCr
 EgRLsQrDD+JngUVtwQ8EWrLNfu+2g6MDVBTnMJ6cLWXbzIjIyCClE5tyPp2Ro9kZ
 f+XTuW1BB6qzDCNk+XURd5mflfw2YI/ZNYfWsx7+/6YT5tPqWvmAnc4xgX0samLw
 XQShZcV3a4SFiN+K5+tix1YhUcEu3hudL9RaeSw3HfXHPruCTvW+p4UFy7aO9Vf0
 CsNupQ2OV6VVPFJq1upvZKoJ1W1DKQ7faq4FuftrYaKQ2sTgRvTTWthUf1y7sCDV
 MVghTv4Qh4HKwfD2me50CgHfwx9ElgwSi+NQcccVXBBaVJDxXFibr01qElaZ54g2
 BUa80wQ70btP3IWQwsNfobxlHEljRyUjydfbxGMwOMLzOYYlU3TlTev8bhb647ne
 VQHwQtgHi6Xwqg1ZzBLWyccdJoLepJcq1z1po4hcR5tZ3aor306T+14ad8LCIvRg
 qnCazp+/+Nff/2xNg8hx+wRZmTduJsc4379qzGyfRCMWPqi2kzAENz8VxqKl7R6f
 mmUGoL8ojwJ6wvWcA87EAAyWFxoQmXv5+TQQ0hWyRkpe+dMzUUg=
 =bbK4
 -----END PGP SIGNATURE-----

Merge tag 'intel-pinctrl-v6.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel into devel

intel-pinctrl for v6.16-1

* Use new GPIO line value setter callbacks (Bartosz Golaszewski)
* Add missed export.h to the main driver

The following is an automated git shortlog grouped by driver:

baytrail:
 -  use new GPIO line value setter callbacks

cherryview:
 -  use new GPIO line value setter callbacks

intel:
 -  fix build warnings about export.h
 -  use new GPIO line value setter callbacks

lynxpoint:
 -  use new GPIO line value setter callbacks

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-07-14 17:55:30 +02:00
Clément Le Goffic
8eabf5ddbb pinctrl: stm32: Introduce HDP driver
This patch introduce the driver for the Hardware Debug Port available on
STM32MP platforms. The HDP allows the observation of internal SoC
signals by using multiplexers. Each HDP port can provide up to 16
internal signals (one of them can be software controlled as a GPO).

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Clément Le Goffic <clement.legoffic@foss.st.com>
Link: https://lore.kernel.org/20250711-hdp-upstream-v7-2-faeecf7aaee1@foss.st.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-07-14 17:50:58 +02:00
Luca Weiss
620d3d1025 pinctrl: qcom: Add Milos pinctrl driver
Add pinctrl driver for TLMM block found in the Milos SoC.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/20250702-sm7635-pinctrl-v2-2-c138624b9924@fairphone.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-07-14 17:50:58 +02:00
Mark Brown
b88b7e2096
Add RPMh regulator support for PM7550 & PMR735B
Merge series from Luca Weiss <luca.weiss@fairphone.com>:

Document and add support for the regulators on PM7550 and PMR735B, which
can be paired with the Milos SoC.
2025-07-14 11:34:22 +01:00
Luca Weiss
52e06d25bd pinctrl: qcom: spmi: Add PM7550
PM7550 is a PMIC, featuring 12 GPIOs. Describe it.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Link: https://lore.kernel.org/20250709-sm7635-pmxr2230-v2-4-09777dab0a95@fairphone.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-07-11 20:22:53 +02:00
Luca Weiss
19dca764db pinctrl: qcom: spmi: Add PMIV0104
PMIV0104 is a PMIC, featuring 10 GPIOs. Describe it.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Link: https://lore.kernel.org/20250709-sm7635-pmiv0104-v2-3-ebf18895edd6@fairphone.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-07-11 20:20:19 +02:00
Mukesh Ojha
0b075c0110 pinmux: fix race causing mux_owner NULL with active mux_usecount
commit 5a3e85c3c3 ("pinmux: Use sequential access to access
desc->pinmux data") tried to address the issue when two client of the
same gpio calls pinctrl_select_state() for the same functionality, was
resulting in NULL pointer issue while accessing desc->mux_owner.
However, issue was not completely fixed due to the way it was handled
and it can still result in the same NULL pointer.

The issue occurs due to the following interleaving:

     cpu0 (process A)                   cpu1 (process B)

      pin_request() {                   pin_free() {

                                         mutex_lock()
                                         desc->mux_usecount--; //becomes 0
                                         ..
                                         mutex_unlock()

  mutex_lock(desc->mux)
  desc->mux_usecount++; // becomes 1
  desc->mux_owner = owner;
  mutex_unlock(desc->mux)

                                         mutex_lock(desc->mux)
                                         desc->mux_owner = NULL;
                                         mutex_unlock(desc->mux)

This sequence leads to a state where the pin appears to be in use
(`mux_usecount == 1`) but has no owner (`mux_owner == NULL`), which can
cause NULL pointer on next pin_request on the same pin.

Ensure that updates to mux_usecount and mux_owner are performed
atomically under the same lock. Only clear mux_owner when mux_usecount
reaches zero and no new owner has been assigned.

Fixes: 5a3e85c3c3 ("pinmux: Use sequential access to access desc->pinmux data")
Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
Link: https://lore.kernel.org/20250708-pinmux-race-fix-v2-1-8ae9e8a0d1a1@oss.qualcomm.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-07-11 20:19:55 +02:00
Linus Walleij
ac51d04144 pinctrl: renesas: Updates for v6.17 (take two)
- Sort Kconfig symbols and improve their descriptions,
   - Simplify PINCTRL_RZV2M logic.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCaG7GzwAKCRCKwlD9ZEnx
 cLgyAP9IpmujuerAZwm69lRk+Qt+M/dRfiZi8TLOHtX1Q6tbYwD/XcishsjL+K21
 PsuNIlkkD3ColkYsK07ZrJeX/8LNHwc=
 =6d7L
 -----END PGP SIGNATURE-----

Merge tag 'renesas-pinctrl-for-v6.17-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel

pinctrl: renesas: Updates for v6.17 (take two)

  - Sort Kconfig symbols and improve their descriptions,
  - Simplify PINCTRL_RZV2M logic.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-07-11 20:12:20 +02:00
Mark Brown
0c1ff10328
regulator: Merge tps6594 driver changes
This will be needed to add support for TPS652G1 which also has regulator
dependencies.
2025-07-10 12:05:59 +01:00
Michael Walle
f6420de1c8 pinctrl: pinctrl-tps6594: Add TPS652G1 PMIC pinctrl and GPIO
The TPS652G1 is a stripped down version of the TPS65224. Compared to the
TPS65224 it lacks some pin mux functions, like the ADC, voltage
monitoring and the second I2C bus.

Signed-off-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250613114518.1772109-4-mwalle@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
2025-07-10 09:58:12 +01:00
Peter Griffin
683d532dfc pinctrl: samsung: Fix gs101 irq chip
When adding the dedicated gs101_wkup_irq_chip struct to support the eint
wakeup mask the .eint_con, eint_mask and .eint_pend fields were missed. The
result is that irqs on gs101 for the buttons etc are broken.

Reported-by: André Draszik <andre.draszik@linaro.org>
Fixes: 2642f55d44 ("pinctrl: samsung: add support for gs101 wakeup mask programming")
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Tested-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20250702-fix-gs101-irqchip-v1-1-ccc84b44ad72@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2025-07-05 09:35:22 +02:00
Milan Krstic
5285b5ed04 pinctrl: aw9523: fix can_sleep flag for GPIO chip
The GPIO expander is connected via I2C, thus the can_sleep flag has to
be set to true. This fixes spurious "scheduling while atomic" bugs
in the kernel ringbuffer.

Signed-off-by: David Bauer <mail@david-bauer.net>
Signed-off-by: Milan Krstic <milan.krstic@gmail.com>
Link: https://lore.kernel.org/20250703143039.5809-1-milan.krstic@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-07-04 10:31:50 +02:00
Paul Kocialkowski
64daf13494 pinctrl: sunxi: v3s: Fix wrong comment about UART2 pinmux
The original comment doesn't match the pin attribution, probably due
to a hasty copy/paste.

Signed-off-by: Paul Kocialkowski <paulk@sys-base.io>
Reviewed-by: Icenowy Zheng <uwu@icenowy.me>
Link: https://lore.kernel.org/20250701201124.812882-2-paulk@sys-base.io
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-07-04 10:00:35 +02:00
Mario Limonciello
8ff4fb276e pinctrl: amd: Clear GPIO debounce for suspend
soc-button-array hardcodes a debounce value by means of gpio_keys
which uses pinctrl-amd as a backend to program debounce for a GPIO.

This hardcoded value doesn't match what the firmware intended to be
programmed in _AEI. The hardcoded debounce leads to problems waking
from suspend. There isn't appetite to conditionalize the behavior in
soc-button-array or gpio-keys so clear it when the system suspends to
avoid problems with being able to resume.

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Hans de Goede <hansg@kernel.org>
Fixes: 5c4fa2a6da ("Input: soc_button_array - debounce the buttons")
Link: https://lore.kernel.org/linux-input/mkgtrb5gt7miyg6kvqdlbu4nj3elym6ijudobpdi26gp4xxay5@rsa6ytrjvj2q/
Link: https://lore.kernel.org/linux-input/20250625215813.3477840-1-superm1@kernel.org/
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Hans de Goede <hansg@kernel.org>
Link: https://lore.kernel.org/20250627150155.3311574-1-superm1@kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-07-04 00:24:45 +02:00
Linus Walleij
eaa655c2e5 pinctrl: renesas: Updates for v6.17
- Use the new GPIO line value setter callbacks,
   - Validate pins before setting a mux function on RZ/G2L.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCaF6QNQAKCRCKwlD9ZEnx
 cJjJAQDzUIMw+lGaXLyV7V06tjD9uwgLzGWfqi0RjZcZJdDm6gEAjv9Uc8MCxnD+
 DpX7WfhOOU4dLOdAvwkywB+c21SwygA=
 =v6A6
 -----END PGP SIGNATURE-----

Merge tag 'renesas-pinctrl-for-v6.17-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel

pinctrl: renesas: Updates for v6.17

  - Use the new GPIO line value setter callbacks,
  - Validate pins before setting a mux function on RZ/G2L.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-07-04 00:22:48 +02:00
Jack Ping CHNG
b306791037 pinctrl: equilibrium: Add request and free hooks
Add request and free gpio_chip hooks to support
gpio allocation and release in the driver.

Signed-off-by: Jack Ping CHNG <jchng@maxlinear.com>
Link: https://lore.kernel.org/20250627005419.3124660-1-jchng@maxlinear.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-07-04 00:16:33 +02:00
Yuanjie Yang
56ffb63749 pinctrl: qcom: add multi TLMM region option parameter
Add support for selecting multiple TLMM regions using the
tlmm-test tool.
The current implementation only selects the TLMM Node region
0, which can lead to incorrect region selection.

QCS 615 TLMM Node dts reg:
	tlmm: pinctrl@3100000 {
		compatible = "qcom,qcs615-tlmm";
		reg = <0x0 0x03100000 0x0 0x300000>,
		      <0x0 0x03500000 0x0 0x300000>,
		      <0x0 0x03d00000 0x0 0x300000>;
		reg-names = "east",
			    "west",
			    "south";

QCS615 gpio57 is in the south region with an offset of 0x39000,
and its address is 0x3d39000. However, the default region selection
is region 0 (east region), resulting in a wrong calculated address
of 0x3139000.

Add a tlmm option parameter named tlmm_reg_name to select the region.
If the user does not input the parameter, the default region is 0.

Signed-off-by: Yuanjie Yang <quic_yuanjiey@quicinc.com>
Link: https://lore.kernel.org/20250624090600.91063-1-quic_yuanjiey@quicinc.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-07-03 23:44:21 +02:00
Geert Uytterhoeven
7000167796 pinctrl: renesas: Simplify PINCTRL_RZV2M logic
PINCTRL_RZV2M is selected by ARCH_R9A09G011, hence there is no need to
depend on the latter.  Move the dependency on COMPILE_TEST to the symbol
prompt, like is done for all other auto-selected pin control symbols.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/d74843e06f73cd4c6e822d65f606e6042a50a0b7.1750945516.git.geert+renesas@glider.be
2025-07-02 20:16:45 +02:00
Kuninori Morimoto
8ca43e41fc pinctrl: renesas: Unify config naming
Renesas SoC has chip number / chip name. Some SoC is using chip number,
and some SoC is using chip name on current Renesas pincontrol Kconfig.
Let's unify "pin control support for ${CHIP_NUMBER} (${CHIP_NAME}).

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/87bjqdraf1.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2025-07-02 20:14:47 +02:00
Kuninori Morimoto
93e20e2b7a pinctrl: renesas: Sort Renesas Kconfig configs
Current Renesas Kconfig is randomly arranged. Let's sort it by
alphabetical/number order, same as Makefile.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/87cyatrafh.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2025-07-02 20:13:42 +02:00
Andrea della Porta
e3ce7b8973 pinctrl: rp1: Implement RaspberryPi RP1 pinmux/pinconf support
The current implementation for the pin controller peripheral
on the RP1 chipset supports gpio functionality and just the
basic configuration of pin hw capabilities.

Add support for selecting the pin alternate function (pinmux)
and full configuration of the pin (pinconf).

Related pins are also gathered into groups.

Signed-off-by: Andrea della Porta <andrea.porta@suse.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/all/8c282b89b1aa8b9e3c00f6bd3980332c47d82df7.1750778806.git.andrea.porta@suse.com/
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
2025-06-25 12:08:56 -07:00
Peter Griffin
2642f55d44 pinctrl: samsung: add support for gs101 wakeup mask programming
gs101 differs to other currently supported SoCs in that it has 3 wakeup
mask registers for the 67 external wakeup interrupt pins in alive and
far_alive.

EINT_WAKEUP_MASK  0x3A80 EINT[31:0]
EINT_WAKEUP_MASK2 0x3A84 EINT[63:32]
EINT_WAKEUP_MASK3 0x3A88 EINT[66:64]

Add gs101 specific callbacks and a dedicated gs101_wkup_irq_chip struct to
handle these differences.

The current wakeup mask with upstream is programmed as
WAKEUP_MASK0[0x3A80] value[0xFFFFFFFF]
WAKEUP_MASK1[0x3A84] value[0xF2FFEFFF]
WAKEUP_MASK2[0x3A88] value[0xFFFFFFFF]

Which corresponds to the following wakeup sources:
gpa7-3  vol down
gpa8-1  vol up
gpa10-1 power
gpa8-2  typec-int

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Link: https://lore.kernel.org/r/20250619-gs101-eint-mask-v1-2-89438cfd7499@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2025-06-25 16:17:05 +02:00
Peter Griffin
c8edb80494 pinctrl: samsung: rename exynosautov920_retention_data to no_retention_data
To avoid having an exact copy of this struct for gs101 rename it and use it
for both SoCs for eint banks.

The purpose of this for exynosautov920 and gs101 is to obtain the PMU
syscon for writing the calculated WAKEUP_MASK register(s).

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Link: https://lore.kernel.org/r/20250619-gs101-eint-mask-v1-1-89438cfd7499@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2025-06-25 16:17:05 +02:00
Linus Walleij
4ab401099d pinctrl: amlogic: Staticize some local structs
Sparse complains:

sparse warnings: (new ones prefixed by >>)
>> drivers/pinctrl/meson/pinctrl-amlogic-a4.c:126:24: sparse: sparse:
   symbol 'multi_mux_s7' was not declared. Should it be static?
>> drivers/pinctrl/meson/pinctrl-amlogic-a4.c:135:28: sparse: sparse:
   symbol 's7_priv_data' was not declared. Should it be static?
>> drivers/pinctrl/meson/pinctrl-amlogic-a4.c:140:24: sparse: sparse:
   symbol 'multi_mux_s6' was not declared. Should it be static?
>> drivers/pinctrl/meson/pinctrl-amlogic-a4.c:154:28: sparse: sparse:
   symbol 's6_priv_data' was not declared. Should it be static?

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202506122145.wWAtKBoy-lkp@intel.com/
Cc: Xianwei Zhao <xianwei.zhao@amlogic.com>
Fixes: 1f8e5dfdda ("pinctrl: meson: support amlogic S6/S7/S7D SoC")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/20250624-amlogic-a4-fix-v1-1-03f0856d10cb@linaro.org
2025-06-24 21:51:57 +02:00
Colin Ian King
6cb0e9da94 pinctrl: eswin: Fix unsigned comparison to less than zero issue
The u32 variable voltage is being compared to less than zero and
this can never be true. Fix this by making voltage an int type which
is the same type as the return from the call to regulator_get_voltage.

Fixes: 5b797bcc00 ("pinctrl: eswin: Add EIC7700 pinctrl driver")
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/20250623222004.280928-1-colin.i.king@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-06-24 21:37:49 +02:00
Ze Huang
d94a32ac68 pinctrl: canaan: k230: Fix order of DT parse and pinctrl register
Move DT parse before pinctrl register. This ensures that device tree
parsing is done before calling devm_pinctrl_register() to prevent using
uninitialized pin resources.

Fixes: 545887eab6 ("pinctrl: canaan: Add support for k230 SoC")
Reported-by: Yao Zi <ziyao@disroot.org>
Signed-off-by: Ze Huang <huangze@whut.edu.cn>
Link: https://lore.kernel.org/20250624-k230-return-check-v1-2-6b4fc5ba0c41@whut.edu.cn
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-06-24 21:36:15 +02:00
Ze Huang
65bd0be486 pinctrl: canaan: k230: add NULL check in DT parse
Add a NULL check for the return value of of_get_property() when
retrieving the "pinmux" property in the group parser. This avoids
a potential NULL pointer dereference if the property is missing
from the device tree node.

Also fix a typo ("sintenel") in the device ID match table comment,
correcting it to "sentinel".

Fixes: 545887eab6 ("pinctrl: canaan: Add support for k230 SoC")
Reported-by: Yao Zi <ziyao@disroot.org>
Signed-off-by: Ze Huang <huangze@whut.edu.cn>
Link: https://lore.kernel.org/20250624-k230-return-check-v1-1-6b4fc5ba0c41@whut.edu.cn
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-06-24 21:36:14 +02:00
Da Xue
b58ea88d30 pinctrl: meson-g12a: add g12b pwm groups
G12B and SM1 have additional PWM pinmuxes for b, c, and d.

Signed-off-by: Da Xue <da@libre.computer>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/20250619022337.43900-1-da@libre.computer
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-06-24 21:28:46 +02:00
Arnd Bergmann
c0d03cdfac pinctrl: zynq: add CONFIG_OF dependency
The zynq driver can be enabled for compile-testing on builds without
CONFIG_OF, leading to a link error:

ld.lld-21: error: undefined symbol: pinconf_generic_dt_node_to_map
 referenced by pinconf-generic.h:231 (/home/arnd/arm-soc/include/linux/pinctrl/pinconf-generic.h:231)
          drivers/pinctrl/pinctrl-zynq.o:(pinconf_generic_dt_node_to_map_all) in archive vmlinux.a

Prevent this with the proper compile time dependency.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202506212021.deAhuaWr-lkp@intel.com/
Fixes: 1982621dec ("pinctrl: Allow compile testing for K210, TB10X and ZYNQ")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/20250620130814.2580678-1-arnd@kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-06-24 21:23:50 +02:00
Yuan Chen
8f6f303551 pinctrl: berlin: fix memory leak in berlin_pinctrl_build_state()
In the original implementation, krealloc() failure handling incorrectly
assigned the original memory pointer to NULL after kfree(), causing a
memory leak when reallocation failed.

Fixes: de845036f9 ("pinctrl: berlin: fix error return code of berlin_pinctrl_build_state()")
Signed-off-by: Yuan Chen <chenyuan@kylinos.cn>
Link: https://lore.kernel.org/20250620015343.21494-1-chenyuan_fl@163.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-06-24 21:17:11 +02:00
Yuan Chen
e3507c56cb pinctrl: sunxi: Fix memory leak on krealloc failure
In sunxi_pctrl_dt_node_to_map(), when krealloc() fails to resize
the pinctrl_map array, the function returns -ENOMEM directly
without freeing the previously allocated *map buffer. This results
in a memory leak of the original kmalloc_array allocation.

Fixes: e11dee2e98 ("pinctrl: sunxi: Deal with configless pins")
Signed-off-by: Yuan Chen <chenyuan@kylinos.cn>
Link: https://lore.kernel.org/20250620012708.16709-1-chenyuan_fl@163.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-06-24 21:17:01 +02:00
Bartosz Golaszewski
b4102e3524 pinctrl: aw9523: fix mutex unlock in error path
We must unlock the mutex *after* the `out` label or we'd trigger a
deadlock in error path.

Fixes: dffe286e24 ("pinctrl: aw9523: use new GPIO line value setter callbacks")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202506191952.A03cvn22-lkp@intel.com/
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/20250619173537.64298-1-brgl@bgdev.pl
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-06-24 21:11:02 +02:00
Shiji Yang
4b443bbcd1 pinctrl: falcon: mark pinctrl_falcon_init() as static
Fix the following missing-prototypes build warning:

drivers/pinctrl/pinctrl-falcon.c:508:12: error: no previous prototype for 'pinctrl_falcon_init' [-Werror=missing-prototypes]
  508 | int __init pinctrl_falcon_init(void)
      |            ^~~~~~~~~~~~~~~~~~~

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://lore.kernel.org/OSBPR01MB167014AF54EF9818CB98C83BBC72A@OSBPR01MB1670.jpnprd01.prod.outlook.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-06-24 21:01:31 +02:00
Lad Prabhakar
5216103557 pinctrl: renesas: rzg2l: Validate pins before setting mux function
Ensure only valid pins are configured by validating pin mappings before
setting the mux function.

Rename rzg2l_validate_gpio_pin() to rzg2l_validate_pin() to reflect its
broader purpose validating both GPIO pins and muxed pins. This helps
avoid invalid configurations.

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/20250616132750.216368-1-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2025-06-19 19:25:20 +02:00