Commit Graph

5916 Commits

Author SHA1 Message Date
Linus Torvalds
25c456dab5 MFD for v7.1
* Core:
     * Add a resource-managed version of alloc_workqueue() (`devm_alloc_workqueue()`)
   * Apple SMC:
     * Wire up the Apple SMC power driver by adding a new MFD cell
   * Broadcom BCM2835 PM:
     * Add support for the BCM2712 power management device
     * Introduce a hardware type identifier to distinguish SoC variants
   * Intel LPSS:
     * Add PCI IDs for the Intel Nova Lake-H platform
 
   * Core:
     * Preserve the Open Firmware (OF) node when an ACPI handle is present
   * Atmel HLCDC:
     * Fetch the LVDS PLL clock as a fallback if the generic sys_clk is unavailable
   * EZX PCAP:
     * Avoid rescheduling after destroying the workqueue by switching to a device-managed workqueue
   * Freescale MC13xxx:
     * Fix a memory leak in subdevice platform data allocation by using devm_kmemdup()
   * Intel LPC ICH:
     * Expose a software node for the GPIO controller cell to fix GPIO lookups
   * MediaTek MT6397:
     * Correct the hardware CIDs for the MT6328, MT6331, and MT6332 PMICs to allow proper driver
       binding
   * ROHM BD71828:
     * Enable system wakeup via the power button
   * STMicroelectronics STPMIC1:
     * Attempt system shutdown a second time to handle transient I2C communication failures
 
   * Congatec CGBC, KEMPLD, RSMU, Si476x:
     * Fix various kernel-doc warnings and correct struct member names
   * DLN2:
     * Drop redundant USB device references and switch to managed resource allocations
     * Update bare 'unsigned' types to 'unsigned int'
   * ENE KB3930:
     * Use the of_device_is_system_power_controller() wrapper
   * EZX PCAP:
     * Drop redundant memory allocation error messages
     * Return directly instead of using empty goto statements
   * Maxim MAX77705:
     * Make the max77705_pm_ops variable static to resolve a sparse warning
   * Viperboard:
     * Drop redundant USB device references
 
   * SpacemiT P1:
     * Drop the deprecated "vin-supply" property from the devicetree bindings
 
   * SpacemiT P1:
     * Add individual regulator supply properties to match actual hardware topology
   * Maxim MAX77620:
     * Convert devicetree bindings from TXT to YAML format
     * Document an optional I2C address for the MAX77663 RTC device
   * ROHM BD72720:
     * Add a new compatible string for the ROHM BD73900 PMIC
   * Freescale i.MX25 TSADC:
     * Convert devicetree bindings from TXT to YAML format
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmnl4F8ACgkQUa+KL4f8
 d2HwnRAAjLNnENBowYZeXNsi7QXTyoZPUtJmVEqALKgHZ1SGtUtitw4eaKLn+KC/
 qWUBuglp4YOmue0xf+HmJhEL+hnixzGH0XxbYDdlKPXyk9xxf2UEXushq3+DlwX8
 QA4tznLqxjrHZNvMZoNODRZXkec6PHluYJdUuXZsfXFltR8nfsEmRcrtCgM07TGj
 dBWfbuAIyUnWZss0IaZdWOjxE1LHCT+hBVY7eUkj3DhNKxLgonmCCMysAnlTQV/G
 g9qQbAZtJXL5Km/DJTpRaPj0G0RMjnpi8KJEI7RVCLWT0mDpoSvvoF2xjEUDDVc5
 4M3TI9SFgfNYNZ8IcAAZROVXTjNVEdW4OgbCc7T/GCuxnycGxZJelPJPwNCZQ5LN
 xyKmj9zT6GdTc33l0fxURaFj3gq2NC1WZ018updjmSa7iOAU3zeEKMM3FA0TieMP
 SbOzx661CjaH+6ZIDZ8aQzcGd5OAEy19jzOH7fT9lfkpRU95tU/VWud50PPe0jj0
 1wXTXHHXJ+/k837h4aK+3WDcb/+SwUuUyLY7kZnfW9G+3m9j8VJyu7TjiEfmqRNW
 r7SXFn/y5DEDQIk8ktGa3aAtHQK5bImfodeyw4wHCOa8MHSSfQxbdT+FIKvPSgFv
 30FtCh9azwOQjcdK8bNgE+e+JTgYoM4DUiJ67V8HWaS9sFXBYLc=
 =S0In
 -----END PGP SIGNATURE-----

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

Pull MFD updates from Lee Jones:
 "Core:
   - Add a resource-managed version of alloc_workqueue()
     (`devm_alloc_workqueue()`)
   - Preserve the Open Firmware (OF) node when an ACPI handle
     is present

  Apple SMC:
   - Wire up the Apple SMC power driver by adding a new MFD cell

  Atmel HLCDC:
   - Fetch the LVDS PLL clock as a fallback if the generic sys_clk
     is unavailable

  Broadcom BCM2835 PM:
   - Add support for the BCM2712 power management device
   - Introduce a hardware type identifier to distinguish SoC variants

  Congatec CGBC, KEMPLD, RSMU, Si476x:
   - Fix various kernel-doc warnings and correct struct member names

  DLN2:
   - Drop redundant USB device references and switch to managed
     resource allocations
   - Update bare 'unsigned' types to 'unsigned int'

  ENE KB3930:
   - Use the of_device_is_system_power_controller() wrapper

  EZX PCAP:
   - Avoid rescheduling after destroying the workqueue by switching
     to a device-managed workqueue
   - Drop redundant memory allocation error messages
   - Return directly instead of using empty goto statements

  Freescale i.MX25 TSADC:
   - Convert devicetree bindings from TXT to YAML format

  Freescale MC13xxx:
   - Fix a memory leak in subdevice platform data allocation by
     using devm_kmemdup()

  Intel LPC ICH:
   - Expose a software node for the GPIO controller cell to fix
     GPIO lookups

  Intel LPSS:
   - Add PCI IDs for the Intel Nova Lake-H platform

  Maxim MAX77620:
   - Convert devicetree bindings from TXT to YAML format
   - Document an optional I2C address for the MAX77663 RTC device

  Maxim MAX77705:
   - Make the max77705_pm_ops variable static to resolve a
     sparse warning

  MediaTek MT6397:
   - Correct the hardware CIDs for the MT6328, MT6331, and MT6332
     PMICs to allow proper driver binding

  ROHM BD71828:
   - Enable system wakeup via the power button

  ROHM BD72720:
   - Add a new compatible string for the ROHM BD73900 PMIC

  SpacemiT P1:
   - Drop the deprecated "vin-supply" property from the devicetree
     bindings
   - Add individual regulator supply properties to match actual
     hardware topology

  STMicroelectronics STPMIC1:
   - Attempt system shutdown a second time to handle transient I2C
     communication failures

  Viperboard:
   - Drop redundant USB device references"

* tag 'mfd-next-7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (28 commits)
  mfd: core: Preserve OF node when ACPI handle is present
  mfd: ene-kb3930: Use of_device_is_system_power_controller() wrapper
  mfd: intel-lpss: Add Intel Nova Lake-H PCI IDs
  dt-bindings: mfd: max77620: Document optional RTC address for MAX77663
  dt-bindings: mfd: max77620: Convert to DT schema
  mfd: ezx-pcap: Avoid rescheduling after destroying workqueue
  mfd: ezx-pcap: Return directly instead of empty gotos
  mfd: ezx-pcap: Drop memory allocation error message
  mfd: bcm2835-pm: Add BCM2712 PM device support
  mfd: bcm2835-pm: Introduce SoC-specific type identifier
  dt-bindings: mfd: bd72720: Add ROHM BD73900
  mfd: si476x: Fix kernel-doc warnings
  mfd: rsmu: Remove a empty kernel-doc line
  mfd: kempld: Fix kernel-doc struct member names
  mfd: congatec: Fix kernel-doc struct member names
  dt-bindings: mfd: Convert fsl-imx25-tsadc.txt to yaml format
  mfd: viperboard: Drop redundant device reference
  mfd: dln2: Switch to managed resources and fix bare unsigned types
  mfd: macsmc: Wire up Apple SMC power driver
  mfd: mt6397: Properly fix CID of MT6328, MT6331 and MT6332
  ...
