Commit Graph

6805 Commits

Author SHA1 Message Date
Swati Agarwal
5028736781 pinctrl: pinctrl-zynqmp: Use pin numbers stored in pin descriptor
Use pin numbers stored in the pin descriptors instead of index value while
creating the pin groups. Pin Id's are not same as Index values for Xilinx
Versal platform, so use the pin values from descriptor which works for both
ZynqMP and Versal platforms.

Signed-off-by: Swati Agarwal <swati.agarwal@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/2413a1f99278d70313960f13daecda9ef54172d8.1716807432.git.michal.simek@amd.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-06-17 09:23:18 +02:00
Weihao Li
0a2bcac1a2 pinctrl: ralink: mt76x8: fix pinmux function
The current version of the pinctrl driver has some issues:

1. Duplicated "gpio" pmx function

The common code will add a "gpio" pmx functon to every pin group, so
it's not necessary to define a separate "gpio" pmx function in pin
groups.

2. Duplicated pmx function name

There are some same function name in different pin groups, which will
cause some problems. For example, when we want to use PAD_GPIO0 as
refclk output function, the common clk framework code will search the
entire pin function lists, then return the first one matched, in this
case the matched function list only include the PAD_CO_CLKO pin group
because there are three "refclk" pin function, which is added by
refclk_grp, spi_cs1_grp and gpio_grp.

To solve this problem, a simple way is just add a pingrp refix to
function name like mt7620 pinctrl driver does.

3. Useless "-" or "rsvd" functon

It's really unnecessary to add a reserved pin mux function to the
function lists, because we never use it.

Signed-off-by: Weihao Li <cn.liweihao@gmail.com>
Link: https://lore.kernel.org/r/20240527022036.31985-1-user@blabla
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-06-17 09:23:02 +02:00
Nirmala Devi Mal Nadar
72636eb9c1 pinctrl: pinctrl-tps6594: make tps65224_muxval_remap and tps6594_muxval_remap as static to fix sparse warning
pinctrl: tps6594: Fix sparse warning.

warning: symbol 'tps65224_muxval_remap' was not declared. Should it be static?
warning: symbol 'tps6594_muxval_remap' was not declared. Should it be static?

Signed-off-by: Nirmala Devi Mal Nadar <m.nirmaladevi@ltts.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202405111523.9yt759uX-lkp@intel.com/
Link: https://lore.kernel.org/r/0109018f85002ae1-6fb831b2-74c2-4559-98f1-a3ef25e72558-000000@ap-south-1.amazonses.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-06-17 09:22:49 +02:00
Konrad Dybcio
db43edf669 pinctrl: qcom: spmi: Add PMC8380
PMC8380 is a new chip, featuring 10 GPIOs. Describe it.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240525-topic-pmc8380_gpio-v2-2-2de50cb28ac1@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-06-17 09:22:41 +02:00
Léo DUBOIN
9dfbcf2fc5 pinctrl: core: reset gpio_device in loop in pinctrl_pins_show()
We were not resetting the pointer to the associated gpio_device once
we are done displaying a pin's information.

This meant that once we reached the end of a gpio-range, if there
were pins right after it that did not belong to any known range,
they would be associated with the previous range's gpio device.

This resulted in those pins appearing as <4294966783:old_gdev> instead
of the expected <0:?> (due to gpio_num being -1).

Signed-off-by: Léo DUBOIN <lduboin@freebox.fr>
Link: https://lore.kernel.org/r/c40d0634abefa19e689ffd450e0f48a8d63c4fc4.1714049455.git.lduboin@freebox.fr
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-06-17 09:22:24 +02:00
Léo DUBOIN
db5032981a pinctrl: core: take into account the pins array in pinctrl_pins_show()
We previously only looked at the 'pin_base' of the pinctrl_gpio_ranges
struct for determining if a pin matched a GPIO number.

This value is present only if the 'pins' array is not NULL,
and is 0 otherwise. This means that GPIO ranges declared using
gpiochip_add_pingroup_range(), thus making use of pins, were always matched
by the pins in the range [0-npins] even if they contained pins in a
completely separate range.

Signed-off-by: Léo DUBOIN <lduboin@freebox.fr>
Link: https://lore.kernel.org/r/6df39bd47942156be5713f8f4e317d2ad3e0ddeb.1714049455.git.lduboin@freebox.fr
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-06-17 09:22:15 +02:00
Jacky Huang
f805e35631 pinctrl: nuvoton: Add ma35d1 pinctrl and GPIO driver
Add common pinctrl and GPIO driver for Nuvoton MA35 series SoC, and
add support for ma35d1 pinctrl.

Signed-off-by: Jacky Huang <ychuang3@nuvoton.com>
Link: https://lore.kernel.org/r/20240521012447.42211-4-ychuang570808@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-06-17 09:22:03 +02:00
Peng Fan
b7141b18bf pinctrl: st: Use scope based of_node_put() cleanups
Use scope based of_node_put() cleanup to simplify code.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Link: https://lore.kernel.org/r/20240504-pinctrl-cleanup-v2-8-26c5f2dc1181@nxp.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-06-17 09:21:38 +02:00
Peng Fan
2dbcd12d9e pinctrl: stm32: Use scope based of_node_put() cleanups
Use scope based of_node_put() cleanup to simplify code.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Link: https://lore.kernel.org/r/20240504-pinctrl-cleanup-v2-3-26c5f2dc1181@nxp.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-06-17 09:21:32 +02:00
Peng Fan
993e2fc48f pinctrl: imx: Add pinctrl driver support for i.MX91
Add NXP i.MX91 pinctrl driver

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20240513-imx91-pinctrl-v1-2-c99a23c6843a@nxp.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-06-17 09:21:21 +02:00
Linus Torvalds
a85629f435 - New Device Support
- Add support for X-Powers AXP717 PMIC to AXP22X
    - Add support for Rockchip RK816 PMIC to RK8XX
    - Add support for TI TPS65224 PMIC to TPS6594
 
  - New Functionality
    - Add Power Off functionality to Rohm BD71828
    - Allow I2C SMBus access in Renesas RSMU
 
  - Fix-ups
    - Device Tree binding adaptions/conversions/creation
    - Shift Intel support over to MSI interrupts
    - Generify adding platform data away from being ACPI specific
    - Use device core supplied attribute to register sysfs entries
    - Replace hand-rolled functionality with generic APIs
    - Utilise centrally provided helpers and macros
    - Clean-up error handling
    - Remove superfluous/duplicated/unused sections
    - Trivial; spelling, whitespace, coding-style adaptions
    - More Maple Tree conversions
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmZNwaMACgkQUa+KL4f8
 d2Gh8BAAlD0/SUXVKuMppST6pyqGp90BucELY/enaFFI7eHTrevxSM5Ywtbjig0l
 +pz7WYm0bmCGXhr1yGrrhryKc2hGWacT2MhM8mHpkomHpN3qEnRQRKnjISTHDLG5
 9t1UyqDaBsoI7HPO0iiHPiinoQnM/WIHEjaelQNgl4g2sj9iFMmGhXcYX6IXQwHs
 Yu3l58Yju7nBxjjmgb4tFs8CPf+/CCP0jpwzWd99kZHPcRhupULmQgSLhmbSf4H8
 /KQg7wFSufabxuJOKKR2gUIdGeMlaNhyoPtSdDyn0Pji7lubNyvfaK+JSyae9Esp
 HYD1RD87aQLFyJAfRnDUPI9xQauPpz29V/wGujlqTiz0GYEVGy4Yo2yWH/CoHhUV
 +yb3I/7I6u+rvQHH2bnsAUQ3doh6fuFNvjNJgNbBtqraJ2Pt3nJNGxfSolwPf3mt
 GEb60ahbzLMGtxbVoVOLbDvZgN3FeIKMcdamS1JvKTPTf62H9AOyhUIlzibm1AVl
 i3u2cEfygTeyqUdCIhNLEavmj4uHbFeGXgvveuvbizJTtdEoQ2QIuslwLTrpivkq
 URaDpZfclu9sv+FNY1wiQMnlC4uueyJpkfItEHX876uB7r1ReWMQD8Lf3hI5xJeh
 JM0si93OorG9DR3h5iBnJu1kHqtQ56E46BFP8oh70p9N+Hpaw5c=
 =QAjw
 -----END PGP SIGNATURE-----

Merge tag 'mfd-next-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd

Pull MFD updates from Lee Jones:
 "New Device Support:
   - Add support for X-Powers AXP717 PMIC to AXP22X
   - Add support for Rockchip RK816 PMIC to RK8XX
   - Add support for TI TPS65224 PMIC to TPS6594

  New Functionality:
   - Add Power Off functionality to Rohm BD71828
   - Allow I2C SMBus access in Renesas RSMU

  Fix-ups:
   - Device Tree binding adaptions/conversions/creation
   - Shift Intel support over to MSI interrupts
   - Generify adding platform data away from being ACPI specific
   - Use device core supplied attribute to register sysfs entries
   - Replace hand-rolled functionality with generic APIs
   - Utilise centrally provided helpers and macros
   - Clean-up error handling
   - Remove superfluous/duplicated/unused sections
   - Trivial; spelling, whitespace, coding-style adaptions
   - More Maple Tree conversions"

* tag 'mfd-next-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (44 commits)
  dt-bindings: mfd: Use full path to other schemas
  mfd: rsmu: support I2C SMBus access
  dt-bindings: mfd: Convert lp873x.txt to json-schema
  dt-bindings: mfd: aspeed: Drop 'oneOf' for pinctrl node
  dt-bindings: mfd: allwinner,sun6i-a31-prcm: Use hyphens in node names
  mfd: ssbi: Remove unused field 'slave' from 'struct ssbi'
  mfd: kempld: Remove custom DMI matching code
  mfd: cs42l43: Update patching revision check
  dt-bindings: mfd: qcom: pm8xxx: Add pm8901 compatible
  mfd: timberdale: Remove redundant assignment to variable err
  dt-bindings: mfd: qcom,spmi-pmic: Add pbs to SPMI device types
  dt-bindings: mfd: syscon: Add ti,am62p-cpsw-mac-efuse compatible
  dt-bindings: mfd: qcom,tcsr: Add compatible for SDX75
  mfd: axp20x: Convert to use Maple Tree register cache
  mfd: bd71828: Remove commented code lines
  mfd: intel-m10-bmc: Change staging size to a variable
  dt-bindings: mfd: Add ROHM BD71879
  mfd: Tidy Kconfig dependency's parentheses
  mfd: ocelot-spi: Use spi_sync_transfer()
  dt-bindings: mfd: syscon: Add missing simple syscon compatibles
  ...
2024-05-22 10:41:14 -07:00
Linus Torvalds
2de68638aa Pin control changes for the v6.10 kernel cycle:
Core changes:
 
 - Use DEFINE_SHOW_STORE_ATTRIBUTE() in debugfs entries.
 
 New drivers:
 
 - Qualcomm PMIH0108, PMD8028, PMXR2230 and PM6450
   pin control support.
 
 Improvements:
 
 - Serious cleanup of the recently merged aw9523 driver.
 
 - Fix PIN_CONFIG_BIAS_DISABLE handling in pinctrl-single.
 
 - A slew of device tree binding cleanups.
 
 - Support a bus clock in the Samsung driver.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEElDRnuGcz/wPCXQWMQRCzN7AZXXMFAmZLAM8ACgkQQRCzN7AZ
 XXNxcRAAhkMY+TH2J83NTFZ9ATMguQGaozLM3eGiVXGtOQmNqDo7aHmP/zTi+0Ve
 wC6UTQG0/s+MCkbEQPGN5DzEuEJxEJzWKiGjqNV4gl07QcHV8ZeSWu1lRHvW21PB
 LcRBYmw+wAI0tXCz5t3gAkjs8fc5Vj0uqbWdkgreukULbhikXLmcm5meQ9maZleT
 9GSK/nDqfHahp9hmALz8n1/niPtF4JzNnEfVcVcnBFlX/oszD6vxc0foM0TBEWKI
 q3HYOj1tw0ei+ke01eTlivi+suXDkrw0bDLozWYtFMhs9juJbEhf2RkKKfs4r1iW
 gukzogalaUDEgFK9MRboCqNEbnRkX8yNZQhAVqt5Q0yhaepl2UVgLfGI9TwQY/17
 r8f10fp7sKuf9bhRlVr+fMYT0M2QqowMgO8jpA+m4QeKrZKfYvuHFJUIKhtYV1zK
 6lGicvu5LBIbF2NOmoFvp1XiiWnoD1abrHxmEH/HRfm62bOEQYO/KKWuDY3WIuNb
 xtgQmkt6+WFMF693ygKErbtJKAR3IlFVZ/3mgL1areKp0fOETxqRng0ImYOaFwTG
 gijYm9MLJIlzX/yht/X7V77Sp4kIPz6WCqBIIataHpvDbEL4SBGjLIv/H1+pXtxi
 SHSuOPygJLzURogkVeANWQ2jT9LJVR1A/m9xoeA2HejEOlbFMnA=
 =9Ty5
 -----END PGP SIGNATURE-----

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

Pull pin control updates from Linus Walleij:
 "Core changes:

   - Use DEFINE_SHOW_STORE_ATTRIBUTE() in debugfs entries

  New drivers:

   - Qualcomm PMIH0108, PMD8028, PMXR2230 and PM6450 pin control support

  Improvements:

   - Serious cleanup of the recently merged aw9523 driver

   - Fix PIN_CONFIG_BIAS_DISABLE handling in pinctrl-single

   - A slew of device tree binding cleanups

   - Support a bus clock in the Samsung driver"

* tag 'pinctrl-v6.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (48 commits)
  pinctrl: bcm2835: Make pin freeing behavior configurable
  dt-bindings: pinctrl: qcom,pmic-gpio: Fix "comptaible" typo for PMIH0108
  pinctrl: qcom: pinctrl-sm7150: Fix sdc1 and ufs special pins regs
  dt-bindings: pinctrl: mediatek: mt7622: add "antsel" function
  dt-bindings: pinctrl: mediatek: mt7622: fix array properties
  pinctrl: samsung: drop redundant drvdata assignment
  pinctrl: samsung: support a bus clock
  dt-bindings: pinctrl: samsung: google,gs101-pinctrl needs a clock
  pinctrl: renesas: rzg2l: Limit 2.5V power supply to Ethernet interfaces
  pinctrl: renesas: r8a779h0: Add INTC-EX pins, groups, and function
  pinctrl: renesas: r8a779h0: Fix IRQ suffixes
  pinctrl: renesas: rzg2l: Remove extra space in function parameter
  dt-bindings: pinctrl: qcom,pmic-mpp: add support for PM8901
  pinctrl: pinconf-generic: print hex value
  pinctrl: realtek: fix module autoloading
  pinctrl: qcom: sm7150: fix module autoloading
  pinctrl: loongson2: fix module autoloading
  pinctrl: mediatek: fix module autoloading
  pinctrl: freescale: imx8ulp: fix module autoloading
  dt-bindings: pinctrl: qcom,pmic-gpio: Allow gpio-hog nodes
  ...
2024-05-20 08:51:53 -07:00
Linus Torvalds
ce952d8f0e gpio updates for v6.10-rc1
GPIO core:
 - remove more unused legacy interfaces (after converting the last remaining
   users to better alternatives)
 - update kerneldocs
 - improve error handling and log messages in GPIO ACPI code
 - remove dead code (always true checks) from GPIOLIB
 
 New drivers:
 - add a driver for Intel Granite Rapids-D vGPIO
 
 Driver improvements:
 - use -ENOTSUPP consistently in gpio-regmap and gpio-pcie-idio-24
 - provide an ID table for gpio-cros-ec to avoid a driver name fallback check
 - add support for gpio-ranges for GPIO drivers supporting multiple GPIO banks
 - switch to using dynamic GPIO base in gpio-brcmstb
 - fix irq handling in gpio-npcm-sgpio
 - switch to memory mapped IO accessors in gpio-sch
 
 DT bindings:
 - add support for gpio-ranges to gpio-brcmstb
 - add support for a new model and the gpio-line-names property to gpio-mpfs
 
 Documentation:
 - replace leading tabs with spaces in code blocks
 - fix typos
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmZDFa4ACgkQEacuoBRx
 13IJuA//cdR+Y1xaiORhVg9gMjmeQtgP7ve6QK4p/vuwAuZJMxboc4ATPY4cBlvp
 VoMFQD8FgjbxcKRLjugS0wB/5isELzo5C+q699YKY/0R07WMBiTIt6FgS4JJ1j57
 RoAlLrZ7gxmJQyUWuk2dvvQ55MnCL4fzVCzCrQB+foWsZluyeQMnndFU7z+P96bK
 ckvNrfFlZjaTwRBVf9MVpcNUxuk+pFKMKfXCgNCvmhToOaOM3sKkFwMMZCOVRLpJ
 oCcAz6rbj+fn2x3Id2FS2R5f5GoZx31dalLnbJCY4OLgDNhjx1A7sONq+hplfO24
 LXxQgCP26myaxmCFsiKqYgYzh/1bnAeCaRjy+41+RWXy7LUil6c0yP1Z3pOlOK+h
 j32+/LS9aflneoxjXyAAQLAvMulDbIvKeWHUakPXk6bS/AR6zyL16rwfF9U3K795
 ZGAz37xuOCpAevGnRTpPz9eCWwnNFq5v8UMjvVmoMgtbJbIwP4J3cRzj6RCiBvrq
 AvveulP+oXde3vFydAf1NbjaRxf53b8vZp6DLFDqcU+76QCQwG55QqlhT4Nqm/Y4
 KASQYM4vlH+96vnCMW+p2DmN92dkoadwk5pBvEaY7q7eEC2EdAMfujUZ1VdB9OZ+
 FPZ6zAp6T2khVt4jzKFxbobV8xt3FznntEhbm4bo3Ugb2HRwD8g=
 =mBWd
 -----END PGP SIGNATURE-----