2026-04-20 11:31:01 -07:00
Linus Torvalds
99ef60d119 USB / Thunderbolt changes for 7.1-rc1
Here is the big set of USB and Thunderbolt changes for 7.1-rc1.
 
 Lots of little things in here, nothing major, just constant
 improvements, updates, and new features.  Highlights are:
   - new USB power supply driver support (will cause merge conflicts in
     drivers/power/supply/Makefile, but it's a simple fix)  These changes
     did touch outside of drivers/usb/ but got acks from the relevant
     mantainers for them.
   - dts file updates and conversions
   - string function conversions into "safer" ones
   - new device quirks
   - xhci driver updates
   - usb gadget driver minor fixes
   - typec driver additions and updates
   - small number of thunderbolt driver changes
   - dwc3 driver updates and additions of new hardware support
   - other minor driver updates
 
 All of these have been in the linux-next tree for a while with no
 reported issues
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCaeSx6g8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ynqjQCgqhbj0Pg2DiL+hZ4xEVlsKD8MJsMAn0vbdsR5
 UiYztWABA245P1hO9i+K
 =/fxh
 -----END PGP SIGNATURE-----

Merge tag 'usb-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB / Thunderbolt updates from Greg KH:
 "Here is the big set of USB and Thunderbolt changes for 7.1-rc1.

  Lots of little things in here, nothing major, just constant
  improvements, updates, and new features. Highlights are:

   - new USB power supply driver support.

     These changes did touch outside of drivers/usb/ but got acks from
     the relevant mantainers for them.

   - dts file updates and conversions

   - string function conversions into "safer" ones

   - new device quirks

   - xhci driver updates

   - usb gadget driver minor fixes

   - typec driver additions and updates

   - small number of thunderbolt driver changes

   - dwc3 driver updates and additions of new hardware support

   - other minor driver updates

  All of these have been in the linux-next tree for a while with no
  reported issues"

* tag 'usb-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (176 commits)
  usb: dwc3: starfive: Add JHB100 USB 2.0 DRD controller
  dt-bindings: usb: dwc3: add support for StarFive JHB100
  dt-bindings: usb: atmel,at91sam9rl-udc: convert to DT schema
  dt-bindings: usb: atmel,at91rm9200-udc: convert to DT schema
  dt-bindings: usb: generic-ehci: fix schema structure and add at91sam9g45 constraints
  dt-bindings: usb: generic-ohci: add AT91RM9200 OHCI binding support
  arm: dts: at91: remove unused #address-cells/#size-cells from sam9x60 udc node
  drivers/usb/host: Fix spelling error 'seperate' -> 'separate'
  usbip: tools: add hint when no exported devices are found
  USB: serial: iuu_phoenix: fix iuutool author name
  usb: gadget: f_ncm: validate minimum block_len in ncm_unwrap_ntb()
  usb: gadget: f_phonet: fix skb frags[] overflow in pn_rx_complete()
  usb: gadget: f_hid: Add missing error code
  usb: typec: cros_ec_ucsi: Load driver from OF and ACPI definitions
  dt-bindings: chrome: Add cros-ec-ucsi compatibility to typec binding
  USB: of: Simplify with scoped for each OF child loop
  usbip: validate number_of_packets in usbip_pack_ret_submit()
  usb: gadget: renesas_usb3: validate endpoint index in standard request handlers
  usb: core: config: reverse the size check of the SSP isoc endpoint descriptor
  usb: typec: ucsi: Set usb mode on partner change
  ...
2026-04-19 08:47:40 -07:00
Linus Torvalds
31b43c079f soc: drivers for 7.1
The driver updates again are all over the place with many minor fixes
 going into platform specific code. The most notable changes are:
 
  - Support for Microchip pic64gx system controllers
  - Work on cleaning up devicetree bindings for SoC drivers, and
    converting them into the new format
  - Lots of smaller changes for Qualcomm SoC drivers, including support
    for a number of newly supported chips
  - reset controller API cleanups and a new driver for Cix Sky1
  - Reworks of the Tegra PMC and CBB drivers, along with a change
    to how individual Tegra SoCs get selected in Kconfig and
    BPMP firmware driver updates including a refresh of the ABI
    header to match the version used by firmware
  - STM32 updates to the firewall bus driver and support for
    the debug bus through OP-TEE
  - SCMI firmware driver improvements for reliability, in particular
    for dealing with broken firmware interrupts
  - Memory driver updates for Tegra, and a patch to remove the
    unused Baikal T1 driver
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmnhCSYACgkQmmx57+YA
 GNl2ow/+Pti7qbBE34WNyIuWOgZEzjo1OeLe/Y4LqkQmHcM9FJV3/rCadA/FkmD9
 nH85WiRuUjIjzUiAl24SP2nkEcIU/yv8ECvROX46uAjhTByVHkaCedwl3ECW9RPA
 IAYiTJPrQBNCmWZuGO4bZ3go6hHn4q4RSd2V8vrCw/J3b+wBSAPTPzsaWnWg4MiL
 QYz7sBTwcNJaJuwJ7ZnHN/VgEOs9OgY6ejGJImiaVzBbsH7rNp7Cbs6t88X5rCXS
 mbgMvVlYKbsOWj3kNyv98YFAGgzo59uEL+m+846U32w9o0nIgkmIS60RQ5k73JV4
 QlhV1uT7PPtu7y7VbxfJ8KISxaRoex/+AZShmAWCul4YK75hEWT3mWGhM8cqeMUQ
 U0ogpbekRjKdn2Bgfl6kHf38smusjJ1fOBr8QIZcdDJpEtxYtRmNpLUNNSc5vO+T
 HvA79C8I8ydWGyqr1wRP1gDRBNc1BDYKxJO4ohvjnAPIeC01zArXCOyf0F3VtPzH
 XSycnyW7eRUVi+4C3/cF8qzhW2y7Wx03ui5mCDIEcOzyVoGNqTrPNsbCvkNkyrdc
 jqvWagZ4Ci8jaRxLAawnqHI/stvsHx9V+NPp6p07BsOxJMsuOqO4sInRhh5P6YvM
 5wZCFUK37xPEqYvr+BFS9B/4jgw3Mg2Kj+gjxShwsLS5JtVDfZw=
 =UB4F
 -----END PGP SIGNATURE-----

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

Pull SoC driver updates from Arnd Bergmann:
 "The driver updates again are all over the place with many minor fixes
  going into platform specific code. The most notable changes are:

   - Support for Microchip pic64gx system controllers
   - Work on cleaning up devicetree bindings for SoC drivers, and
     converting them into the new format
   - Lots of smaller changes for Qualcomm SoC drivers, including support
     for a number of newly supported chips
   - reset controller API cleanups and a new driver for Cix Sky1
   - Reworks of the Tegra PMC and CBB drivers, along with a change to
     how individual Tegra SoCs get selected in Kconfig and BPMP firmware
     driver updates including a refresh of the ABI header to match the
     version used by firmware
   - STM32 updates to the firewall bus driver and support for the debug
     bus through OP-TEE
   - SCMI firmware driver improvements for reliability, in particular
     for dealing with broken firmware interrupts
   - Memory driver updates for Tegra, and a patch to remove the unused
     Baikal T1 driver"

* tag 'soc-drivers-7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (193 commits)
  firmware: arm_ffa: Use the correct buffer size during RXTX_MAP
  firmware: qcom: scm: Allow QSEECOM on Lenovo IdeaCentre Mini X
  clk: spear: fix resource leak in clk_register_vco_pll()
  reset: rzv2h-usb2phy: Add support for VBUS mux controller registration
  reset: rzv2h-usb2phy: Convert to regmap API
  dt-bindings: reset: renesas,rzv2h-usb2phy: Document RZ/G3E USB2PHY reset
  dt-bindings: reset: renesas,rzv2h-usb2phy: Add '#mux-state-cells' property
  soc: microchip: add mpfs gpio interrupt mux driver
  dt-bindings: soc: microchip: document PolarFire SoC's gpio interrupt mux
  gpio: mpfs: Add interrupt support
  soc: qcom: ubwc: add helpers to get programmable values
  soc: qcom: ubwc: add helper to get min_acc length
  firmware: qcom: scm: Register gunyah watchdog device
  soc: qcom: socinfo: Add SoC ID for SA8650P
  dt-bindings: arm: qcom,ids: Add SoC ID for SA8650P
  firmware: qcom: scm: Allow QSEECOM on Mahua CRD
  soc: qcom: wcnss: simplify allocation of req
  soc: qcom: pd-mapper: Add support for Eliza
  soc: qcom: aoss: compare against normalized cooling state
  soc: qcom: llcc: fix v1 SB syndrome register offset
  ...
2026-04-16 20:34:34 -07:00
Brian Mak
caa5a5d44d mfd: core: Preserve OF node when ACPI handle is present
Switch device_set_node to set_primary_fwnode, so that the ACPI fwnode
does not overwrite the of_node with NULL.

This allows MFD children with both OF nodes and ACPI handles to have OF
nodes again.

Cc: stable@vger.kernel.org
Fixes: 51e3b25709 ("mfd: core: Make use of device_set_node()")
Signed-off-by: Brian Mak <makb@juniper.net>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260325223024.35992-1-makb@juniper.net
Signed-off-by: Lee Jones <lee@kernel.org>
2026-03-31 13:38:25 +01:00
Krzysztof Kozlowski
70910aadff mfd: ene-kb3930: Use of_device_is_system_power_controller() wrapper
Instead of checking for exact device node property, use the
of_device_is_system_power_controller() wrapper.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260323092052.64684-2-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-03-31 10:48:30 +01:00
Amit Sunil Dhamne
b422f7c072 mfd: max77759: add register bitmasks and modify irq configs for charger
Add register bitmasks for charger function.
In addition split the charger IRQs further such that each bit represents
an IRQ downstream of charger regmap irq chip. In addition populate the
ack_base to offload irq ack to the regmap irq chip framework.

Signed-off-by: Amit Sunil Dhamne <amitsd@google.com>
Reviewed-by: André Draszik <andre.draszik@linaro.org>
Link: https://patch.msgid.link/20260325-max77759-charger-v9-3-4486dd297adc@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-03-30 16:58:33 +02:00
Saranya Gopal
d6e0ef4468 mfd: intel-lpss: Add Intel Nova Lake-H PCI IDs
Add Intel Nova Lake-H LPSS PCI IDs.

Signed-off-by: Saranya Gopal <saranya.gopal@intel.com>
Co-developed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260313100337.3471-1-ilpo.jarvinen@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-03-25 14:17:46 +00:00
Krzysztof Kozlowski
30eedf2446 mfd: ezx-pcap: Avoid rescheduling after destroying workqueue
Driver allocates workqueue and then registers additional interrupt
handler with devm interface.  This means that device removal will not
use a reversed order, but first destroy workqueue and then, via devm
release handlers, free the interrupt.

The interrupt handler registered with devm does not directly
use/schedule work items on the workqueue and the remove() function
correctly removes other IRQs handlers, however the code mixing devm and
non-devm interfaces is difficult to analyze and read.

Make the code flow much more obvious by using devm interface for
allocating the workqueue, so it will be freed with the rest of devm
resources.

Change is not equivalent in the workqueue itself: use non-legacy API
which does not set (__WQ_LEGACY | WQ_MEM_RECLAIM).  The workqueue is
used to update device registers, thus there is no point to run it for
memory reclaim.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260305-workqueue-devm-v2-9-66a38741c652@oss.qualcomm.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-03-25 12:45:59 +00:00
Krzysztof Kozlowski
ef5a54c542 mfd: ezx-pcap: Return directly instead of empty gotos
Code is easier to read if empty error paths simply return, instead of
jumping to empty label doing only "return ret".

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260305-workqueue-devm-v2-8-66a38741c652@oss.qualcomm.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-03-25 12:45:55 +00:00
Krzysztof Kozlowski
fa9ccb6b7f mfd: ezx-pcap: Drop memory allocation error message
Drivers should not print error messages on memory allocation failures,
because core already does it.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260305-workqueue-devm-v2-7-66a38741c652@oss.qualcomm.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-03-25 12:45:52 +00:00
Phil Elwell
44fb5d7b9d mfd: bcm2835-pm: Add BCM2712 PM device support
The BCM2712 SoC includes a power management block that serves as the
power domain for the V3D graphics block. Unlike other PM blocks in
the BCM2835 family, it does not feature an ASB register space.

Conditionally register the PM device depending on the SoC variant.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Co-developed-by: Stanimir Varbanov <svarbanov@suse.de>
Signed-off-by: Stanimir Varbanov <svarbanov@suse.de>
Signed-off-by: Andrea della Porta <andrea.porta@suse.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://patch.msgid.link/c0b5793868f138bf5c928a12b2763d3e183e2e59.1772839224.git.andrea.porta@suse.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-03-25 12:45:49 +00:00
Phil Elwell
fe0e422cbc mfd: bcm2835-pm: Introduce SoC-specific type identifier
Power management blocks across the BCM2835 family share a common
base but require variant-specific handling. For instance, the
BCM2712 lacks ASB register space, yet it manages the power domain
for the V3D graphics block.

Add a hardware type identifier to the driver's private data. This
allows the driver to distinguish between SoC models and implement
custom quirks or features as needed.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Co-developed-by: Stanimir Varbanov <svarbanov@suse.de>
Signed-off-by: Stanimir Varbanov <svarbanov@suse.de>
Signed-off-by: Andrea della Porta <andrea.porta@suse.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://patch.msgid.link/c4bb218654e91f312a01b419d3d408e5131f7673.1772839224.git.andrea.porta@suse.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-03-25 12:45:45 +00:00
Johan Hovold
1a408a6778 mfd: viperboard: Drop redundant device reference
Driver core holds a reference to the USB interface and its parent USB
device while the interface is bound to a driver and there is no need to
take additional references unless the structures are needed after
disconnect.

Drop the redundant device reference to reduce cargo culting, make it
easier to spot drivers where an extra reference is needed, and reduce
the risk of memory leaks when drivers fail to release it.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260305104051.15727-1-johan@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
2026-03-25 12:45:18 +00:00
Subhash Rawat
a2753f06e3 mfd: dln2: Switch to managed resources and fix bare unsigned types
Convert dln2_probe and dln2_setup_rx_urbs to use devm_kzalloc() and
devm_kmalloc() respectively. This simplifies resource management by
allowing the removal of manual kfree() calls in dln2_free() and
dln2_free_rx_urbs().

Additionally, update bare 'unsigned' types to 'unsigned int' to satisfy
checkpatch.pl warnings and comply with the Linux kernel coding style.

Signed-off-by: Subhash Rawat <rawatsubhash02@gmail.com>
Link: https://patch.msgid.link/20260303183236.574940-1-rawatsubhash02@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-03-25 12:45:15 +00:00
Hector Martin
9abc081c94 mfd: macsmc: Wire up Apple SMC power driver
Add the cell for the macsmc-power driver so it is probed by the
MFD core.

Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Reviewed-by: Sven Peter <sven@kernel.org>
Signed-off-by: Michael Reeves <michael.reeves077@gmail.com>
Link: https://patch.msgid.link/20260217-b4-macsmc-power-v7-2-4a4d63664362@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-03-25 12:45:13 +00:00
Akari Tsuyukusa
a09506820a mfd: mt6397: Properly fix CID of MT6328, MT6331 and MT6332
CIDs set for MT6328, MT6331 and MT6332 are not appropriate.
Many Android downstream kernels define CID as below,

MT6328:

    #define PMIC6328_E1_CID_CODE    0x2810
    #define PMIC6328_E2_CID_CODE    0x2820
    #define PMIC6328_E3_CID_CODE    0x2830

MT6331/MT6332:

    #define PMIC6331_E1_CID_CODE    0x3110
    #define PMIC6331_E2_CID_CODE    0x3120
    #define PMIC6331_E3_CID_CODE    0x3130

    #define PMIC6332_E1_CID_CODE    0x3210
    #define PMIC6332_E2_CID_CODE    0x3220
    #define PMIC6332_E3_CID_CODE    0x3230

The current configuration incorrectly uses the revision code as the CID.
Therefore, the driver cannot detect the same PMIC of different revisions.
(E1/E2 for MT6328, E1/E3 for MT6331/MT6332)
Based on these, the CID of MT6328, MT6331 and MT6332 should be corrected.

Additionally, the incorrect MT6331/MT6332 CID overlaps with the MT6320's
actual CID:

    #define PMIC6320_E1_CID_CODE    0x1020
    #define PMIC6320_E2_CID_CODE    0x2020

This causes a conflict in the switch-case statement of mt6397-irq.c,
this prevents adding support for MT6320.

Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patch.msgid.link/20260302140045.651727-1-akkun11.open@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-03-25 12:45:09 +00:00
Bartosz Golaszewski
0735e3007c mfd: lpc_ich: Expose the GPIO controller cell's software node
One of the users of this driver - meraki-mx100 - abuses the software
node API by setting up a dummy software node without any logical link to
this GPIO controller and uses the fact that the GPIO core matches the
controller's label against the swnode's name to make the lookup work.

We want to remove this behavior from GPIOLIB in favor of actual matching
of firmware nodes but that would break this user. To facilitate that:
create a software node for the GPIO controller cell and expose its
address in the provided MFD header.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260218-meraki-swnodes-v2-1-92c521da241c@oss.qualcomm.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-03-25 12:45:01 +00:00
Manikandan Muralidharan
239cd6a417 mfd: atmel-hlcdc: Fetch LVDS PLL clock for LVDS display
The XLCDC IP supports parallel RGB, MIPI DSI and LVDS Display.
The LCD Generic clock (sys_clk) is used for Parallel RGB and MIPI
displays, while the LVDS PLL clock (lvds_pll_clk) is used for LVDS
displays.Since both the clocks cannot co-exist together in the DT
for a given display, this patch tries sys_clk first (RGB/MIPI),
fallback to lvds_pll_clk (LVDS).

Signed-off-by: Manikandan Muralidharan <manikandan.m@microchip.com>
Signed-off-by: Dharma Balasubiramani <dharma.b@microchip.com>
Link: https://patch.msgid.link/20260223101920.284697-2-manikandan.m@microchip.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-03-25 12:44:57 +00:00
Johan Hovold
c2b06b133c mfd: dln2: Drop redundant device reference
Driver core holds a reference to the USB interface and its parent USB
device while the interface is bound to a driver and there is no need to
take additional references unless the structures are needed after
disconnect.

Drop the redundant device reference to reduce cargo culting, make it
easier to spot drivers where an extra reference is needed, and reduce
the risk of memory leaks when drivers fail to release it.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260305130358.24681-1-johan@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
2026-03-25 12:44:54 +00:00
Krzysztof Kozlowski
f385ec3259 mfd: max77705: Make max77705_pm_ops variable static
File-scope 'max77705_pm_ops' is not used outside of this unit, so make
it static to silence sparse warning:

  max77705.c:160:1: warning: symbol 'max77705_pm_ops' was not declared. Should it be static?

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260216110432.160084-2-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-03-25 12:44:51 +00:00
Andreas Kemnade
eaa0a41774 mfd: rohm-bd71828: Enable wakeup via power button
It is normally expected to get out of deeper power saving states by
pressing the power button, so enable wakeup for it.

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
Acked-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://patch.msgid.link/20260206093757.573377-1-andreas@kemnade.info
Signed-off-by: Lee Jones <lee@kernel.org>
2026-03-25 12:44:49 +00:00
Marek Vasut
ffdc5c51f8 mfd: stpmic1: Attempt system shutdown twice in case PMIC is confused
Attempt to shut down again, in case the first attempt failed.
The STPMIC1 might get confused and the first regmap_update_bits()
returns with -ETIMEDOUT / -110 . If that or similar transient
failure occurs, try to shut down again. If the second attempt
fails, there is some bigger problem, report it to user.

Cc: stable@vger.kernel.org
Fixes: 6e9df38f35 ("mfd: stpmic1: Add PMIC poweroff via sys-off handler")
Signed-off-by: Marek Vasut <marex@nabladev.com>
Link: https://patch.msgid.link/20260122111423.62591-1-marex@nabladev.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-03-25 12:44:46 +00:00
Abdun Nihaal
a5a65a7fb2 mfd: mc13xxx-core: Fix memory leak in mc13xxx_add_subdevice_pdata()
The memory allocated for cell.name using kmemdup() is not freed when
mfd_add_devices() fails. Fix that by using devm_kmemdup().

Fixes: 8e00593557 ("mfd: Add mc13892 support to mc13xxx")
Signed-off-by: Abdun Nihaal <nihaal@cse.iitm.ac.in>
Link: https://patch.msgid.link/20260120102622.66921-1-nihaal@cse.iitm.ac.in
Signed-off-by: Lee Jones <lee@kernel.org>
2026-03-25 12:44:43 +00:00
Maciej Strozek
a6fe20d67d mfd: cs42l43: Add support for the B variant
Introducing CS42L43B codec, a variant of CS42L43 which can be driven by
the same driver.

Changes in CS42L43 driver specific for CS42L43B:
- Decimator 1 and 2 are dedicated to ADC, can't be selected for PDM
- Decimators 3 and 4 are connected to PDM1
- Added Decimator 5 and 6 for PDM2
- Supports SoundWire Clock Gearing
- Updated ROM requiring no patching
- Reduced RAM space
- Each ISRC has 4 decimators now

Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Acked-by: Lee Jones <lee@kernel.org>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260306152829.3130530-4-mstrozek@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-09 10:29:32 +00:00
Krzysztof Kozlowski
a2be37eedb firmware: exynos-acpm: Drop fake 'const' on handle pointer
All the functions operating on the 'handle' pointer are claiming it is a
pointer to const thus they should not modify the handle.  In fact that's
a false statement, because first thing these functions do is drop the
cast to const with container_of:

  struct acpm_info *acpm = handle_to_acpm_info(handle);

And with such cast the handle is easily writable with simple:

  acpm->handle.ops.pmic_ops.read_reg = NULL;

The code is not correct logically, either, because functions like
acpm_get_by_node() and acpm_handle_put() are meant to modify the handle
reference counting, thus they must modify the handle.  Modification here
happens anyway, even if the reference counting is stored in the
container which the handle is part of.

The code does not have actual visible bug, but incorrect 'const'
annotations could lead to incorrect compiler decisions.

Fixes: a88927b534 ("firmware: add Exynos ACPM protocol driver")
Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260224104203.42950-2-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2026-02-28 15:47:03 +01:00
Linus Torvalds
32a92f8c89 Convert more 'alloc_obj' cases to default GFP_KERNEL arguments
This converts some of the visually simpler cases that have been split
over multiple lines.  I only did the ones that are easy to verify the
resulting diff by having just that final GFP_KERNEL argument on the next
line.

Somebody should probably do a proper coccinelle script for this, but for
me the trivial script actually resulted in an assertion failure in the
middle of the script.  I probably had made it a bit _too_ trivial.

So after fighting that far a while I decided to just do some of the
syntactically simpler cases with variations of the previous 'sed'
scripts.

The more syntactically complex multi-line cases would mostly really want
whitespace cleanup anyway.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-02-21 20:03:00 -08:00
Linus Torvalds
bf4afc53b7 Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
This was done entirely with mindless brute force, using

    git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
        xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'

to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.

Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.

For the same reason the 'flex' versions will be done as a separate
conversion.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-02-21 17:09:51 -08:00
Kees Cook
69050f8d6d treewide: Replace kmalloc with kmalloc_obj for non-scalar types
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations:	kmalloc(sizeof(TYPE), ...)
are replaced with:	kmalloc_obj(TYPE, ...)

Array allocations:	kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with:	kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations:	kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with:	kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook <kees@kernel.org>
2026-02-21 01:02:28 -08:00
Linus Torvalds
4668c4831f MFD for v6.20
- New Support & Features
   * Add comprehensive support for the ROHM BD72720 PMIC, including core MFD, regulator, GPIO,
     clock gate, RTC, and power-supply drivers.
   * Add support for the Rockchip RK801 PMIC, including core MFD and regulator drivers.
   * Add support for the ROHM BD73900 PMIC by leveraging existing common drivers.
   * Wire up RTC, hwmon, and input sub-devices for the Apple SMC (macsmc) driver.
   * Add support for the Delta Networks TN48M switch CPLD via the simple-mfd-i2c driver.
   * Add support for the TS133 variant to the QNAP MCU driver.
   * Provide support for the sama7d65 XLCD controller in the Atmel HLCDC driver.
   * Add backlight sub-device support to the Congatec Board Controller (cgbc).
   * Add Intel Nova Lake-S (NVL-S) PCI IDs to the Intel LPSS driver.
 
 - Improvements & Fixes
   * Implement a "wrapper regmap" for the ROHM BD72720 to handle dual I2C slave addresses (0x4b and
     0x4c) transparently for child devices.
   * Introduce mutex locking around 'mfd_of_node_list' in the MFD core to ensure safe concurrent
     access.
   * Fix a potential regulator resource leak in the Arizona core driver during boot sequence
     failures.
   * Resolve child device duplication issues on driver rebind for Qualcomm PM8xxx and OMAP USB host
     drivers by using of_platform_depopulate().
   * Fix IRQ domain name duplication for the Samsung S2MPG10 by adding a unique domain suffix.
   * Implement LOCK register handling for the TI TPS65214 variant to unlock registers at probe
     time.
   * Fully convert the Loongson-2K BMC driver to use managed resources (pcim) and the standard PCI
     resource API.
   * Ensure the Apple SMC mutex is correctly initialized during probe to prevent NULL pointer
     dereferences.
   * Expand the ROHM BD71828 power-supply driver to support 9-bit register addresses.
   * Simplify the Samsung S5M RTC driver by querying platform device IRQ resources directly.
   * Revert an incorrect read-to-write mask change in the DA9052 SPI driver to restore default OTP
     behavior.
   * Fix kernel-doc warnings in the TI TPS6105x driver.
 
 - Cleanups & Refactoring
   * Simplify the MFD core by utilizing the scoped for_each_child_of_node_scoped() macro and
     streamlining device_node storage.
   * Rename ROHM BD71828 IC-specific entities to use consistent prefixes for better extensibility.
   * Refactor ROHM BD71828 regmap definitions using the regmap_reg_range() macro.
   * Update the ROHM BD71828 driver to use standard C-style comment headers.
   * Remove the now unused 'irq_data' field from the Samsung SEC core structure.
   * Drop unnecessary use of irqd_get_trigger_type() in the Maxim MAX77759 driver.
   * Default MFD_SPACEMIT_P1 to 'm' if ARCH_SPACEMIT is selected.
   * Add missing charger-related registers to the ROHM BD71828 core header and Type-C CC registers
     to the AXP717.
 
 - Device Tree Binding Updates
   * Add new bindings for the ROHM BD72720 PMIC, Rockchip RK801 PMIC, Bitmain BM1880 System
     Controller, and NXP LPC32xx System Control Block.
   * Clarify trickle-charge terminology and add properties for voltage drop (VDR) correction and
     upper charge limits to the generic battery binding.
   * Document GPR syscon for NXP S32 SoCs and the smp-memram subnode for Aspeed SCU.
   * Document numerous new Qualcomm SPMI PMIC compatibles (pmcx0102, pmh0101, pmk8850, etc.).
   * Add compatibles for the sama7d65 XLCD (Atmel), LAN9691 Flexcom (Microchip), and various
     MediaTek SCPSYS and regulator components.
   * Fix a dead link to the audio codec binding in the DA9055 documentation.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmmN1SgACgkQUa+KL4f8
 d2FmCg//dSaWBfdNSIibUQg08g/hUUx+TTZ3RsRdBqGym0/+n6cTRqxSRM9LwWmC
 4jAq+fdqBhWEdTvB28aJT/UxFkDuKTsXtoycwLVvX0Vfb5zvE8SjAIycS4/PMRqZ
 qYyZ3fblfwx/bm+/1+0yVsi4TVtjLZdiRQEpKAXN/FNd9/6mHD8x4VNjtB5jj0nR
 tcCXKevmgRcCqXi2OfAWQ20VO/N04rkRj0r07UI4+u+lC3iet5XMmWaPc+QbQ0Be
 EkTCHBvfqtC6+C6aZtGjCOx8OA08I3MZAmS5eNly4T3GuVTHVtzobZEM7lEk4ScQ
 mzdXnhNBxxJzLXcv5B7FuDlaEcBya1tf5fe2lPgyD5Mp4khPynBZWQdDQe5Zv0TV
 9EhdGazltNdYXUcTX5yhgQOpFgdGBb59AczRG5j/EMpLVJSwyUJQC7HMf3OyirCo
 d4ZtCVXAp9KlUuEAvkLIgq6ZU/8fY5LVWK07tO0QJDHz7vEhEzZ7us5kvHQ9gFzu
 ihE3EKMBrAnjx/ZJ6pHFcfiEpPxO1rRhIFMCg5SGFVeJWKhvBycz5CjFs26GQzX6
 OTREzRbcOtuIAwBow4yafozUh0z2HWlpMNPbeuyz1h4jg5RbcYWmKG+eO5dKQXU0
 8UGTJelPzMvfx3NJ/LC9pImLrGh+twz42aqwv8LakH0y/zuT1dw=
 =BxGL
 -----END PGP SIGNATURE-----

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

Pull MFD updates from Lee Jones:
 "New Support & Features:
   - Add comprehensive support for the ROHM BD72720 PMIC, including core
     MFD, regulator, GPIO, clock gate, RTC, and power-supply drivers
   - Add support for the Rockchip RK801 PMIC, including core MFD and
     regulator drivers
   - Add support for the ROHM BD73900 PMIC by leveraging existing common
     drivers
   - Wire up RTC, hwmon, and input sub-devices for the Apple SMC
     (macsmc) driver
   - Add support for the Delta Networks TN48M switch CPLD via the
     simple-mfd-i2c driver
   - Add support for the TS133 variant to the QNAP MCU driver
   - Provide support for the sama7d65 XLCD controller in the Atmel HLCDC
     driver
   - Add backlight sub-device support to the Congatec Board Controller
     (cgbc)
   - Add Intel Nova Lake-S (NVL-S) PCI IDs to the Intel LPSS driver

  Improvements & Fixes:
   - Implement a "wrapper regmap" for the ROHM BD72720 to handle dual
     I2C slave addresses (0x4b and 0x4c) transparently for child devices
   - Introduce mutex locking around 'mfd_of_node_list' in the MFD core
     to ensure safe concurrent access
   - Fix a potential regulator resource leak in the Arizona core driver
     during boot sequence failures
   - Resolve child device duplication issues on driver rebind for
     Qualcomm PM8xxx and OMAP USB host drivers by using
     of_platform_depopulate()
   - Fix IRQ domain name duplication for the Samsung S2MPG10 by adding a
     unique domain suffix
   - Implement LOCK register handling for the TI TPS65214 variant to
     unlock registers at probe time
   - Fully convert the Loongson-2K BMC driver to use managed resources
     (pcim) and the standard PCI resource API
   - Ensure the Apple SMC mutex is correctly initialized during probe to
     prevent NULL pointer dereferences
   - Expand the ROHM BD71828 power-supply driver to support 9-bit
     register addresses
   - Simplify the Samsung S5M RTC driver by querying platform device IRQ
     resources directly
   - Revert an incorrect read-to-write mask change in the DA9052 SPI
     driver to restore default OTP behavior
   - Fix kernel-doc warnings in the TI TPS6105x driver

- Cleanups & Refactoring
   - Simplify the MFD core by utilizing the scoped
     for_each_child_of_node_scoped() macro and streamlining device_node
     storage
   - Rename ROHM BD71828 IC-specific entities to use consistent prefixes
     for better extensibility
   - Refactor ROHM BD71828 regmap definitions using the
     regmap_reg_range() macro
   - Update the ROHM BD71828 driver to use standard C-style comment
     headers
   - Remove the now unused 'irq_data' field from the Samsung SEC core
     structure
   - Drop unnecessary use of irqd_get_trigger_type() in the Maxim
     MAX77759 driver
   - Default MFD_SPACEMIT_P1 to 'm' if ARCH_SPACEMIT is selected
   - Add missing charger-related registers to the ROHM BD71828 core
     header and Type-C CC registers to the AXP717

  Device Tree Binding Updates:
   - Add new bindings for the ROHM BD72720 PMIC, Rockchip RK801 PMIC,
     Bitmain BM1880 System Controller, and NXP LPC32xx System Control
     Block
   - Clarify trickle-charge terminology and add properties for voltage
     drop (VDR) correction and upper charge limits to the generic
     battery binding
   - Document GPR syscon for NXP S32 SoCs and the smp-memram subnode for
     Aspeed SCU
   - Document numerous new Qualcomm SPMI PMIC compatibles (pmcx0102,
     pmh0101, pmk8850, etc)
   - Add compatibles for the sama7d65 XLCD (Atmel), LAN9691 Flexcom
     (Microchip), and various MediaTek SCPSYS and regulator components
   - Fix a dead link to the audio codec binding in the DA9055
     documentation"

* tag 'mfd-next-6.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (41 commits)
  dt-bindings: mfd: da9055: Fix dead link to codec binding
  mfd: cgbc: Add support for backlight
  dt-bindings: mfd: qcom,spmi-pmic: Document PMICs present on Glymur and Kaanapali
  dt-bindings: mfd: Document smp-memram subnode for aspeed,ast2x00-scu
  mfd: intel-lpss: Add Intel Nova Lake-S PCI IDs
  mfd: ls2kbmc: Use PCI API instead of direct accesses
  mfd: ls2kbmc: Fully convert to use managed resources
  dt-bindings: mfd: mediatek: mt6397: Add missing MT6331 regulator compat
  dt-bindings: mfd: mediatek,mt8195-scpsys: Add mediatek,mt6795-scpsys
  dt-bindings: mfd: atmel,sama5d2-flexcom: Add microchip,lan9691-flexcom
  mfd: omap-usb-host: Fix OF populate on driver rebind
  mfd: qcom-pm8xxx: Fix OF populate on driver rebind
  dt-bindings: mfd: syscon: Allow syscon compatible for mediatek,mt7981-topmisc
  mfd: qnap-mcu: Add driver data for TS133 variant
  dt-bindings: mfd: qnap,ts433-mcu: Add qnap,ts133-mcu compatible
  mfd: sec: Fix IRQ domain names duplication
  mfd: simple-mfd-i2c: Add Delta TN48M CPLD support
  mfd: macsmc: Initialize mutex
  dt-bindings: mfd: nxp: Add NXP LPC32xx System Control Block
  mfd: Kconfig: Default MFD_SPACEMIT_P1 to 'm' if ARCH_SPACEMIT
  ...
2026-02-16 11:05:44 -08:00
Linus Torvalds
d701782152 gpio updates for v7.0-rc1
GPIOLIB core:
 - shrink the GPIO bus driver stub code
 - rework software node support for "undefined" software nodes
 - provide and use devm_fwnode_gpiod_get_optional()
 - only compile the OF quirk for MT2701 when needed
 
 New drivers:
 - add the GPIO driver for ROHM bd72720
 - add the gpio-line-mux driver providing 1-to-many mapping for a single
   real GPIO
 
 Driver changes:
 - refactor gpio-pca9570: use lock guard, add missing headers, use devres
   consistently
 - add support for a new model (G7 Aspeed sgpiom) to the aspeed-sgpio driver
   along with some prerequisite refactoring
 - use device_get_match_data() where applicable and save some lines
 - add support for more models to gpio-cadence
 - add the compatible property to reset-gpio and use it in shared GPIO
   management
 - drop unnecessary use of irqd_get_trigger_type() in gpio-max77759
 - add support for a new variant to gpio-pca953x
 - extend build coverage with COMPILE_TEST for more drivers
 - constify configfs structures in gpio-sim and gpio-virtuser
 - add support for the K3 SoC to gpio-spacemit
 - implement the missing .get_direction() callback in gpio-max77620
 - add support for Tegra264 to gpio-tegra186
 - drop unneeded MODULE_ALIAS() from gpio-menz127
 
 DT bindings:
 - document support for the opencores GPIO controller in gpio-mmio
 - document new variants for gpio-pca953x
 
 Documentation:
 - extensively describe interrupt source detection for gpio-pca953x and
   add more models to the list of supported variants
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEkeUTLeW1Rh17omX8BZ0uy/82hMMFAmmK9bwACgkQBZ0uy/82
 hMM3rQ/7BTRmMgGiJXlDpqkUoA9fQusiEcokwgmpvlJFM3cb2ANzrjxqZDGnUVLS
 OFaVCPjgUTDrmWNgSSy5SBfyfVkvbXmT7X5+e38qotlNun6BKCPhF1H5HxBgJv9P
 ObHXZ6ACrg4Ia+jl0QkpIXUDC/vAzaBUml5LUATGHpwf/pa4ZcBDXXbLIEtEfSpb
 kNDDQVeWJlWxDYNuJudR8BL2saZFEoD9RaX8F4jLya8ogecoKXElK8Nj0G0Gua8D
 UkH9aKMlNTIrk/iE6MiohaLWWqBgRV6+wO6vd2IRek5iItTbPffk4iT2/dOiX8H4
 HcOxXBxACH/+wicXGwY360r5M5BCYaMcUvLQaCxLuac2T4302aFLcrWH7be+Ju6f
 F+rPBRK1LTYwn0LNlu1I7hYBbwNWHCXfWejXXTH4pMO4uyiwCPpkBHXWCyjWSTuV
 YhIbWVYuQjVgxvPCoJ0+67ju++I2ShlXtiT6NorQrxGt9CCBzMN4KU/uMPkN5j+Z
 RgurHuEEB1hZ8h5Tzs058L6Pxfyp4eY6Qy8BKLPcrGZaKvvX/EZeI/JkeQOOItKe
 VoVq4NIeeqYmqzFa5xrsRYnGUw6lKVj2M5SrjRfbGRz4xVX+rSgrBZMrz1gJyisP
 1M5LiGj+c91oo41tysJdPjkc8dkN47hFbNLzB27kXDfm77qlbUE=
 =Zhuy
 -----END PGP SIGNATURE-----

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

Pull gpio updates from Bartosz Golaszewski:
 "There are two new drivers and some changes to GPIO core but mostly
  just GPIO driver updates across a wide array of files, adding support
  for new models as well as various refactoring changes. Nothing
  controversial and everything has spent a good measure of time in
  linux-next.

  GPIOLIB core:
   - shrink the GPIO bus driver stub code
   - rework software node support for "undefined" software nodes
   - provide and use devm_fwnode_gpiod_get_optional()
   - only compile the OF quirk for MT2701 when needed

  New drivers:
   - add the GPIO driver for ROHM bd72720
   - add the gpio-line-mux driver providing 1-to-many mapping for a
     single real GPIO

  Driver changes:
   - refactor gpio-pca9570: use lock guard, add missing headers, use
     devres consistently
   - add support for a new model (G7 Aspeed sgpiom) to the aspeed-sgpio
     driver along with some prerequisite refactoring
   - use device_get_match_data() where applicable and save some lines
   - add support for more models to gpio-cadence
   - add the compatible property to reset-gpio and use it in shared GPIO
     management
   - drop unnecessary use of irqd_get_trigger_type() in gpio-max77759
   - add support for a new variant to gpio-pca953x
   - extend build coverage with COMPILE_TEST for more drivers
   - constify configfs structures in gpio-sim and gpio-virtuser
   - add support for the K3 SoC to gpio-spacemit
   - implement the missing .get_direction() callback in gpio-max77620
   - add support for Tegra264 to gpio-tegra186
   - drop unneeded MODULE_ALIAS() from gpio-menz127

  DT bindings:
   - document support for the opencores GPIO controller in gpio-mmio
   - document new variants for gpio-pca953x

  Documentation:
   - extensively describe interrupt source detection for gpio-pca953x
     and add more models to the list of supported variants"

* tag 'gpio-updates-for-v7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (59 commits)
  gpio: tegra186: Add support for Tegra264
  dt-bindings: gpio: Add Tegra264 support
  gpio: spacemit-k1: Use PDR for pin direction, not SDR/CDR
  gpio: max77620: Implement .get_direction() callback
  gpio: aspeed-sgpio: Support G7 Aspeed sgpiom controller
  dt-bindings: gpio: aspeed,sgpio: Support ast2700
  gpio: aspeed-sgpio: Convert IRQ functions to use llops callbacks
  gpio: aspeed-sgpio: Create llops to handle hardware access
  gpio: aspeed-sgpio: Remove unused bank name field
  gpio: aspeed-sgpio: Change the macro to support deferred probe
  regulator: bd71815: switch to devm_fwnode_gpiod_get_optional
  gpiolib: introduce devm_fwnode_gpiod_get_optional() wrapper
  gpio: mmio: Add compatible for opencores GPIO
  dt-bindings: gpio-mmio: Correct opencores GPIO
  gpio: pca9570: use lock guards
  gpio: pca9570: Don't use "proxy" headers
  gpio: pca9570: Use devm_mutex_init() for mutex initialization
  MAINTAINERS: Add ROHM BD72720 PMIC
  power: supply: bd71828-power: Support ROHM BD72720
  power: supply: bd71828: Support wider register addresses
  ...
2026-02-11 10:53:39 -08:00
Petri Karhula
702273a0ea mfd: cgbc: Add support for backlight
The Board Controller has control for display backlight.
Add backlight cell for the cgbc-backlight driver which
adds support for backlight brightness control.

Signed-off-by: Petri Karhula <petri.karhula@novatron.fi>
Reviewed-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://patch.msgid.link/20251205-cgbc-backlight-v6-2-e4175b0bf406@novatron.fi
Signed-off-by: Lee Jones <lee@kernel.org>
2026-02-04 11:07:20 +00:00
André Draszik
3a17ba6557 mfd: sec: Add support for S2MPG11 PMIC via ACPM
Add support for Samsung's S2MPG11 PMIC, which is a Power Management IC
for mobile applications with buck converters, various LDOs, power
meters, NTC thermistor inputs, and additional GPIO interfaces. It
typically complements an S2MPG10 PMIC in a main/sub configuration as
the sub-PMIC.

Like S2MPG10, communication is not via I2C, but via the Samsung ACPM
firmware.

While at it, we can also switch to asynchronous probe, which helps with
probe performance, as the drivers for s2mpg10 and s2mpg11 can probe in
parallel.

Note: The firmware uses the ACPM channel ID and the Speedy channel ID
to select the PMIC address. Since these are firmware properties, they
can not be retrieved from DT, but instead are deducted from the
compatible for now.

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://patch.msgid.link/20260122-s2mpg1x-regulators-v7-9-3b1f9831fffd@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
2026-02-04 10:37:29 +00:00
Ilpo Järvinen
cefd793fa1 mfd: intel-lpss: Add Intel Nova Lake-S PCI IDs
Add Intel Nova Lake-S LPSS PCI IDs.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260113172151.48062-1-ilpo.jarvinen@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-01-22 14:23:56 +00:00
Andy Shevchenko
9e87c8bff5 mfd: ls2kbmc: Use PCI API instead of direct accesses
There is a PCI API to access device resources. Use it instead of
direct accesses.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://patch.msgid.link/20251030113735.3741913-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-01-22 14:23:53 +00:00
Andy Shevchenko
e11a9ad380 mfd: ls2kbmc: Fully convert to use managed resources
The mixing of managed and non-managed resources may lead to possible
use-after-free bugs. In this driver the problematic part is the device
functionality that may just have gone behind the functions back, e.g.,
when interrupt is being served. Fix this by switching to managed resources
for PCI.

Fixes: 91a3e1f5453a ("mfd: ls2kbmc: Check for devm_mfd_add_devices() failure")
Fixes: d952bba3fb ("mfd: ls2kbmc: Add Loongson-2K BMC reset function support")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://patch.msgid.link/20251030113735.3741913-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-01-22 14:23:50 +00:00
Johan Hovold
24804ba508 mfd: omap-usb-host: Fix OF populate on driver rebind
Since commit c6e126de43 ("of: Keep track of populated platform
devices") child devices will not be created by of_platform_populate()
if the devices had previously been deregistered individually so that the
OF_POPULATED flag is still set in the corresponding OF nodes.

Switch to using of_platform_depopulate() instead of open coding so that
the child devices are created if the driver is rebound.

Fixes: c6e126de43 ("of: Keep track of populated platform devices")
Cc: stable@vger.kernel.org	# 3.16
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Andreas Kemnade <andreas@kemnade.info>
Link: https://patch.msgid.link/20251219110714.23919-1-johan@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
2026-01-22 14:23:40 +00:00
Johan Hovold
27a8acea47 mfd: qcom-pm8xxx: Fix OF populate on driver rebind
Since commit c6e126de43 ("of: Keep track of populated platform
devices") child devices will not be created by of_platform_populate()
if the devices had previously been deregistered individually so that the
OF_POPULATED flag is still set in the corresponding OF nodes.

Switch to using of_platform_depopulate() instead of open coding so that
the child devices are created if the driver is rebound.

Fixes: c6e126de43 ("of: Keep track of populated platform devices")
Cc: stable@vger.kernel.org	# 3.16
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://patch.msgid.link/20251219110947.24101-1-johan@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
2026-01-22 14:23:38 +00:00
Heiko Stuebner
a212772791 mfd: qnap-mcu: Add driver data for TS133 variant
Add the TS133 compatible and affiliated driver data to qnap-mcu.
The TS133 is mostly similar to the TS233/TS433, except only having
one drive and no USB-LED.

The fan pwm-limits from the vendor-configuration also are the same
as for the TS233/TS433 variants.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20260104173310.2685852-3-heiko@sntech.de
Signed-off-by: Lee Jones <lee@kernel.org>
2026-01-22 14:23:32 +00:00
André Draszik
b60c2dba6d mfd: sec: Fix IRQ domain names duplication
For the S2MPG10 IRQ and chained IRQ, regmap IRQ will try to create a
folder with the same name which is impossible and fails with:

  debugfs: ':firmware:power-management:pmic' already exists in 'domains'

Add domain_suffix to the chained IRQ chip driver to fix it.

Fixes: ee19b52c31 ("mfd: sec: Use chained IRQs for s2mpg10")
Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://patch.msgid.link/20260105-s2mpg10-chained-irq-domain-suffix-v1-1-01ab16204b97@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
2026-01-22 14:23:26 +00:00
Robert Marko
8f34c1a64c mfd: simple-mfd-i2c: Add Delta TN48M CPLD support
Delta TN48M switches have a Lattice CPLD that serves
multiple purposes including being a GPIO expander.

So, lets use the simple I2C MFD driver to provide the MFD core.

Also add a virtual symbol which pulls in the simple-mfd-i2c driver and
provide a common symbol on which the subdevice drivers can depend on.

Fixes: b3dcb5de62 ("gpio: Add Delta TN48M CPLD GPIO driver")
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Link: https://lore.kernel.org/20220131133049.77780-2-robert.marko@sartura.hr
Link: https://lore.kernel.org/linux-gpio/20260112064950.3837737-1-rdunlap@infradead.org/
Signed-off-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/20260112-mfd-tn48m-v11-1-00c798d8cd2a@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
2026-01-22 14:23:23 +00:00
Janne Grunau
414f65d673 mfd: macsmc: Initialize mutex
Initialize struct apple_smc's mutex in apple_smc_probe(). Using the
mutex uninitialized surprisingly resulted only in occasional NULL
pointer dereferences in apple_smc_read() calls from the probe()
functions of sub devices.

Cc: stable@vger.kernel.org
Fixes: e038d985c9 ("mfd: Add Apple Silicon System Management Controller")
Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Sven Peter <sven@kernel.org>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Link: https://patch.msgid.link/20251231-macsmc-mutex_init-v2-1-5818c9dc9b29@jannau.net
Signed-off-by: Lee Jones <lee@kernel.org>
2026-01-22 14:23:20 +00:00
Troy Mitchell
9d1e2d5f2b mfd: Kconfig: Default MFD_SPACEMIT_P1 to 'm' if ARCH_SPACEMIT
The default value of the P1 sub-device depends on the value
of P1, so P1 should have a default value here.

Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
Acked-by: Alex Elder <elder@riscstar.com>
Link: https://patch.msgid.link/20251225-p1-kconfig-fix-v4-2-44b6728117c1@linux.spacemit.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-01-22 14:23:13 +00:00
Chen-Yu Tsai
f78263a873 mfd: axp20x: AXP717: Add type-C CC registers
The AXP717 has some extra registers related to type-C CC pin
negotiation. They were missing from the original submission.

Add them for completeness.

Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://patch.msgid.link/20251225080241.3153453-1-wens@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
2026-01-22 14:23:10 +00:00
Krzysztof Kozlowski
7d60a2b8c2 mfd: core: Simplify storing device_node in mfd_match_of_node_to_dev()
of_node_get() returns the same pointer it received and canonical form of
storing device_node is to use of_node_get() in the assignment.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20251224124456.208529-4-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-01-22 14:23:07 +00:00
Krzysztof Kozlowski
cd18e9af79 mfd: core: Simplify with scoped for each OF child loop
Use scoped for-each loop when iterating over device nodes to make code a
bit simpler.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20251224124456.208529-3-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-01-22 14:23:05 +00:00
Kory Maincent (TI.com)
d3fcf276b5 mfd: tps65219: Implement LOCK register handling for TPS65214
The TPS65214 PMIC variant has a LOCK_REG register that prevents writes to
nearly all registers when locked. Unlock the registers at probe time and
leave them unlocked permanently.

This approach is justified because:
- Register locking is very uncommon in typical system operation
- No code path is expected to lock the registers during runtime
- Adding a custom regmap write function would add overhead to every
  register write, including voltage changes triggered by CPU OPP
  transitions from the cpufreq governor which could happen quite
  frequently

Cc: stable@vger.kernel.org
Fixes: 7947219ab1 ("mfd: tps65219: Add support for TI TPS65214 PMIC")
Reviewed-by: Andrew Davis <afd@ti.com>
Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
Link: https://patch.msgid.link/20251218-fix_tps65219-v5-1-8bb511417f3a@bootlin.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-01-22 14:22:54 +00:00
Ryan Wanner
05995af05b mfd: atmel-hlcdc: Add compatible for sama7d65 XLCD controller
Add compatible for sama7d65 XLCD controller.

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
Signed-off-by: Manikandan Muralidharan <manikandan.m@microchip.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://patch.msgid.link/20251218040521.463937-2-manikandan.m@microchip.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-01-22 14:22:51 +00:00
André Draszik
1c378a4c9b mfd: max77759: Drop use of irqd_get_trigger_type
irqd_get_trigger_type() is meant for cases where the driver needs to
know the configured IRQ trigger type and e.g. wants to change its
behaviour accordingly. Furthermore, platform support code, e.g. DT
handling, will configure the hardware based on that, and drivers don't
need to pass the trigger type into request_irq() and friends.

Drop the use from this driver, as it doesn't need to know the trigger
type.

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://patch.msgid.link/20251217-max77759-mfd-irq-trigger-v1-1-e7d29f84d34f@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
2026-01-22 14:22:38 +00:00
James Calligeros
0ec4122f00 mfd: macsmc: Wire up Apple SMC input subdevice
Add the new SMC input function to the mfd device

Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Link: https://patch.msgid.link/20251215-macsmc-subdevs-v6-5-0518cb5f28ae@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-01-22 14:22:35 +00:00
James Calligeros
5dce1c0bff mfd: macsmc: Wire up Apple SMC hwmon subdevice
Add the SMC hwmon functionality to the mfd device

Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Link: https://patch.msgid.link/20251215-macsmc-subdevs-v6-3-0518cb5f28ae@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-01-22 14:22:32 +00:00