Merge tag 'gpio-updates-for-v6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio updates from Bartosz Golaszewski
 "This was a quiet release cycle for the GPIO tree and so this
  pull-request is relatively small.

  We have one new driver, some minor improvements to the GPIO core code
  and across several drivers, some DT and documentation updates but in
  general nothing stands out or is controversial. All changes have spent
  time in next with no reported issues (or ones that were quickly
  fixed).

  GPIO core:
   - remove more unused legacy interfaces (after converting the last
     remaining users to better alternatives)
   - update kerneldocs
   - improve error handling and log messages in GPIO ACPI code
   - remove dead code (always true checks) from GPIOLIB

  New drivers:
   - add a driver for Intel Granite Rapids-D vGPIO

  Driver improvements:
   - use -ENOTSUPP consistently in gpio-regmap and gpio-pcie-idio-24
   - provide an ID table for gpio-cros-ec to avoid a driver name
     fallback check
   - add support for gpio-ranges for GPIO drivers supporting multiple
     GPIO banks
   - switch to using dynamic GPIO base in gpio-brcmstb
   - fix irq handling in gpio-npcm-sgpio
   - switch to memory mapped IO accessors in gpio-sch

  DT bindings:
   - add support for gpio-ranges to gpio-brcmstb
   - add support for a new model and the gpio-line-names property to
     gpio-mpfs

  Documentation:
   - replace leading tabs with spaces in code blocks
   - fix typos"

* tag 'gpio-updates-for-v6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (30 commits)
  gpio: nuvoton: Fix sgpio irq handle error
  gpiolib: Discourage to use formatting strings in line names
  gpio: brcmstb: add support for gpio-ranges
  gpio: of: support gpio-ranges for multiple gpiochip devices
  dt-bindings: gpio: brcmstb: add gpio-ranges
  gpio: Add Intel Granite Rapids-D vGPIO driver
  gpio: brcmstb: Use dynamic GPIO base numbers
  gpiolib: acpi: Set label for IRQ only lines
  gpiolib: acpi: Add fwnode name to the GPIO interrupt label
  gpiolib: Get rid of never false gpio_is_valid() calls
  gpiolib: acpi: Pass con_id instead of property into acpi_dev_gpio_irq_get_by()
  gpiolib: acpi: Move acpi_can_fallback_to_crs() out of __acpi_find_gpio()
  gpiolib: acpi: Simplify error handling in __acpi_find_gpio()
  gpiolib: acpi: Extract __acpi_find_gpio() helper
  gpio: sch: Utilise temporary variable for struct device
  gpio: sch: Switch to memory mapped IO accessors
  gpio: regmap: Use -ENOTSUPP consistently
  gpio: pcie-idio-24: Use -ENOTSUPP consistently
  Documentation: gpio: Replace leading TABs by spaces in code blocks
  gpiolib: acpi: Check for errors first in acpi_find_gpio()
  ...
2024-05-14 15:07:07 -07:00
Linus Torvalds
14a60290ed soc: drivers for 6.10
As usual, these are updates for drivers that are specific to certain
 SoCs or firmware running on them. Notable updates include
 
  - The new STMicroelectronics STM32 "firewall" bus driver that is
    used to provide a barrier between different parts of an SoC
 
  - Lots of updates for the Qualcomm platform drivers, in particular
    SCM, which gets a rewrite of its initialization code
 
  - Firmware driver updates for Arm FF-A notification interrupts
    and indirect messaging, SCMI firmware support for pin control
    and vendor specific interfaces, and TEE firmware interface
    changes across multiple TEE drivers
 
  - A larger cleanup of the Mediatek CMDQ driver and some related bits
 
  - Kconfig changes for riscv drivers to prepare for adding Kanaan
    k230 support
 
  - Multiple minor updates for the TI sysc bus driver, memory controllers,
    hisilicon hccs and more
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmY+dbEACgkQYKtH/8kJ
 UifGTBAA3lh2qw++S5i6nk71388/nswb5fZKwqPKl1m+44SndE7r0/nauGm7IZhd
 oM5xiBZzsoYCKuesSuejkBNgPmUPtUhyHBJKSKjwrcak4k1mrjDgXxfSxCqGptVZ
 Ps683koJ/Ic7O/LQNxlVzUlssG/3gmhJELfpaVIB7rG8pmdgF9ocM73+iJrRwW1Q
 fTFXUXeCcXJ2N5Yki7z2+4oB3RebPzTBz4NeIYNdGQj5/u61oG0KzXwvk8eqWhNb
 0KJYsfAQZGzdyAys6XU1MHv4T4L2a3DQL6NMgLnovVEMhP2Hk0XlBmI7X+uAXYiM
 2z289d9Wx3HMoiekulDJ+rpDUPxPXrEqaRkfWZ8G+HSY4KcIeSP7YGmhylr0kdvw
 +Qo6orxZ9lkSPaT1aUkNIIywDzet/E2hY8zV1EcLBu9GWjkybAvT/Uy2lSSN+LLH
 yEQyDf+s90N6QuZwdXN8a3QliP39tHqlye8wou6UQG8aZ7z870fKAKlvA6DjTfPM
 JyhY1rXYH/bvC87sVTi5Qb09+2R6ftvk5xijiMOyXugPpO/6PQKULVataeUnzwgs
 YTgOPhaqXVadDR/nkrG3FzEtvpYeTspwGpDiEpDrNHf5H1tFg6VfPNS8y0QOlSPY
 JcmylQNCtwxCRLTw2NHOb3tLcY4ruDHNmrWf5INTzf6cJe49jaU=
 =4rf0
 -----END PGP SIGNATURE-----

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

Pull SoC driver updates from Arnd Bergmann:
 "As usual, these are updates for drivers that are specific to certain
  SoCs or firmware running on them.

  Notable updates include

   - The new STMicroelectronics STM32 "firewall" bus driver that is used
     to provide a barrier between different parts of an SoC

   - Lots of updates for the Qualcomm platform drivers, in particular
     SCM, which gets a rewrite of its initialization code

   - Firmware driver updates for Arm FF-A notification interrupts and
     indirect messaging, SCMI firmware support for pin control and
     vendor specific interfaces, and TEE firmware interface changes
     across multiple TEE drivers

   - A larger cleanup of the Mediatek CMDQ driver and some related bits

   - Kconfig changes for riscv drivers to prepare for adding Kanaan k230
     support

   - Multiple minor updates for the TI sysc bus driver, memory
     controllers, hisilicon hccs and more"

* tag 'soc-drivers-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (103 commits)
  firmware: qcom: uefisecapp: Allow on sc8180x Primus and Flex 5G
  soc: qcom: pmic_glink: Make client-lock non-sleeping
  dt-bindings: soc: qcom,wcnss: fix bluetooth address example
  soc/tegra: pmc: Add EQOS wake event for Tegra194 and Tegra234
  bus: stm32_firewall: fix off by one in stm32_firewall_get_firewall()
  bus: etzpc: introduce ETZPC firewall controller driver
  firmware: arm_ffa: Avoid queuing work when running on the worker queue
  bus: ti-sysc: Drop legacy idle quirk handling
  bus: ti-sysc: Drop legacy quirk handling for smartreflex
  bus: ti-sysc: Drop legacy quirk handling for uarts
  bus: ti-sysc: Add a description and copyrights
  bus: ti-sysc: Move check for no-reset-on-init
  soc: hisilicon: kunpeng_hccs: replace MAILBOX dependency with PCC
  soc: hisilicon: kunpeng_hccs: Add the check for obtaining complete port attribute
  firmware: arm_ffa: Fix memory corruption in ffa_msg_send2()
  bus: rifsc: introduce RIFSC firewall controller driver
  of: property: fw_devlink: Add support for "access-controller"
  soc: mediatek: mtk-socinfo: Correct the marketing name for MT8188GV
  soc: mediatek: mtk-socinfo: Add entry for MT8395AV/ZA Genio 1200
  soc: mediatek: mtk-mutex: Add support for MT8188 VPPSYS
  ...
2024-05-13 08:48:42 -07:00
Lee Jones
cac5fd398b Merge branches 'ib-mfd-misc-pinctrl-regulator-6.10', 'ib-mfd-pinctrl-regulator-6.10' and 'ib-mfd-regulator-6.10' into ibs-for-mfd-merged 2024-05-10 15:38:46 +01:00
Arnd Bergmann
a3116c8881 RISC-V SoC Kconfig Updates for v6.10
A few different bits of SoC-related Kconfig work. The first part of
 this is shared with the DT updates - the modification of all SOC_CANAAN
 users to SOC_CANAAN_K210 to split the existing m-mode nommu k210 away
 from the k230 that is able to be used in a "common" kernel.
 
 The other thing here is the removal of most of the SOC_VENDOR options,
 with their ARCH_VENDOR equivalents that've been waiting in the wings for
 1 year+ now made visible. Due a lapse on my part when originally adding
 the ARCH_VENDOR stuff, the Microchip transition isn't complete - the
 _POLARFIRE was a mistake to keep as there's gonna be non-PolarFire
 RISC-V stuff from Microchip soonTM.
 
 Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZjUIHwAKCRB4tDGHoIJi
 0r8RAQD+B5rJde/sQuQlmkJGrmZfyE/6/I1ZFxv0/xHhRPNWRAD/RFTTDthL/7c4
 frMGl/nWSD3fvGmXrQ7Dp6wc1APIdQI=
 =BWHh
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmY57kAACgkQYKtH/8kJ
 Uie0Sg/8D8tZVOtBrpVJG/P5F7W1QdcC336GHBMQCho38C0/4AK5ltvdyxmSxmCl
 k84qaLdYNrGIvJ5o6MRmSAZyzT3y3jLYVA8C2Zsrp+Do8KkvvJGl219pUvp5A0J3
 eoMApJ34wx6dQM9LfpLcvU9C3Z767KeiiRm0h5CTV0IUfJnZB/7IQgwSajEGLOr/
 CHtFZpbYK6VgCDgVhbacSY8495jJrIU4i5RDlILst5K64XrmS2UU2oen2L3X/u8h
 xi5nQ//3qCiIfp5UqvBY12OYF8lVzB+F/Uo9vDCpeF9HFiIE69qMgYJiSviCPbwH
 T54zue+oBPGfL57HQoMTYQGUG4GvlnW7JR841GsIlPjrs54uw2kXDZB586n3tqzN
 esAQCc/sNnCuUX9TYKKBzkIrmQ1oTPRdGO61r+lSgxjYQ/ed++eh6KStlbPmttVo
 piEaxSpLS7TOZcVOyXHFrWK6OR4yB6MD6ZvOGJlJKJZSdfMNTlGcoymiJ0j7hVQb
 QJSr3LaIfQMP+Uf5ZWWlNZIxvwxQKER8v6MbyH3vGAVYa+DnDBzaj9Fh364thJnt
 Uybpz7SDQMIugnB+uSe+D1o65XfTEKOn/OHXYEQVYyoWs63QfTE9012+Q4KqBFBQ
 5ylIkvM9r3xMBkzZT3EU8lgr5gx9r5QQuX9czJ7INSBxo4SmuKE=
 =QGOJ
 -----END PGP SIGNATURE-----

Merge tag 'riscv-config-for-v6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into soc/drivers

RISC-V SoC Kconfig Updates for v6.10

A few different bits of SoC-related Kconfig work. The first part of
this is shared with the DT updates - the modification of all SOC_CANAAN
users to SOC_CANAAN_K210 to split the existing m-mode nommu k210 away
from the k230 that is able to be used in a "common" kernel.

The other thing here is the removal of most of the SOC_VENDOR options,
with their ARCH_VENDOR equivalents that've been waiting in the wings for
1 year+ now made visible. Due a lapse on my part when originally adding
the ARCH_VENDOR stuff, the Microchip transition isn't complete - the
_POLARFIRE was a mistake to keep as there's gonna be non-PolarFire
RISC-V stuff from Microchip soonTM.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>

* tag 'riscv-config-for-v6.10' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux:
  riscv: config: enable ARCH_CANAAN in defconfig
  RISC-V: drop SOC_VIRT for ARCH_VIRT
  RISC-V: drop SOC_SIFIVE for ARCH_SIFIVE
  RISC-V: drop SOC_MICROCHIP_POLARFIRE for ARCH_MICROCHIP
  RISC-V: Drop unused SOC_CANAAN
  reset: k210: Deprecate SOC_CANAAN and use SOC_CANAAN_K210
  pinctrl: k210: Deprecate SOC_CANAAN and use SOC_CANAAN_K210
  clk: k210: Deprecate SOC_CANAAN and use SOC_CANAAN_K210
  soc: canaan: Deprecate SOC_CANAAN and use SOC_CANAAN_K210 for K210
  riscv: Kconfig.socs: Split ARCH_CANAAN and SOC_CANAAN_K210

Link: https://lore.kernel.org/r/20240503-mardi-underling-3d81a9f97329@spud
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-05-07 11:02:56 +02:00
Bartosz Golaszewski
68a25c3671 intel-gpio for v6.10-1
* New driver for vGPIO controller on Intel Granite Rapids-D
 * Update ACPI GPIO library to unify the IRQ code path
 * Better GPIO IRQ line labeling for ACPI
 * Switched Intel SCH driver to use "mapped" I/O accessors
 
 The following is an automated git shortlog grouped by driver:
 
 Add Intel Granite Rapids-D vGPIO driver:
  - Add Intel Granite Rapids-D vGPIO driver
 
 crystalcove:
  -  Use -ENOTSUPP consistently
 
 gpiolib:
  -  acpi: Set label for IRQ only lines
  -  acpi: Add fwnode name to the GPIO interrupt label
  -  acpi: Pass con_id instead of property into acpi_dev_gpio_irq_get_by()
  -  acpi: Move acpi_can_fallback_to_crs() out of __acpi_find_gpio()
  -  acpi: Simplify error handling in __acpi_find_gpio()
  -  acpi: Extract __acpi_find_gpio() helper
  -  acpi: Check for errors first in acpi_find_gpio()
  -  acpi: Remove never true check in acpi_get_gpiod_by_index()
 
 sch:
  -  Utilise temporary variable for struct device
  -  Switch to memory mapped IO accessors
 
 wcove:
  -  Use -ENOTSUPP consistently
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEqaflIX74DDDzMJJtb7wzTHR8rCgFAmY4lK4ACgkQb7wzTHR8
 rCjo8Q//YaGaR/0ZEh9s8pz5lLNz7MiyW3pDrABrRqd68yR4GhQcyHiUaybIrVtf
 ayNoyLn7u9On/j8bVPhru3fYWNGazg0q4KnMJu4BgkNsCCP6KWERHKzVHLuXg52Y
 zQiUsOWxlESYNlIhl0COy/o87dTPxQ3omnthMUDYUEvxuUv6aNIC0uCpXmSNm0+/
 L9bZo7z6AiZMOeU7+XnoGuzWt2OeQjpR3liHo2zgR8ftPIp+iqjiRrA39+adXl7l
 LVro6F76p/xxNfGEzB4qxpz1jwHSkEhhFtcd13+t/CHXAm34BcAMbm1xJN1yHNmU
 e42CQ2gAOZo8F88iW4z56Wr446Uw0knf17Fe91Xd1CpqMdW0Hp9arta7awPoxh0R
 kHx5T71UkilX6+/CwREL7hiolvnNCO/q7djq/XeO//xPT67N0EU5mKZF/1yQiLWz
 NrJpNCRiQq2ZaHhOA0eS/4+iokpkLE0baeXsQhWrIjvFXfif8J82GiSgce1RzbHO
 v0yGeUHRJvY54zdXMKzCXEw+bgOyJZPmk4tZwq9XCkBcCrjxmR4cUtPCkv7B7QWN
 aSaeFh4AAQoSal8jMey/et+nctFZyO87aK8Enze9kzv/9FIc5837yXfz1qfjffPd
 E1m4RYh5t8DgC+msBjwbr1jcOM6FJ5KyEXXZf5CgAEzL5Bespm4=
 =33sC
 -----END PGP SIGNATURE-----

Merge tag 'intel-gpio-v6.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel into gpio/for-next

intel-gpio for v6.10-1

* New driver for vGPIO controller on Intel Granite Rapids-D
* Update ACPI GPIO library to unify the IRQ code path
* Better GPIO IRQ line labeling for ACPI
* Switched Intel SCH driver to use "mapped" I/O accessors

The following is an automated git shortlog grouped by driver:

Add Intel Granite Rapids-D vGPIO driver:
 - Add Intel Granite Rapids-D vGPIO driver

crystalcove:
 -  Use -ENOTSUPP consistently

gpiolib:
 -  acpi: Set label for IRQ only lines
 -  acpi: Add fwnode name to the GPIO interrupt label
 -  acpi: Pass con_id instead of property into acpi_dev_gpio_irq_get_by()
 -  acpi: Move acpi_can_fallback_to_crs() out of __acpi_find_gpio()
 -  acpi: Simplify error handling in __acpi_find_gpio()
 -  acpi: Extract __acpi_find_gpio() helper
 -  acpi: Check for errors first in acpi_find_gpio()
 -  acpi: Remove never true check in acpi_get_gpiod_by_index()

sch:
 -  Utilise temporary variable for struct device
 -  Switch to memory mapped IO accessors

wcove:
 -  Use -ENOTSUPP consistently
2024-05-07 09:42:06 +02:00
Linus Walleij
83906257f2 Samsung pinctrl drivers changes for v6.10
1. Add support for toggling bus clock (PCLK) for any pin controller
    register accesses.  This looks needed on newer Samsung chips, like
    Google GS101 and probably Exynos850.
 2. Drop old, deprecated in v6.1 bindings header with register constants.
    The constants were moved to DTS headers.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmY0qykQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD1ylZD/9Y+qotJz/GkLvFomo9sYmGbzuQowJRnYr7
 Twti8xeu8GUP1zye9QM4hLeBjKzdYUxCDAVHTwtDLQuzirgPQ93+DvmxJ1H8f4yT
 isZQhGAbhDnNb14ML/QDOGZueaZsK8Y08fuDCdLW8pWPrg6CsB4UhvoKRD5TgExq
 th8Slyo/aCaf8dVN3xgA1xu4A6yhosG/kCJIA1c2T5iyXJB6UZNBJGcB376vwRms
 yw/jqjQ/FOdWeuA/wDqXOZOlGuaoETJpFzS/+5tCKjE25IF2/PCR9lQeqSI1tglz
 pHIJ69eny+sEAlFcAgzhyr1wvRGnPthW1BqGcNpe1cJl07CnQj5K/SKyHBpp1nGu
 JV/RHCUrqWyzIyk0WNBx65eYpxr+9UldJ9PIU8N1vtPj59UUr4gP6hrYRiPAbvfT
 i/ObSYvczkRW4/DykPI3L8k87Wo/Lk7IJoR8siCQ5aPqpIo+9G/f5Hq+1CUSfAt8
 i5kNX3qNAMYVrsVfOAe9cWPNlpoO6caOqoE8zJgsRVbKR+1OlH3KOXPL6xf3CfJR
 oNYv4mxHzjdvI44cpPk5qp6QXi0GP3XfvcaYoguX32vrmn+/vjKyDTq7udDZXHDz
 ZWj/CrfnCOB9itM4wF848zwnH1kHF7/UP2/0M7WU0Wt35w5ZKK7bIGIEMZ2aSiMH
 ygycIEWs5Q==
 =wjQ1
 -----END PGP SIGNATURE-----

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

Samsung pinctrl drivers changes for v6.10

1. Add support for toggling bus clock (PCLK) for any pin controller
   register accesses.  This looks needed on newer Samsung chips, like
   Google GS101 and probably Exynos850.
2. Drop old, deprecated in v6.1 bindings header with register constants.
   The constants were moved to DTS headers.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-05-06 08:53:50 +02:00
Stefan Wahren
8ff05989b4 pinctrl: bcm2835: Make pin freeing behavior configurable
Until now after a bcm2835 pin was freed its pinmux was set to GPIO_IN.
So in case it was configured as GPIO_OUT before the configured output
level also get lost. As long as GPIO sysfs was used this wasn't
actually a problem because the pins and their possible output level
were kept by sysfs.

Since more and more Raspberry Pi users start using libgpiod they are
confused about this behavior. So make the pin freeing behavior of
GPIO_OUT configurable via module parameter. In case
pinctrl-bcm2835.persist_gpio_outputs is set to 1, the output level is
kept.

This patch based on the downstream work of Phil Elwell.

Link: https://github.com/raspberrypi/linux/pull/6117
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Message-ID: <20240503062745.11298-1-wahrenst@gmx.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-05-06 08:14:01 +02:00
Nirmala Devi Mal Nadar
2088297159 pinctrl: pinctrl-tps6594: Add TPS65224 PMIC pinctrl and GPIO
Add support for TPS65224 pinctrl and GPIOs to TPS6594 driver as they have
significant functional overlap.
TPS65224 PMIC has 6 GPIOS which can be configured as GPIO or other
dedicated device functions.

Signed-off-by: Nirmala Devi Mal Nadar <m.nirmaladevi@ltts.com>
Signed-off-by: Bhargav Raviprakash <bhargav.r@ltts.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/0109018f2fdce15d-c13bd809-a11b-4202-9b7f-c9380d51b070-000000@ap-south-1.amazonses.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-05-03 10:07:11 +01:00
Alex Bee
1bd97d64b5 pinctrl: rk805: Add rk816 pinctrl support
This adds support for RK816 to the exising rk805 pinctrl driver

It has a single pin which can be configured as input from a thermistor (for
instance in an attached battery) or as a gpio.

Signed-off-by: Alex Bee <knaerzche@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20240416161237.2500037-4-knaerzche@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-05-03 09:15:33 +01:00
Danila Tikhonov
5ed79863fa pinctrl: qcom: pinctrl-sm7150: Fix sdc1 and ufs special pins regs
SDC1 and UFS_RESET special pins are located in the west memory bank.

SDC1 have address 0x359a000:
0x3500000 (TLMM BASE) + 0x0 (WEST) + 0x9a000 (SDC1_OFFSET) = 0x359a000

UFS_RESET have address 0x359f000:
0x3500000 (TLMM BASE) + 0x0 (WEST) + 0x9f000 (UFS_OFFSET) = 0x359a000

Fixes: b915395c9e ("pinctrl: qcom: Add SM7150 pinctrl driver")
Signed-off-by: Danila Tikhonov <danila@jiaxyga.com>
Message-ID: <20240423203245.188480-1-danila@jiaxyga.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-05-03 09:55:04 +02:00
Linus Torvalds
e5c8fc5955 Pin control fixes for the v6.9 series:
- Fix a double-free in the pinctrl_enable() errorpath.
 
 - Fix a refcount leak in pinctrl_dt_to_map().
 
 - Fix selecting the GPIO pin control state and the UART3
   pin config group in the Intel Baytrail driver.
 
 - Fix readback of schmitt trigger status in the Mediatek
   Paris driver, along with some semantic pin config issues
   in this driver.
 
 - Fix a pin suffix typo in the Meson A1 driver.
 
 - Fix an erroneous register offset in he Aspeed G6 driver.
 
 - Fix an inconsistent lock state and the interrupt type on
   resume in the Renesas RZG2L driver.
 
 - Fix some minor confusion in the Renesas DT bindings.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEElDRnuGcz/wPCXQWMQRCzN7AZXXMFAmYwnFsACgkQQRCzN7AZ
 XXNOgw/9HiN5N8Z869DT92OOQn8cFAshkxB/oN9ltd/Mzc73RquNB6pSAB1k43t1
 6TnhHhMQOswflGOTR9aSdo96iHwx596D1nyCy56uSX9dGa2I9smwIpBoeT1rNTmM
 HEt0CbHAWJ93F2BTBXNy6/fgLM/fZtD4SiCSiUynluUA9s/mSx7JmA6Lly6WSQBF
 cRLj4DbVEKOUaHLcB90G0NI8VtJzjaRIdTkSqawd0SVVz+8vBmdLNWib6XvUsEP7
 rQMs5omy+NSOWK0gKOUzXVZaXq8glbah3lZtFBZkZPjr13ymRjAipyhS0K3G6xhS
 9jCSYfkwnpO3xb/D9/ZYhDd2FC3bQmphxMIzb/LYWoNDp6mdyQxbGtnO5lco9fI1
 TcOfMpP24M6Eong9xiFUiIY/yghX10yBsbWzwX6qEO8O85DHmH0JWu8akHhKKPwJ
 7W1uWxAtC0URWSG3qEDpcUzB8shWK7T5jNjgvsDn/cUyQ7WXk1XjOa17U1Ka019R
 v+XvJ0Z0RHn2eqKme9OfX6W5zC0fD4P5nQpE6KW051U0/wSyQVGPTzcIJGa23JeF
 ZvS/2te2dsmCZtlg0lmwdzi10p3QmFZ4t1xbxVgXt2VMvD6zWRwtyP76O4Nwbwg2
 OaLQVVbinDZQ90e1FaYSWNNN8jTuUo781kEZiq6gEaJfnlblV5A=
 =BG4d
 -----END PGP SIGNATURE-----

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

Pull pin control fixes from Linus Walleij:

 - Fix a double-free in the pinctrl_enable() errorpath

 - Fix a refcount leak in pinctrl_dt_to_map()

 - Fix selecting the GPIO pin control state and the UART3 pin config
   group in the Intel Baytrail driver

 - Fix readback of schmitt trigger status in the Mediatek Paris driver,
   along with some semantic pin config issues in this driver

 - Fix a pin suffix typo in the Meson A1 driver

 - Fix an erroneous register offset in he Aspeed G6 driver

 - Fix an inconsistent lock state and the interrupt type on resume in
   the Renesas RZG2L driver

 - Fix some minor confusion in the Renesas DT bindings

* tag 'pinctrl-v6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: renesas: rzg2l: Configure the interrupt type on resume
  pinctrl: devicetree: fix refcount leak in pinctrl_dt_to_map()
  pinctrl: baytrail: Add pinconf group for uart3
  pinctrl: baytrail: Fix selecting gpio pinctrl state
  pinctrl: mediatek: paris: Rework support for PIN_CONFIG_{INPUT,OUTPUT}_ENABLE
  pinctrl: mediatek: paris: Fix PIN_CONFIG_INPUT_SCHMITT_ENABLE readback
  pinctrl: core: delete incorrect free in pinctrl_enable()
  pinctrl/meson: fix typo in PDM's pin name
  pinctrl: pinctrl-aspeed-g6: Fix register offset for pinconf of GPIOR-T
  pinctrl: renesas: rzg2l: Execute atomically the interrupt configuration
  dt-bindings: pinctrl: renesas,rzg2l-pinctrl: Allow 'input' and 'output-enable' properties
2024-04-30 08:50:58 -07:00
Krzysztof Kozlowski
e5b3732a96 pinctrl: samsung: drop redundant drvdata assignment
Fix W=1 warning:

  drivers/pinctrl/samsung/pinctrl-samsung.c: In function ‘samsung_gpio_set_direction’:
  drivers/pinctrl/samsung/pinctrl-samsung.c:633:42: warning: variable ‘drvdata’ set but not used [-Wunused-but-set-variable]

Fixes: f9c7447479 ("pinctrl: samsung: support a bus clock")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202404300825.6lxLwvUY-lkp@intel.com/
Reviewed-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20240430060304.12332-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-04-30 09:41:58 +02:00
Arnd Bergmann
21cbc1058a Arm SCMI updates for v6.10
1. Basic support for SCMI v3.2 pincontrol protocol
 
    SCMI v3.2 introduces pincontrol protocol which is intended for
    controlling pins and their configuration. The pin control protocol
    provides commands to:
    - List the pins, groups of pins, available functions, and their
      association with each other.
    - Set the parameter configuration and multiplexing of the pins or
      groups of pins
    - Optionally request exclusive access to a pin or group of pins.
    - Optionally configure the permissions of an agent to access a pin
      or group of pins.
 
   These changes adds basic support for the same in the SCMI core layer
   and an implementation of the generic scmi-pinctrl driver with associated
   DT bindings.
 
 2. Framework support for multiple vendors custom protocols
 
    With the fixed space for vendor protocols, the possibility of having
    multiple vendors implementing distinct SCMI vendor protocols with
    the same overlapping protocol number is very high and with the need
    to support them all in a single kernel image or a module is also high.
 
    In order to implement the same we assume:
    - vendor protocols has to be tagged at build time with a vendor_id
    - vendor protocols could also optionally be tagged at build time with
      sub_vendor_id and implementation version
 
   At the initialisation all the built vendor protocols are registered
   with the SCMI core using a key derived from the above tags
 
 3. Logging and tracing improvements
 
    This includes using dev_err_probe() to bail out from probe, adding
    message dump traces for bad and unexpected replies and widening of
    the tag buffer in trace_scmi_dump_msg to allow diverse tag names
 
 4. Miscellaneous updates or improvements
 
    This includes adding the accessor function get_max_msg_size() used
    in pinctl protocol, updation of dt-bindings examples for protocol@13
    to promote new bindings and simplification of scmi_devm_notifier_unregister
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEunHlEgbzHrJD3ZPhAEG6vDF+4pgFAmYrfzYACgkQAEG6vDF+
 4phXdw//ZmvCV76D3XGJsXnc2Ivv/uaOZKRhzI+IKn0U529hI2YscA9BfhiLZOOI
 68KqWiScMTGH5Zn1oDC5wpIEj0i3S/2ZdXZXWSN35+ccsz6y2hbf2q2ciMl1Vrf0
 co8kxiDABI+RBeGpiSVQ2Yp6TEnxkiNDNAfON+A+xxbHhhLxGLcCCO33xbJ9Ui7e
 QpW2xan7AiSANRTUdvM21h00Uy1O/kAkcZJC2oLtCjUr3lzczrZkBCIor0jBE4VB
 SmM9vvcjWdfLVdfgxeFEAFvxN0fI9RT8ALRyfWbnPcCb37GUUMwS+J/Dz+P3yUa9
 6vGz4CCdXpC1lxcM2z5cZsAqwk3WS8LU840lJyb2+gGxLoSPwr1z0NWNCqZQppkp
 5LDaFh2v5b34epMHRkNUHTytMBHy5p9c81TOSYH7S2bEsQTOi9qjviH0RqSjyR5A
 s9+dlxfUiZfoE71UYQLO2E0knu3AwIRQ6oEkhbmLFedOVegkoTeYkaAfdyEAO+SH
 vqLEX88wwMU6B+bjDnN7lYTuSXbZVKu66TZk6oqMVnv2BQ29pmOR3AFQdFNpLA8W
 lRygSMEbADzNuJla5Az+VH2tWf1hOmpSsMIOAJbZ6/drv0yFnbBwgtGkAmkqEr68
 IQxwJTVQmPlgqpsCATzV29qgSEosHDJo9LZw9/DtgTx5qGL/to0=
 =WRU/
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmYwB/YACgkQYKtH/8kJ
 UicgvxAAh8OV+YcHzBTHdsHDc7iQkb9tmvZg6Cw4sYP8AJ3zZ2NjRYJXLYxxzE6T
 l+W8DIeV3ZQow+B/x6Xexdz9P/NKnxlTPO1/Z7hGpC2aDiBkseP3WliIJgBH0+iF
 m6p3VOSVKcfM8vds0d5l35ITHL0eVJzb7bN6PKUR75I2cDJ2UDbWV6OadNNyt4tX
 eEkCNnmuTx1bhpRXLpAXpEBb4FdbFNc5cSJHw9nbdCyQ8vFtHkaH82L9MCjy4kaW
 fSRwkNzqwWOA2tS3tkDvsczF4360RKoL95Y92lrQVTlnMjGLaUsCbs8FDKwHNZKb
 6hBoiYQERmhGvb76+34kbMM50MyWohjzZcbCL6o3cU195KWJCN1a1cUbq8J+H7k1
 MeK0XuwYUu6HdApwI6AfHl9vCvyJB9/XsvWz1eEocbmP8M2aPeXtl8y3vImZ6rkX
 aj/a9HuSKpAncqsdvpz4FoC0Q16gMZYtW6257kHcPX3QHvRlzJk7fHuqqIAQUsSf
 prOfYGBCvBuPT3S+bgG7L74Ddt4JLGHYjDxdNP4DR9xLR62ek2eQWc+cVqooatoA
 ZNckHV6Bibegtb+p/5RWgFem1XAOePM5gC1i5gvqy3oqsAQDrAd9Mx6s97AfrPzN
 dU9WTMohCjebdyqxYDGb31xzi5VY/L3/UJp3X9moJqbajXX+ty4=
 =Yce+
 -----END PGP SIGNATURE-----

Merge tag 'scmi-updates-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/drivers

Arm SCMI updates for v6.10

1. Basic support for SCMI v3.2 pincontrol protocol

   SCMI v3.2 introduces pincontrol protocol which is intended for
   controlling pins and their configuration. The pin control protocol
   provides commands to:
   - List the pins, groups of pins, available functions, and their
     association with each other.
   - Set the parameter configuration and multiplexing of the pins or
     groups of pins
   - Optionally request exclusive access to a pin or group of pins.
   - Optionally configure the permissions of an agent to access a pin
     or group of pins.

  These changes adds basic support for the same in the SCMI core layer
  and an implementation of the generic scmi-pinctrl driver with associated
  DT bindings.

2. Framework support for multiple vendors custom protocols

   With the fixed space for vendor protocols, the possibility of having
   multiple vendors implementing distinct SCMI vendor protocols with
   the same overlapping protocol number is very high and with the need
   to support them all in a single kernel image or a module is also high.

   In order to implement the same we assume:
   - vendor protocols has to be tagged at build time with a vendor_id
   - vendor protocols could also optionally be tagged at build time with
     sub_vendor_id and implementation version

  At the initialisation all the built vendor protocols are registered
  with the SCMI core using a key derived from the above tags

3. Logging and tracing improvements

   This includes using dev_err_probe() to bail out from probe, adding
   message dump traces for bad and unexpected replies and widening of
   the tag buffer in trace_scmi_dump_msg to allow diverse tag names

4. Miscellaneous updates or improvements

   This includes adding the accessor function get_max_msg_size() used
   in pinctl protocol, updation of dt-bindings examples for protocol@13
   to promote new bindings and simplification of scmi_devm_notifier_unregister

* tag 'scmi-updates-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  pinctrl: Implementation of the generic scmi-pinctrl driver
  firmware: arm_scmi: Add basic support for SCMI v3.2 pincontrol protocol
  dt-bindings: firmware: Support SCMI pinctrl protocol
  firmware: arm_scmi: Introduce get_max_msg_size() helper/accessor
  firmware: arm_scmi: Add support for multiple vendors custom protocols
  dt-bindings: firmware: arm,scmi: Update examples for protocol@13
  firmware: arm_scmi: Avoid non-constant printk format strings
  firmware: arm_scmi: Use dev_err_probe to bail out
  firmware: arm_scmi: Simplify scmi_devm_notifier_unregister
  firmware: arm_scmi: Add message dump traces for bad and unexpected replies
  firmware: arm_scmi: Add helper to trace bad messages
  include: trace: Widen the tag buffer in trace_scmi_dump_msg
  firmware: arm_scmi: Log the perf domain names in the error paths

Link: https://lore.kernel.org/r/20240426105031.1526987-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-04-29 22:49:58 +02:00
André Draszik
f9c7447479 pinctrl: samsung: support a bus clock
On some Samsung-based SoCs there are separate bus clocks / gates each
for each pinctrl instance. To be able to access each pinctrl instance's
registers, this bus clock needs to be running, otherwise register
access will hang. Google Tensor gs101 is one example for such an
implementation.

Update the driver to handle this optional bus clock:
* handle an optional bus clock from DT
* prepare it during driver probe
* enclose all relevant register accesses with a clock enable & disable

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20240426-samsung-pinctrl-busclock-v3-2-adb8664b8a7e@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2024-04-29 19:19:30 +02:00
Linus Walleij
dbe0ed3302 pinctrl: renesas: Updates for v6.10
- Add external interrupt pin groups on R-Car V4M,
   - Miscellaneous fixes and improvements.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCZitfrwAKCRCKwlD9ZEnx
 cPl0AP4uqQhymD3BnSqmzMQkAE8vHgco6isSm2QHRBBc5im8JAEA/5pa0AohDp+5
 eIF4/FHpeEjMSDyWVWZW3ABoi0UQVwA=
 =91h0
 -----END PGP SIGNATURE-----

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

pinctrl: renesas: Updates for v6.10

  - Add external interrupt pin groups on R-Car V4M,
  - Miscellaneous fixes and improvements.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-04-29 14:30:52 +02:00
Linus Walleij
ac816e9eb5 intel-pinctrl for v6.9-1
* Correct GPIO selection and add UART3 pins for Intel Bay Trail
 
 The following is an automated git shortlog grouped by driver:
 
 baytrail:
  -  Add pinconf group for uart3
  -  Fix selecting gpio pinctrl state
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEqaflIX74DDDzMJJtb7wzTHR8rCgFAmYqSJwACgkQb7wzTHR8
 rChWdg/8DbivW9byob4ITp1xCTnf9D+yIwVKWb98122xHD6ENXjqTZDPqvO5XKLK
 jiOhIJaeDn30PbB7CCm+HKQ+Q5sj/fa5q4Q4X+YityntVcdCs98ZJzpmKX3wUU0T
 LjlnUM9+Od7ExypVncUWrKFx3yPmmxXMm9DCm3EE3JYxrb7yBEXAnADdC9ylP0tD
 5CqUB3pvL4hgl0x5UXl+UJvlWeO4j/TrFbJMzJV/jF8gQHm7B8gKjebc5gpvNbVo
 SOmuyMRhAW9VCIGkMxIltUaKjza7Qkca0OVbCA2CKblVvGEMq/QYbf1L1VP0HF3B
 UGm9NxwJJtmy+kUzEuwSg41gxrqonISmIySCYjbonYLbOFQZYWip8ZBSCgmBUhv3
 3kCiqCC5gQEGjpC5OMJ3MhbY/IdMsrtipDjNa4uwyPUJwhqVKIEESJwZnabMjfbi
 bmy2Y+fbKil/0OLwwIsybI64obnVgcGj9UAoD7/pU0+7UsA6+lY/UzPbeL2oC38t
 OERXibLaFf4NJ6NJDowdu3Rlijy8HRGFdlEAREMzydBXuWGMrNMneluIuCMtyiAd
 /KF+cAHoFKRrD0piA9R54SYqK93rqjJgu81huko3/xnZmQGdDGj8Qy6ssDA6Aoax
 GS4cRr/LMGpiRX5/f5v+vySBSRf4cezkICGief5uWxLOiIJNW7A=
 =PWTy
 -----END PGP SIGNATURE-----

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

intel-pinctrl for v6.9-1

* Correct GPIO selection and add UART3 pins for Intel Bay Trail

The following is an automated git shortlog grouped by driver:

baytrail:
 -  Add pinconf group for uart3
 -  Fix selecting gpio pinctrl state
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-04-25 14:30:54 +02:00
Linus Walleij
7fb1fe37a1 pinctrl: renesas: Fixes for v6.9 (take two)
- Fix interrupt configuration on RZ/G2L after s2ram.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCZiobmAAKCRCKwlD9ZEnx
 cLw/AQDo44Mpw5I6DMkZCg3D9ux6LrSkgGj+BpYUb45n9k2sSgD8CXWktVXYrXd2
 mUtT+Kf8GWa+i2QP7Y/MDqF46pqRxw0=
 =pkn9
 -----END PGP SIGNATURE-----

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

pinctrl: renesas: Fixes for v6.9 (take two)

  - Fix interrupt configuration on RZ/G2L after s2ram.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-04-25 14:28:31 +02:00
Paul Barker
cd27553b0d pinctrl: renesas: rzg2l: Limit 2.5V power supply to Ethernet interfaces
The RZ/G3S SoC supports configurable supply voltages for several of its
I/O interfaces. All of these interfaces support both 1.8V and 3.3V
supplies, but only the Ethernet and XSPI interfaces support a 2.5V
supply.

Voltage selection for the XSPI interface is not yet supported, so this
leaves only the Ethernet interfaces currently supporting selection of a
2.5V supply. So we need to return an error if there is an attempt to
select a 2.5V supply for any non-Ethernet interface.

Fixes: 51996952b8 ("pinctrl: renesas: rzg2l: Add support to select power source for Ethernet pins")
Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20240417114132.6605-1-paul.barker.ct@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2024-04-25 10:35:05 +02:00
Geert Uytterhoeven
21fc4d1959 pinctrl: renesas: r8a779h0: Add INTC-EX pins, groups, and function
Add pins, groups, and function for the Interrupt Controller for External
Devices (INTC-EX) on the Renesas R-Car V4M (R8A779H0) SoC.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/258d03b27b77f60cc03fc3257bb4c6715b612a61.1713282028.git.geert+renesas@glider.be
2024-04-23 09:39:23 +02:00
Geert Uytterhoeven
c3bec9547c pinctrl: renesas: r8a779h0: Fix IRQ suffixes
The suffixes of the IRQ identifiers, as used for pins related to the
Interrupt Controller for External Devices (INTC-EX), are inconsistent.
Correct them to match the Pin Multiplex attachment in Rev.0.51 of the
R-Car V4M Series Hardware User's Manual.

Fixes: 291f7856fc ("pinctrl: renesas: Initial R8A779H0 (R-Car V4M) PFC support")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/7d3c7498d9e8eda5583b15f9163eb25bb797ed24.1713282028.git.geert+renesas@glider.be
2024-04-23 09:39:23 +02:00
Lad Prabhakar
2487dc87ae pinctrl: renesas: rzg2l: Remove extra space in function parameter
Remove unnecessary space in rzg2l_pinctrl_pm_setup_pfc() function
parameter.

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/r/20240226192530.141945-1-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2024-04-23 09:38:33 +02:00
Claudiu Beznea
02cd2d3be1 pinctrl: renesas: rzg2l: Configure the interrupt type on resume
Commit dce0919c83 ("irqchip/renesas-rzg2l: Do not set TIEN and TINT
source at the same time") removed the setup of TINT from
rzg2l_irqc_irq_enable().  To address the spurious interrupt issue the
setup of TINT has been moved in rzg2l_tint_set_edge() through
rzg2l_disable_tint_and_set_tint_source().  With this, the interrupts are
not properly re-configured after a suspend-to-RAM cycle.  To address
this issue and avoid spurious interrupts while resumming set the
interrupt type before enabling it.

Fixes: dce0919c83 ("irqchip/renesas-rzg2l: Do not set TIEN and TINT source at the same time")
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20240419063822.3467424-1-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2024-04-22 09:54:00 +02:00
Peng Fan
eb524cb651 pinctrl: Implementation of the generic scmi-pinctrl driver
scmi-pinctrl driver implements pinctrl driver interface and using
SCMI protocol to redirect messages from pinctrl subsystem SDK to
SCMI platform firmware, which does the changes in HW.

Co-developed-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20240418-pinctrl-scmi-v11-4-499dca9864a7@nxp.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-04-19 15:17:37 +01:00
Peng Fan
3ba11e684d pinctrl: pinconf-generic: print hex value
Hex value will be easier to match hardware register bits layout,
so same as pinconf_generic_dump_config, print hex value.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Message-ID: <20240412005128.2937486-1-peng.fan@oss.nxp.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-04-17 10:53:44 +02:00
Linus Walleij
398c9955bd pinctrl: renesas: Fixes for v6.9
- Fix a dtbs_check warning on RZ/G3S,
   - Fix a lockdep warning on RZ/G2L.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCZhkDAgAKCRCKwlD9ZEnx
 cA0nAQC3qUp+KQ9D53F1Mr5FdQd4GhNsqEG/iFxHkkrlKLyMwQEA7nQHcu2xseeS
 7C4wQROe2+DNdks5u3ye7IA7YtntYgY=
 =wObz
 -----END PGP SIGNATURE-----

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

pinctrl: renesas: Fixes for v6.9

  - Fix a dtbs_check warning on RZ/G3S,
  - Fix a lockdep warning on RZ/G2L.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-04-17 10:51:19 +02:00
Krzysztof Kozlowski
9d2df36538 pinctrl: realtek: fix module autoloading
Add MODULE_DEVICE_TABLE(), so the module could be properly autoloaded
based on the alias from of_device_id table.  Pin controllers are
considered core components, so usually they are built-in, however these
can be built and used as modules on some generic kernel.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Message-ID: <20240411064614.7409-5-krzk@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-04-17 10:43:50 +02:00
Krzysztof Kozlowski
abda4619f4 pinctrl: qcom: sm7150: fix module autoloading
Add MODULE_DEVICE_TABLE(), so the module could be properly autoloaded
based on the alias from of_device_id table.  Pin controllers are
considered core components, so usually they are built-in, however these
can be built and used as modules on some generic kernel.

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Message-ID: <20240411064614.7409-4-krzk@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-04-17 10:43:50 +02:00
Krzysztof Kozlowski
75589d6b11 pinctrl: loongson2: fix module autoloading
Add MODULE_DEVICE_TABLE(), so the module could be properly autoloaded
based on the alias from of_device_id table.  Pin controllers are
considered core components, so usually they are built-in, however these
can be built and used as modules on some generic kernel.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Message-ID: <20240411064614.7409-3-krzk@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-04-17 10:43:50 +02:00
Krzysztof Kozlowski
d42005c03a pinctrl: mediatek: fix module autoloading
Add MODULE_DEVICE_TABLE(), so the module could be properly autoloaded
based on the alias from of_device_id table.  Pin controllers are
considered core components, so usually they are built-in, however these
can be built and used as modules on some generic kernel.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Message-ID: <20240411064614.7409-2-krzk@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-04-17 10:43:50 +02:00
Krzysztof Kozlowski
a310822fe7 pinctrl: freescale: imx8ulp: fix module autoloading
Add MODULE_DEVICE_TABLE(), so the module could be properly autoloaded
based on the alias from of_device_id table.  Pin controllers are
considered core components, so usually they are built-in, however these
can be built and used as modules on some generic kernel.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Message-ID: <20240411064614.7409-1-krzk@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-04-17 10:43:50 +02:00
Zeng Heng
a0cedbcc88 pinctrl: devicetree: fix refcount leak in pinctrl_dt_to_map()
If we fail to allocate propname buffer, we need to drop the reference
count we just took. Because the pinctrl_dt_free_maps() includes the
droping operation, here we call it directly.

Fixes: 91d5c5060e ("pinctrl: devicetree: fix null pointer dereferencing in pinctrl_dt_to_map")
Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Zeng Heng <zengheng4@huawei.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Message-ID: <20240415105328.3651441-1-zengheng4@huawei.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-04-16 15:32:48 +02:00
Andy Shevchenko
57b60ec4b3 gpiolib: acpi: Pass con_id instead of property into acpi_dev_gpio_irq_get_by()
Pass the con_id instead of property so that callers won't repeat
the GPIO suffixes to try.

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2024-04-15 16:12:18 +03:00
Hans de Goede
5d10a157eb pinctrl: baytrail: Add pinconf group for uart3
GPIO_S0_SC57 / GPIO_S0_SC61 can be muxed to PCU_UART_TXD / PCU_UART_RXD,
add a pinconf group for this.

On Bay Trail board schematics using these pins as UART these are
called UART3_TXD / UART3_RXD, name the pinconf group "uart3_grp"
to be consistent with the schematics.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2024-04-08 17:54:48 +03:00
Hans de Goede
fed6d9a8e6 pinctrl: baytrail: Fix selecting gpio pinctrl state
For all the "score" pin-groups all the intel_pingroup-s to select
the non GPIO function are re-used for byt_score_gpio_groups[].

But this is incorrect since a pin-group includes the mode setting,
which for the non GPIO functions generally is 1, where as to select
the GPIO function mode must be set to 0.

So the GPIO function needs separate intel_pingroup-s with their own mode
value of 0.

Add a new PIN_GROUP_GPIO macro which adds a foo_gpio entry to each
pin-group defined this way and update byt_score_gpio_groups[] to point
to the new foo_gpio entries.

The "sus" usb_oc_grp usb_ulpi_grp and pcu_spi_grp pin-groups are special
because these have a non 0 mode value to select the GPIO functions and
these already have matching foo_gpio pin-groups, leave these are unchanged.

The pmu_clk "sus" groups added in commit 2f46d7f7e9 ("pinctrl: baytrail:
Add pinconf group + function for the pmu_clk") do need to use the new
PIN_GROUP_GPIO macro.

Fixes: 2f46d7f7e9 ("pinctrl: baytrail: Add pinconf group + function for the pmu_clk")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2024-04-08 17:54:48 +03:00
Andy Shevchenko
932640c0f7 pinctrl: Use DEFINE_SHOW_STORE_ATTRIBUTE() helper for debugfs
Use DEFINE_SHOW_STORE_ATTRIBUTE() helper for read-write file to reduce some
duplicated code.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Message-ID: <20240404193521.3581399-1-andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-04-08 11:01:18 +02:00
Yangyu Chen
c1556a9b42 pinctrl: k210: Deprecate SOC_CANAAN and use SOC_CANAAN_K210
Since SOC_FOO should be deprecated from patch [1], and cleanup for other
SoCs is already in the mailing list [2,3,4], we remove the use of
SOC_CANAAN and introduced SOC_CANAAN_K210 for K210-specific drivers,

Thus, we replace its drivers depends on SOC_CANAAN_K210 and default select
when it has the symbol SOC_CANAAN_K210.

[1] https://lore.kernel.org/linux-riscv/20221121221414.109965-1-conor@kernel.org/
[2] https://lore.kernel.org/linux-riscv/20240305-praying-clad-c4fbcaa7ed0a@spud/
[3] https://lore.kernel.org/linux-riscv/20240305-fled-undrilled-41dc0c46bb29@spud/
[4] https://lore.kernel.org/linux-riscv/20240305-stress-earflap-d7ddb8655a4d@spud/

Signed-off-by: Yangyu Chen <cyy@cyyself.name>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
2024-04-05 16:42:50 +01:00
Matthijs Kooijman
b5fe46efc1 pinctrl: single: Fix PIN_CONFIG_BIAS_DISABLE handling
The pinctrl-single driver handles pin_config_set by looking up the
requested setting in a DT-defined lookup table, which defines what bits
correspond to each setting. There is no way to add
PIN_CONFIG_BIAS_DISABLE entries to the table, since there is instead
code to disable the bias by applying the disable values of both the
pullup and pulldown entries in the table.

However, this code is inside the table-lookup loop, so it would only
execute if there is an entry for PIN_CONFIG_BIAS_DISABLE in the table,
which can never exist, so this code never runs.

This commit lifts the offending code out of the loop, so it just
executes directly whenever PIN_CONFIG_BIAS_DISABLE is requested,
skippipng the table lookup loop.

This also introduces a new `param` variable to make the code slightly
more readable.

This bug seems to have existed when this code was first merged in commit
9dddb4df90 ("pinctrl: single: support generic pinconf"). Earlier
versions of this patch did have an entry for PIN_CONFIG_BIAS_DISABLE in
the lookup table, but that was removed, which is probably how this bug
was introduced.

Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
Reviewed-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Message-ID: <20240319110633.230329-1-matthijs@stdin.nl>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-04-04 21:03:25 +02:00
Christophe JAILLET
a95e2bc817 pinctrl: pinctrl-single: Remove some unused fields in struct pcs_function
In "struct pcs_function", the 'pgnames' and 'npgnames' fields are unused.
This is a left-over from commit 571aec4df5 ("pinctrl: single: Use generic
pinmux helpers for managing functions");

Remove them.

Found with cppcheck, unusedStructMember.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Message-ID: <a6b653642298d35b1e3656e9bfc6d1b322fbbe68.1712004518.git.christophe.jaillet@wanadoo.fr>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-04-04 21:03:25 +02:00