Commit Graph

5992 Commits

Author SHA1 Message Date
Kees Cook
3a2c4d55e3 treewide: refresh kmalloc_obj() conversions
This is another run of the Coccinelle script for converting kmalloc()
family of allocations to kmalloc_obj() via the existing rules in
scripts/coccinelle/api/kmalloc_objs.cocci

This catches both the set of kmalloc() uses added since the first
kmalloc_obj() conversions in v7.0 and adds a large group missed in the
first pass due to Coccinelle not interacting well with the cleanup.h
scoped_...() family of macros[1]. I worked around this with spatch's
"--macro-file" argument to a file with all the scoped_...() macros mapped
to Coccinelle's YACFE_ITERATOR[2] as that was the closest viable control
flow indicator I could find.

Build tested allmodconfig on x86, arm64, arm, loongarch, mips, powerpc,
riscv, and s390 with no new warnings.

Link: https://lore.kernel.org/lkml/202609021314.8A9C0B8@keescook/ [1]
Link: https://github.com/coccinelle/coccinelle/blob/master/standard.h [2]
Signed-off-by: Kees Cook <kees+treewide@kernel.org>
2026-09-04 21:37:00 -07:00
Linus Torvalds
79b4f3baae MFD for v7.3
- New Support & Features
   - MediaTek MT6397: Add mt6323 AUXADC support.
   - MediaTek MT6397: Add mt6323 EFUSE support.
   - Spreadtrum SC27xx: Add SC2730 regulator cell.
 
 - Improvements & Fixes
   - Apple SMC: Fix key count endianness annotation.
   - Azoteq IQS62x: Reject zero-length firmware records.
   - ChromeOS EC: Introduce cros_ec_read_features helper and read features during
     probe to catch transfer errors.
   - Cirrus Logic CS42L43: Fix regmap defaults ordering.
   - Cirrus Logic CS42L43: Remove redundant NULL checks on SoundWire.
   - Congatec Board Controller: Fix teardown ordering in cgbc_remove().
   - HP iPAQ Micro: Fix out-of-bounds stack read in ipaq_micro_str.
   - Marvell 88PM886: Initialize the battery page.
   - QNAP MCU: Keep the reply buffer alive past a command timeout.
   - RAVE SP: Validate received frame payload lengths.
   - Silicon Labs Si476x: Drop duplicate NULL checks.
   - Silicon Labs Si476x: Modernize GPIO handling.
   - Silicon Motion SM501: Fix potential memory leaks during remove.
   - UCB1x00: Convert Assabet gpio-keys to use software nodes and register software
     node for GPIO controller.
   - Viperboard: Fix native fields type in structures as little-endian.
   - Viperboard: Remove redundant NULL check before kfree().
   - X-Powers AXP20x: Preserve other control bits when powering off.
 
 - Cleanups & Refactoring
   - Core: Drop unused assignment of spi_device_id driver data.
   - Core: Initialize spi_device_id arrays using member names.
   - Core: Unify style of spi_device_id arrays.
   - Maintainers: Add Intel LPSS section to follow the changes.
   - Maintainers: Add a mailing list entry to MFD.
   - Cirrus Logic CS42L43: Format sdw_device_id table.
   - Cirrus Logic CS42L43: Use new SoundWire enumeration helper.
   - ROHM PMIC: Factor out power button registration and convert gpio-keys to use
     software nodes.
   - ST-Ericsson DB8500: Fold dbx500 header into db8500.
 
 - Device Tree Binding Updates
   - Core: Add techvision vendor prefix.
   - Marvell 88PM886: Allow vbus regulator.
   - MediaTek MT8195 SCP: Add support for MT8189 SoC.
   - Qualcomm SPMI PMIC: Document PMG1110.
   - Qualcomm SPMI PMIC: Document haptics device.
   - Qualcomm TCSR: Add compatible for Hawi and Maili SoCs.
   - Qualcomm TCSR: Add compatible for Shikra.
   - Qualcomm TCSR: Document the IPQ9650 TCSR block.
   - STMicroelectronics STMPE: Fix typo st,stmpe601 (should be st,stmpe610).
   - Syscon: Add ESWIN EIC7700 compatible.
   - Syscon: Allow syscon compatible for Loongson-2K0300 chip id.
   - Syscon: Disallow simple-bus with syscon.
   - Syscon: Drop custom select for older dtschema.
   - TI OMAP USBHS TLL: Convert to DT schema.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmqPE0EACgkQUa+KL4f8
 d2EwsA/6Ah511L+E+sH3PMz9/9ZR7F6b4xXx+YI0WuiWANNNEdxkkIiq6smdCQI9
 oS//iJBdMigdKzjllIwnAHTcfatZE+3A6qCroM0pnxsQejDdAR0BP2VA4b7QMGg0
 ey44e5CYZgRorh9oOTtsjE/jL4sNZK6AgyZab0gZ3Q/A5qubLRiSaphHfpfCej+q
 RC3W2m3jbQSge5iNy8iIg41PH4fHcjpRNM/UxT6UVexxBWiJ6i9yiNYdfb4joCuG
 Oh4Rr4TfnoN8yIuoA8WRngYejpV5ZGGnwXwTDl47WPvoJiMeWSnpQU0u/fSJARqm
 YAMtZ+GLjSfj60SgCu6HR8AyH9q5U54pNdBiCSQ/7fGhYJwq9WS/XDjr+Xaj0+ku
 g4veatMTMaNdwJr0RAViw1RAOA97cAqfgOADnlAJM/tzvGw0VjIxdrbciywUXB2A
 At26ibT6WQX/I/fPSJqmwieEYiueikZfvuLFYAeSrLQ4GWGGgq3Aj4k1LtOVLEP3
 y3Pt4rkxJQxW3EDKseaZYsyR7EbU3PnJFTsAY0/p1XiDSeiM4d0IIi7dZQiQygg4
 3XwmqE8ODxetHna+dPXr0ooaU9UIaaT1X5AyOr6t6Tp/n0Yq50F1PpjBCS2nLAYk
 JdkgfFBMWlkOZcCTgLYMKNSnmWZihUxb0zfDaOMCe4HUoqc1WLA=
 =92XF
 -----END PGP SIGNATURE-----

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

Pull MFD updates from Lee Jones:
 "New Support & Features:
   - MediaTek MT6397: Add mt6323 AUXADC support
   - MediaTek MT6397: Add mt6323 EFUSE support
   - Spreadtrum SC27xx: Add SC2730 regulator cell

  Improvements & Fixes:
   - Apple SMC: Fix key count endianness annotation
   - Azoteq IQS62x: Reject zero-length firmware records
   - ChromeOS EC: Introduce cros_ec_read_features helper and read
     features during probe to catch transfer errors
   - Cirrus Logic CS42L43: Fix regmap defaults ordering
   - Cirrus Logic CS42L43: Remove redundant NULL checks on SoundWire
   - Congatec Board Controller: Fix teardown ordering in cgbc_remove()
   - HP iPAQ Micro: Fix out-of-bounds stack read in ipaq_micro_str
   - Marvell 88PM886: Initialize the battery page
   - QNAP MCU: Keep the reply buffer alive past a command timeout
   - RAVE SP: Validate received frame payload lengths
   - Silicon Labs Si476x: Drop duplicate NULL checks
   - Silicon Labs Si476x: Modernize GPIO handling
   - Silicon Motion SM501: Fix potential memory leaks during remove
   - UCB1x00: Convert Assabet gpio-keys to use software nodes and
     register software node for GPIO controller
   - Viperboard: Fix native fields type in structures as little-endian
   - Viperboard: Remove redundant NULL check before kfree()
   - X-Powers AXP20x: Preserve other control bits when powering off

  Cleanups & Refactoring:
   - Core: Drop unused assignment of spi_device_id driver data
   - Core: Initialize spi_device_id arrays using member names
   - Core: Unify style of spi_device_id arrays
   - Maintainers: Add Intel LPSS section to follow the changes
   - Maintainers: Add a mailing list entry to MFD
   - Cirrus Logic CS42L43: Format sdw_device_id table
   - Cirrus Logic CS42L43: Use new SoundWire enumeration helper
   - ROHM PMIC: Factor out power button registration and convert
     gpio-keys to use software nodes
   - ST-Ericsson DB8500: Fold dbx500 header into db8500

  Device Tree Binding Updates:
   - Core: Add techvision vendor prefix
   - Marvell 88PM886: Allow vbus regulator
   - MediaTek MT8195 SCP: Add support for MT8189 SoC
   - Qualcomm SPMI PMIC: Document PMG1110
   - Qualcomm SPMI PMIC: Document haptics device
   - Qualcomm TCSR: Add compatible for Hawi and Maili SoCs
   - Qualcomm TCSR: Add compatible for Shikra
   - Qualcomm TCSR: Document the IPQ9650 TCSR block
   - STMicroelectronics STMPE: Fix typo st,stmpe601 (should be
     st,stmpe610)
   - Syscon: Add ESWIN EIC7700 compatible
   - Syscon: Allow syscon compatible for Loongson-2K0300 chip id
   - Syscon: Disallow simple-bus with syscon
   - Syscon: Drop custom select for older dtschema
   - TI OMAP USBHS TLL: Convert to DT schema"

* tag 'mfd-next-7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (45 commits)
  mfd: cs42l43: Fix regmap defaults ordering
  dt-bindings: mfd: syscon: Allow syscon compatible for Loongson-2K0300 chip id
  dt-bindings: mfd: syscon: Add ESWIN EIC7700 compatible
  mfd: qnap-mcu: keep the reply buffer alive past a command timeout
  dt-bindings: mfd: qcom,tcsr: Document the IPQ9650 TCSR block
  mfd: macsmc: Fix key count endianness annotation
  dt-bindings: mfd: qcom,spmi-pmic: Document haptics device
  mfd: iqs62x: Reject zero-length firmware records
  mfd: rave-sp: validate received frame payload lengths
  mfd: sm501: Fix potential memory leaks during remove
  mfd: viperboard: Fix native fields type in structures as little-endian
  mfd: si476x-i2c: Get rid of duplicate NULL checks
  dt-bindings: mfd: Convert OMAP USB TLL to DT schema
  mfd: cgbc: Fix teardown ordering in cgbc_remove()
  mfd: mt6397-core: Add mt6323 AUXADC support
  dt-bindings: mfd: qcom,tcsr: Add compatible for Hawi and Maili SoCs
  mfd: rohm: Factor out power button registration
  mfd: ucb1x00: Convert Assabet gpio-keys to use software nodes
  mfd: ucb1x00: Register software node for GPIO controller
  mfd: cs42l43: Tidy up formatting on sdw_device_id table
  ...
2026-08-27 10:45:08 -07:00
Linus Torvalds
59e6295fac Driver core changes for 7.3-rc1
- container_of:
 
   - Apply typeof_member(), remove the local __mptr variable to eliminate
     variable shadowing warnings on nested container_of() calls, and remove
     unnecessary parentheses.
 
 - core:
 
   - Add driver name to probe debug print for initcall_debug.
 
   - Avoid repeatedly printing the same 'Fixed dependency cycle' log.
 
   - Unwind device_add() on attribute creation failure in
     attribute_container_add_class_device().
 
   - Remove statistics group if encryption group creation fails in
     transport_add_class_device().
 
 - debugfs:
 
   - Fix lockdown check for mmap_prepare().
 
   - Warn if file creation failed due to uninitialized debugfs.
 
 - device property:
 
   - Implement fw_devlink support for software nodes by adding
     software_node_add_links(), which creates fwnode links from DEV_PROP_REF
     properties to enable automatic probe ordering. Add kunit-managed fwnode
     helpers and test coverage.
 
   - Fix infinite loop in fwnode_for_each_child_node() when the secondary fwnode
     has more than one child. Add test cases.
 
   - Fix out-of-bounds access in software_node_get_reference_args() when called
     with index -1 (UINT_MAX).
 
   - Refactor to use RAII approach with __free().
 
   - Add Bartosz Golaszewski as software node reviewer.
 
 - firmware loader:
 
   - Fix race where a sysfs fallback request can complete before being queued as
     pending, leading to a use-after-free on the next fallback request.
 
   - Reject 0-size built-in firmware and fail the build on empty firmware files
     in CONFIG_EXTRA_FIRMWARE.
 
 - kobject:
 
   - Provide __KOBJ_ATTR() and __KOBJ_ATTR_RO/WO() initialization macros and
     allow the constification of kobject attributes, enabling them to reside in
     read-only memory.
 
 - platform:
 
   - Provide platform_device_set_of_node(), platform_device_set_fwnode(), and
     platform_device_set_of_node_from_dev() helpers that encapsulate firmware
     node reference counting for dynamically allocated platform devices. Convert
     all in-tree users that manually assigned dev.of_node or dev.fwnode, fixing a
     pre-existing refcount bug in powermac.  Switch to counting references of all
     firmware node types, not only OF nodes.
 
   - Unify the release path for dynamically allocated platform devices by
     removing platform_device_release_full(). Amend the fwnode setter API
     contract to warn if a primary software node is overwritten. Add KUnit tests
     for correct software node removal on device unregistration.
 
 - Rust:
 
   - Auxiliary:
 
     - Add registration_data_with() closure-based API for invariant ForLt types.
 
   - Debugfs:
 
     - Migrate BinaryWriter and BinaryReaderMut trait requirements from
       kernel::transmute traits to zerocopy traits.
 
   - Device:
 
     - Add BoundInternal device context and InternalBoundContext trait for bus
       abstractions that need internal access to a bound device.
 
     - Make the lifetime on Core and CoreInternal invariant to prevent coercion
       to shorter lifetimes.
 
   - Devres:
 
     - Fix race between concurrent revokers where the losing revoker could return
       before the winning revoker finished dropping the inner data, causing
       use-after-free.
 
     - Ensure revocation is complete before the device finishes unbinding by
       making the synchronization bidirectional.
 
     - Add DevresLt<F: ForLt>, a wrapper around Devres that shortens 'static back
       to the caller's borrow scope. Implement ForLt and CovariantForLt for Bar,
       IoMem, and ExclusiveIoMem.
 
   - Driver:
 
     - Switch from index-based to pointer-based device ID info lookup, storing
       static references in driver_data. Centralize device ID handling in
       device_id.rs, removing the open-coded ACPI/OF matching logic and duplicate
       ID table from driver.rs.
 
   - I/O:
 
     - Make I/O regions typed (with a dynamically-sized Region type for the
       existing untyped case), create view types representing subregions of a
       mapped I/O region, and add io_project!() for safely creating subviews.
 
     - Split Io into a base trait (IoBase) and an extension trait (Io) with a
       blanket implementation, preventing implementers from overriding provided
       methods that unsafe code relies on.
 
     - Add a SysMem backend for shared system memory with volatile access, and
       make Coherent implement Io via an I/O view type.  Add IoSysMap as sum type
       of Mmio and SysMem. Add copying methods (memcpy_{from,to}io()) and
       read_val()/write_val() for typed access.
 
     - Replace dma_read!()/dma_write!() with io_read!()/io_write!() for
       primitives and copying methods for aggregates; drop the old macros.
       Convert nova-core to use I/O projection.
 
     - Fix internal shortcut rule dispatch in the register!() macro, remove
       unused rule arguments, and use path fragments for alias destinations.
 
   - IRQ:
 
     - Make irq::Registration compatible with lifetime-bound drivers by
       removing the 'static bound on Handler/ThreadedHandler and
       replacing Devres<RegistrationInner> with direct
       request_irq()/free_irq() calls.  Handlers can now directly own
       lifetime-bound device resources.
 
   - PCI:
 
     - Convert IrqVectorRegistration to a lifetime-annotated owning type,
       giving drivers explicit control over the allocation lifetime.
       IrqVector embeds a resolved IrqRequest, making the conversion
       infallible. Remove the redundant
       request_irq()/request_threaded_irq() wrappers from pci::Device.
 
     - Add pci_irq_type() C helper and expose it via irq_type() on
       IrqVectorRegistration and IrqVector, returning PCI_IRQ_MSIX, PCI_IRQ_MSI,
       or PCI_IRQ_INTX.
 
     - Mark pci::Device refcount methods inline.
 
   - Serdev:
 
     - Add Rust abstractions for the serial device bus, including serdev::Driver
       trait, serdev::Device wrapping struct serdev_device, and serdev::Adapter
       implementing RegistrationOps.  Includes a sample driver. Markus Probst
       takes over as serdev maintainer for both C and Rust code.
 
   - Misc:
 
     - Split ForLt into a base trait (providing the Of<'a> GAT) and an unsafe
       CovariantForLt subtrait guaranteeing covariance, enabling invariant types
       (e.g. those containing Mutex<&'bound T>) to participate in the ForLt
       abstraction.
 
     - Fix Coherent read past EOF returning -ERANGE instead of zero.
 
     - Fix firmware example UB by avoiding null-pointer ARef.
 
 - misc:
 
   - Avoid iattr allocation in kernfs listxattr by using kernfs_iattrs_noalloc().
   - Unregister SoC bus on early device registration failure.
   - Remove unused DMA_FENCE_TRACE Kconfig symbol.
   - Fix /sys/module path in comment.
   - Refactor ISA bus init to remove nested blocks.
   - Remove redundant nodemask clears in numa_init().
   - Add kernel-doc for fwnode_operations and sys_soc.h, mark internal property
     data as private for kernel-doc, and add property.h/fwnode.h to driver-api
     infrastructure docs.
   - Add MAINTAINERS entry for sys_soc.h.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQS2q/xV6QjXAdC7k+1FlHeO1qrKLgUCaoSPugAKCRBFlHeO1qrK
 LlBrAP958EaYZVyfAsqq0EyHv86ahXKWoDDvkwbRUZA5CfV9tAD/bMWVtPLRYaaq
 eNEZT7p5w3Haezh61H3c5zpuwFNMTA0=
 =VRIa
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core

Pull driver core updates from Danilo Krummrich:
 "container_of:

   - Apply typeof_member(), remove the local __mptr variable to
     eliminate variable shadowing warnings on nested container_of()
     calls, and remove unnecessary parentheses

  core:

   - Add driver name to probe debug print for initcall_debug

   - Avoid repeatedly printing the same 'Fixed dependency cycle' log

   - Unwind device_add() on attribute creation failure in
     attribute_container_add_class_device()

   - Remove statistics group if encryption group creation fails in
     transport_add_class_device()

  debugfs:

   - Fix lockdown check for mmap_prepare()

   - Warn if file creation failed due to uninitialized debugfs

  device property:

   - Implement fw_devlink support for software nodes by adding
     software_node_add_links(), which creates fwnode links from
     DEV_PROP_REF properties to enable automatic probe ordering. Add
     kunit-managed fwnode helpers and test coverage

   - Fix infinite loop in fwnode_for_each_child_node() when the
     secondary fwnode has more than one child. Add test cases

   - Fix out-of-bounds access in software_node_get_reference_args() when
     called with index -1 (UINT_MAX)

   - Refactor to use RAII approach with __free()

   - Add Bartosz Golaszewski as software node reviewer

  firmware loader:

   - Fix race where a sysfs fallback request can complete before being
     queued as pending, leading to a use-after-free on the next fallback
     request

   - Reject 0-size built-in firmware and fail the build on empty
     firmware files in CONFIG_EXTRA_FIRMWARE

  kobject:

   - Provide __KOBJ_ATTR() and __KOBJ_ATTR_RO/WO() initialization macros
     and allow the constification of kobject attributes, enabling them
     to reside in read-only memory

  platform:

   - Provide platform_device_set_of_node(), platform_device_set_fwnode(),
     and platform_device_set_of_node_from_dev() helpers that encapsulate
     firmware node reference counting for dynamically allocated platform
     devices

     Convert all in-tree users that manually assigned dev.of_node or
     dev.fwnode, fixing a pre-existing refcount bug in powermac. Switch
     to counting references of all firmware node types, not only OF
     nodes

   - Unify the release path for dynamically allocated platform devices
     by removing platform_device_release_full(). Amend the fwnode setter
     API contract to warn if a primary software node is overwritten. Add
     KUnit tests for correct software node removal on device
     unregistration

  Rust:

   - Auxiliary:
       - Add registration_data_with() closure-based API for invariant
         ForLt types

   - Debugfs:
       - Migrate BinaryWriter and BinaryReaderMut trait requirements
         from kernel::transmute traits to zerocopy traits

   - Device:
       - Add BoundInternal device context and InternalBoundContext trait
         for bus abstractions that need internal access to a bound
         device.
       - Make the lifetime on Core and CoreInternal invariant to prevent
         coercion to shorter lifetimes

   - Devres:
       - Fix race between concurrent revokers where the losing revoker
         could return before the winning revoker finished dropping the
         inner data, causing use-after-free.
       - Ensure revocation is complete before the device finishes
         unbinding by making the synchronization bidirectional.
       - Add DevresLt<F: ForLt>, a wrapper around Devres that shortens
         'static back to the caller's borrow scope. Implement ForLt and
         CovariantForLt for Bar, IoMem, and ExclusiveIoMem

   - Driver:
       - Switch from index-based to pointer-based device ID info lookup,
         storing static references in driver_data. Centralize device ID
         handling in device_id.rs, removing the open-coded ACPI/OF
         matching logic and duplicate ID table from driver.rs

   - I/O:
       - Make I/O regions typed (with a dynamically-sized Region type
         for the existing untyped case), create view types representing
         subregions of a mapped I/O region, and add io_project!() for
         safely creating subviews.
       - Split Io into a base trait (IoBase) and an extension trait (Io)
         with a blanket implementation, preventing implementers from
         overriding provided methods that unsafe code relies on.
       - Add a SysMem backend for shared system memory with volatile
         access, and make Coherent implement Io via an I/O view type.
         Add IoSysMap as sum type of Mmio and SysMem. Add copying
         methods (memcpy_{from,to}io()) and read_val()/write_val() for
         typed access.
       - Replace dma_read!()/dma_write!() with io_read!()/io_write!()
         for primitives and copying methods for aggregates; drop the old
         macros. Convert nova-core to use I/O projection.
       - Fix internal shortcut rule dispatch in the register!() macro,
         remove unused rule arguments, and use path fragments for alias
         destinations

   - IRQ:
       - Make irq::Registration compatible with lifetime-bound drivers
         by removing the 'static bound on Handler/ThreadedHandler and
         replacing Devres<RegistrationInner> with direct
         request_irq()/free_irq() calls. Handlers can now directly own
         lifetime-bound device resources

   - PCI:
       - Convert IrqVectorRegistration to a lifetime-annotated owning
         type, giving drivers explicit control over the allocation
         lifetime. IrqVector embeds a resolved IrqRequest, making the
         conversion infallible. Remove the redundant
         request_irq()/request_threaded_irq() wrappers from pci::Device.
       - Add pci_irq_type() C helper and expose it via irq_type() on
         IrqVectorRegistration and IrqVector, returning PCI_IRQ_MSIX,
         PCI_IRQ_MSI, or PCI_IRQ_INTX.
       - Mark pci::Device refcount methods inline

   - Serdev:
       - Add Rust abstractions for the serial device bus, including
         serdev::Driver trait, serdev::Device wrapping struct
         serdev_device, and serdev::Adapter implementing
         RegistrationOps. Includes a sample driver. Markus Probst takes
         over as serdev maintainer for both C and Rust code

   - Misc:
       - Split ForLt into a base trait (providing the Of<'a> GAT) and an
         unsafe CovariantForLt subtrait guaranteeing covariance,
         enabling invariant types (e.g. those containing Mutex<&'bound T>)
         to participate in the ForLt abstraction.
       - Fix Coherent read past EOF returning -ERANGE instead of zero.
       - Fix firmware example UB by avoiding null-pointer ARef

  misc:
   - Avoid iattr allocation in kernfs listxattr by using
     kernfs_iattrs_noalloc().
   - Unregister SoC bus on early device registration failure.
   - Remove unused DMA_FENCE_TRACE Kconfig symbol.
   - Fix /sys/module path in comment.
   - Refactor ISA bus init to remove nested blocks.
   - Remove redundant nodemask clears in numa_init().
   - Add kernel-doc for fwnode_operations and sys_soc.h, mark
     internal property data as private for kernel-doc, and add
     property.h/fwnode.h to driver-api infrastructure docs.
   - Add MAINTAINERS entry for sys_soc.h"

* tag 'driver-core-7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core: (129 commits)
  rust: pci: expose the allocated interrupt type
  PCI: Add pci_irq_type() to query the allocated interrupt type
  rust: pci: remove request_irq() and request_threaded_irq() from Device
  rust: pci: resolve IRQ in index() and embed IrqRequest in IrqVector
  rust: pci: convert IrqVectorRegistration to a lifetime-managed owning type
  kernfs: avoid iattr allocation in listxattr
  rust: serdev: use ThisModule::as_ptr() instead of field access
  ACPI/IORT: use platform_device_set_fwnode()
  ACPI/APMT: use platform_device_set_fwnode()
  firmware_loader: do not queue completed sysfs fallback requests
  rust: pci: Mark Device refcount methods inline
  rust: irq: make Registration compatible with lifetime-bound drivers
  rust: net/phy: remove expansion from doc
  rust: dma: return zero for Coherent reads past EOF
  rust: io: register: use path fragment for alias destination
  rust: io: register: remove unused rule arguments
  rust: io: register: dispatch shortcut rules internally
  MAINTAINERS: add sys_soc.h to DRIVER CORE
  rust: debugfs: remove unsafe blocks from traits impl for Vec
  rust: debugfs: migrate debugfs traits requirements to zerocopy
  ...
2026-08-19 10:42:18 -07:00
Charles Keepax
9d0e4b1ae5 mfd: cs42l43: Fix regmap defaults ordering
The regmap defaults should be ordered as binary search is done on the
array. A few registers were added in the wrong places, move these to be
in register address order.

Fixes: a6fe20d67d ("mfd: cs42l43: Add support for the B variant")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260805120109.4024451-1-ckeepax@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-08-12 12:27:15 +01:00
Ali Ahmet Memis
47504742ce mfd: qnap-mcu: keep the reply buffer alive past a command timeout
qnap_mcu_exec() publishes an on-stack buffer to the receive path:

	unsigned char rx[QNAP_MCU_RX_BUFFER_SIZE];
	...
	reply->data = rx;
	reply->length = length;

and qnap_mcu_receive_buf() writes into it from the serdev receive path,
which runs out of flush_to_ldisc() and is not serialized against
qnap_mcu_exec() at all. bus_lock cannot cover it, because qnap_mcu_exec()
holds that mutex across wait_for_completion_timeout().

On a timeout qnap_mcu_exec() returns with reply->data still pointing at
its own frame. A reply that arrives late, or an unsolicited message from
the MCU, is then written into a stack frame that has been left, corrupting
whatever runs next on that stack. The same applies when qnap_mcu_write()
fails, since that path returns without touching the reply state either.

Move the receive buffer into struct qnap_mcu. It is 37 bytes and the
structure is devm_kzalloc()ed, so it lives as long as the driver, and a
late write lands in memory that is still valid and is reinitialized by the
next command. bus_lock keeps commands from sharing it.

This deliberately does not clear reply->data or reply->length on the
timeout path. Doing so races with qnap_mcu_receive_buf(), which reads both
after its

	if (!reply->length)
		return size;

check: clearing reply->data gives a NULL dereference, and clearing
reply->length alone removes the reply->received == reply->length exit
condition, so the copy loop runs until the uart chunk is consumed and
overruns the buffer. Leaving both set keeps the write bounded by
reply->length, which qnap_mcu_exec() has already checked against
sizeof(mcu->rx).

Fixes: 998f70d180 ("mfd: Add base driver for qnap-mcu devices")
Cc: stable@vger.kernel.org
Signed-off-by: Ali Ahmet Memis <ali@iusegentoo.com>
Link: https://lore.kernel.org/all/20260802132012.537B81F000E9@smtp.kernel.org/
Link: https://patch.msgid.link/20260802135307.31380-1-ali@iusegentoo.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-08-12 09:07:27 +01:00
Danilo Krummrich
dbaafe9cc5 Linux 7.2-rc7
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCgA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAmp49yoeHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiG1WIH/1SD1rNIb4Prf0C7
 Rk9Hz0IZ3uYNe1Xi+Ozv3zQUuLB6d7ewl9e4zyHHYT4eeIKvBZv9jtIF3QH4ty5X
 JB9Gy62WICtqIEkzzt2bkcV1byFmKz2+BLv04fgcyTXEGOEByCDiZ3/N3kSJOqvg
 YxsGOmKkQSTavFLSe96Gj2pgchJqZ6j3qucDO6GrPOo8depP2kfzxfaJbXix0HEZ
 ln08X9hgZDxy4I98PmSaaJsK2R/i6T6jQdA3i8DnSbbyNhLn+3FK6gkP08ZEpaor
 82WwJf+MVCLHXLYDy0aYOUDHpkNkkJWOj45A2Hv9JkOupGcUpyPGr82l4yh/MrxC
 +kM28xs=
 =rIbd
 -----END PGP SIGNATURE-----

Merge tag 'v7.2-rc7' into driver-core-next

We need the driver-core fixes in here as well to build on top of.

Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-08-10 01:20:05 +02:00
Sven Peter
0a29aa6052 mfd: macsmc: Fix key count endianness annotation
SMC firmware returns the value of the #KEY key in big-endian unlike most
other keys. Reading it through apple_smc_read_u32() into a plain u32
and then converting with be32_to_cpu() makes sparse complain:

  drivers/mfd/macsmc.c:462:26: sparse: cast to restricted __be32

Read the raw value into a __be32 using apple_smc_read() instead.

Fixes: e038d985c9 ("mfd: Add Apple Silicon System Management Controller")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202607181046.OANjIoqR-lkp@intel.com/
Signed-off-by: Sven Peter <sven@kernel.org>
Reviewed-by: Janne Grunau <j@jannau.net>
Reviewed-by: Joshua Peisach <jpeisach@ubuntu.com>
Link: https://patch.msgid.link/20260719-b4-macsmc-be32-fix-v1-1-c7b1936307fa@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
2026-08-06 14:27:39 +01:00
Pengpeng Hou
08ea045e0b mfd: iqs62x: Reject zero-length firmware records
struct iqs62x_fw_rec includes the first data byte in its fixed-size header,
so the parser advances by len - 1 bytes after that header. A zero len makes
the size_t cursor update move back by one byte, so the next record overlaps
the current record instead of following a valid declared extent.

Reject zero-length records and express the remaining-size check without an
offset addition.

Fixes: 4d9cf7df8d ("mfd: Add support for Azoteq IQS620A/621/622/624/625")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://lore.kernel.org/all/20260706091034.75865-1-pengpeng@iscas.ac.cn/
Link: https://patch.msgid.link/20260720115423.94994-1-pengpeng@iscas.ac.cn
Signed-off-by: Lee Jones <lee@kernel.org>
2026-08-06 14:16:03 +01:00
Pengpeng Hou
0be718b545 mfd: rave-sp: validate received frame payload lengths
A received RAVE-SP frame contains protocol data followed by a
variant-specific one- or two-byte checksum. rave_sp_receive_frame() derives
a checksum pointer before proving that the frame contains the checksum,
then passes the checksum-inclusive length to handlers that index the
command, acknowledgment ID and event-data bytes or derive a reply payload
length.

Name those protocol field offsets, prove the checksum extent before
deriving the protocol-data length, pass only that data length to the
handlers, and require the complete event or reply prefix before consuming
it.

Fixes: 538ee27290 ("mfd: Add driver for RAVE Supervisory Processor")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://lore.kernel.org/all/20260706092337.78754-1-pengpeng@iscas.ac.cn/
Link: https://patch.msgid.link/20260720115523.99956-1-pengpeng@iscas.ac.cn
Signed-off-by: Lee Jones <lee@kernel.org>
2026-08-06 14:07:49 +01:00
Abdun Nihaal
83feedd9d8 mfd: sm501: Fix potential memory leaks during remove
The memory allocated for struct sm501_devdata in sm501_pci_probe() and
sm501_plat_probe() is not freed by the corresponding remove functions
sm501_pci_remove() and sm501_plat_remove(). Fix that by adding a call to
kfree().

Fixes: b6d6454fdb ("[PATCH] mfd: SM501 core driver")
Cc: stable@vger.kernel.org
Signed-off-by: Abdun Nihaal <nihaal@cse.iitm.ac.in>
Link: https://patch.msgid.link/20260720113836.73133-1-nihaal@cse.iitm.ac.in
Signed-off-by: Lee Jones <lee@kernel.org>
2026-08-06 14:04:09 +01:00
Andy Shevchenko
b1eb3de64d mfd: si476x-i2c: Get rid of duplicate NULL checks
GPIO descriptor APIs are NULL-aware and since the requested line is optional
we don't need to have an additional check each time we want to toggle GPIO.

Get rid of duplicate NULL checks.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260715191603.1325479-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30 14:33:15 +01:00
Thomas Richard
2970c2db8a mfd: cgbc: Fix teardown ordering in cgbc_remove()
Release Board Controller session once children are removed by the core.

Cc: stable@vger.kernel.org
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/cover.1783507945.git.u.kleine-koenig%40baylibre.com?part=19
Fixes: 6f1067cfbe ("mfd: Add Congatec Board Controller driver")
Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://patch.msgid.link/20260713-cgbc-core-fix-cgbc-remove-v1-1-79274ad62b3a@bootlin.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30 14:33:13 +01:00
Roman Vivchar
1ae94ed761 mfd: mt6397-core: Add mt6323 AUXADC support
The mt6323 PMIC includes an AUXADC. Register the AUXADC in the mt6323
devices array to allow the corresponding driver to probe using compatible
string.

Signed-off-by: Roman Vivchar <rva333@protonmail.com>
Tested-by: Ben Grisdale <bengris32@protonmail.ch> # Amazon Echo Dot (2nd Generation)
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20260709-mt6323-adc-v5-3-d11b8332a735@protonmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30 14:33:12 +01:00
Dmitry Torokhov
1b86b4ef3a mfd: rohm: Factor out power button registration
Factor out the power button registration logic using software nodes
from rohm-bd718x7 and rohm-bd71828 drivers into a shared module
rohm-pwrbutton.

This reduces duplication and makes it easier to support other ROHM
PMICs with similar power button configurations.

Suggested-by: Lee Jones <lee@kernel.org>
Assisted-by: Antigravity:gemini-3.5-flash
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://patch.msgid.link/akw4naN2Khjv8itB@google.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30 14:33:08 +01:00
Dmitry Torokhov
cbff6a720d mfd: ucb1x00: Convert Assabet gpio-keys to use software nodes
Convert the legacy gpio-keys platform device on the StrongARM SA-1100
Assabet evaluation board to use software nodes and device properties.
This allows describing the buttons and their GPIO bindings via software
nodes so that platform data support can eventually be removed from the
gpio-keys driver.

Define static software nodes for the gpio-keys device and the six button
child nodes at file scope using relative pin indexing on the UCB1x00 GPIO
controller node. In ucb1x00_assabet_add(), register the software node
group and use platform_device_register_full() to register the device.

Assisted-by: Antigravity:gemini-3.5-flash
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260706-ucb1x00-assabet-swnode-v2-2-e6271ea3d3dc@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30 14:33:06 +01:00
Dmitry Torokhov
0674e2cd7f mfd: ucb1x00: Register software node for GPIO controller
Define a static software node for the UCB1x00 GPIO controller and attach
it to the core MFD device in ucb1x00_probe(). This node will also be
used by the created GPIO chip.

This allows machine subdrivers (such as Assabet evaluation board
support) to reference the UCB1x00 GPIO controller in property entries
when converting legacy platform data to software nodes, resolving pin
bindings directly via the attached firmware node without relying on
name matching.

Assisted-by: Antigravity:gemini-3.5-flash
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260706-ucb1x00-assabet-swnode-v2-1-e6271ea3d3dc@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30 14:33:04 +01:00
Charles Keepax
a302796321 mfd: cs42l43: Tidy up formatting on sdw_device_id table
Remove spaces after cast as they generate check patch warnings, and
update the terminator to better match kernel coding guidelines.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260708140039.1993489-3-ckeepax@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30 14:33:03 +01:00
Charles Keepax
2e68a2188d mfd: cs42l43: Remove redundant NULL checks on SoundWire
The SoundWire core helpers now check for NULL on the SoundWire
peripheral so there is no need to do so locally, remove the
duplicate checks.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260708100914.1298080-1-ckeepax@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30 14:33:02 +01:00
Uwe Kleine-König (The Capable Hub)
d0a1023960 mfd: Unify style of spi_device_id arrays
The two previous commits adapted the style of some spi_device_id arrays.
Fix the remaining arrays to the same style, that is:

 - no comma after the list terminator and after an initializer iff the
   closing } is on the same line
 - a single space in the list terminator

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/323dc79eb1bcc55caf0163e26501e1de3e710554.1783003256.git.u.kleine-koenig@baylibre.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30 14:32:58 +01:00
Uwe Kleine-König (The Capable Hub)
02c54e9078 mfd: Initialize spi_device_id arrays using member names
While being less compact, using named initializers allows to more easily
see which members of the structs are assigned which value without having
to lookup the declaration of the struct. And it's also more robust
against changes to the struct definition.

The mentioned robustness is relevant for a planned change to struct
spi_device_id that replaces .driver_data by an anonymous union.

Also adapt spacing and usage of commas to the most common style.

This patch doesn't modify the compiled array, only its representation
in source form benefits.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/f83c8292e7e3ba9425792591fb136d4ae1468215.1783003256.git.u.kleine-koenig@baylibre.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30 14:32:55 +01:00
Uwe Kleine-König (The Capable Hub)
e9929b4b61 mfd: Drop unused assignment of spi_device_id driver data
The drivers explicitly set the .driver_data member of struct
spi_device_id to zero without relying on that value. Drop these unused
assignments.

While touching these arrays use named initializers for .name.

This patch doesn't modify the compiled arrays, only their representation
in source form benefits. The former was confirmed with x86 and arm64
builds.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/15dc05c1a49f79b6cb43684d8bcf60adcd1be7de.1783003256.git.u.kleine-koenig@baylibre.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30 14:32:53 +01:00
Otto Pflüger
abf98c166e mfd: sprd-sc27xx: Add SC2730 regulator cell
Add an MFD cell to register the SC2730 PMIC's regulators.

Signed-off-by: Otto Pflüger <otto.pflueger@abscue.de>
Link: https://patch.msgid.link/20260701-sc2730-regulators-v7-1-6e145ce83657@abscue.de
Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30 14:32:52 +01:00
Mohammad Shahid
733fbd0d11 mfd: viperboard: Remove redundant NULL check before kfree()
kfree() safely handles NULL pointers, so the explicit NULL check
before calling kfree() is unnecessary.

This issue was reported by ifnullfree.cocci.

Signed-off-by: Mohammad Shahid <mdshahid03@gmail.com>
Link: https://patch.msgid.link/20260703105937.62541-1-mdshahid03@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30 14:32:51 +01:00
Linus Walleij
b8bc38bcec mfd: db8500-prcmu: Fold dbx500 header into db8500
Move the DBx500 PRCMU definitions into the DB8500 PRCMU
header and delete the wrapper header.

Convert users of simple PRCMU wrappers to call the DB8500 helpers
directly.

The dbx500-prcmu.h header was the result of an earlier attempt to
abstract several DBx5x SoC PRCMU units to use the same abstract
header. They are deleted from the kernel and this is not just
causing maintenance burden and build errors.

The stub code is using -ENOSYS in a way checkpatch complains about
so replace these with -EINVAL while we're at it.

Assisted-by: Codex:gpt-5-5
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202606180825.vUSQntkJ-lkp@intel.com/
Signed-off-by: Linus Walleij <linusw@kernel.org>
Acked-by: Brian Masney <bmasney@redhat.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/oe-kbuild-all/202606180825.vUSQntkJ-lkp@intel.com/
Link: https://patch.msgid.link/20260619-mfd-prcmu-merge-headers-v1-1-8ea0ee23b4d6@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30 14:32:45 +01:00
Duje Mihanović
824b2c8473 mfd: 88pm886: Initialize the battery page
Initialize the PMIC's battery page. The battery page registers are
shared between Vbus regulator, charger, fuelgauge and camera flash
blocks, hence the commonization of the page.

Signed-off-by: Duje Mihanović <duje@dujemihanovic.xyz>
Reviewed-by: Karel Balej <balejk@matfyz.cz>
Link: https://patch.msgid.link/20260613-88pm886-vbus-v2-2-021dfb02c6bb@dujemihanovic.xyz
Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30 14:32:43 +01:00
Charles Keepax
4d8ba321a7 mfd: cs42l43: Use new SoundWire enumeration helper
Now the new wait for SoundWire enumeration helper no longer depends on
unattach_request it is safe to use from probe time. Update the driver
to use the new core helper.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260608102714.2503120-4-ckeepax@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30 14:32:41 +01:00
Oleg Proshkin
3756bf05c9 mfd: axp20x: Preserve other control bits when powering off
axp20x_power_off() triggers shutdown by writing AXP20X_OFF (BIT(7)) to
the power-off control register with regmap_write(), which rewrites the
whole register and clears other control bits in it.

On the AXP221/AXP223 (and the register-compatible AXP228) - that
register also holds the CHGLED auto-control bit.
Clearing it during an orderly shutdown disables the hardware charge
indicator, so the charge LED stays dark while the board is powered off
and charging. Other variants keep unrelated configuration in the same
register too.

Set only the power-off bit with regmap_set_bits() and leave the rest of
the register untouched. The shutdown register is readable on every
variant, so the read-modify-write should be safe.

Tested on a ClockworkPi uConsole (Raspberry Pi Compute Module 4, AXP228,
which enumerates as AXP221): register AXP20X_OFF_CTRL reads 0x08 at
runtime, so the old code left it 0x80 whereas setting only BIT(7)
leaves 0x88. Writing 0x88 at power-off enables the charge LED
while still powering off the PMIC.

Signed-off-by: Oleg Proshkin <oleg.pro171@gmail.com>
Reviewed-by: Chen-Yu Tsai <wens@kernel.org>
Link: https://patch.msgid.link/20260611154629.76607-1-oleg.pro171@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30 14:32:38 +01:00
Dmitry Torokhov
da3a98c941 mfd: ipaq-micro: Fix out-of-bounds stack read in ipaq_micro_str
ipaq_micro_str() decodes a UTF-16LE string into an ASCII string.
It copies characters to a stack buffer retstr, but fails to
null-terminate it. When kstrdup() is called on retstr, it can read past
the buffer into uninitialized stack memory, potentially leaking stack
contents.

Fix this by initializing retstr to zero.

Reported-by: sashiko-bot@kernel.org
Assisted-by: Antigravity:gemini-3.5-flash
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://patch.msgid.link/aintJF4X5tWDW-Ej@google.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30 14:32:36 +01:00
Linus Walleij
b87549a9bb mfd: si476x: Modernize GPIO handling
The SI476X driver depends on the legacy GPIO API. As it only
really use a single GPIO for reset, and this can be easily converted
to use a GPIO descriptor, modernize the driver.

The "reset" GPIO is obtained from a device property, such as a
device tree ("reset-gpios", which is standard, but this hardware has
no DT bindings as of now) or a software node for static platforms.

Out-of-tree users can easily adopt to providing a GPIO descriptor
this way.

Signed-off-by: Linus Walleij <linusw@kernel.org>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260608-mfd-si476x-v2-1-da5f779c1888@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30 14:32:34 +01:00
Roman Vivchar
90d9f2988d mfd: mt6397-core: Add mt6323 EFUSE support
The mt6323 PMIC includes an EFUSE. Register the EFUSE in the mt6323
devices array to allow the corresponding driver to probe using compatible
string.

Signed-off-by: Roman Vivchar <rva333@protonmail.com>
Tested-by: Ben Grisdale <bengris32@protonmail.ch> # Amazon Echo Dot (2nd Generation)
Link: https://patch.msgid.link/20260617-mt6323-nvmem-v2-3-4f30e36aa0f4@protonmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-30 14:32:33 +01:00
Lee Jones
f1f3afd19f Merge branches 'ib-mfd-legacy-gpio-7.3' and 'ib-mfd-platform-chrome-7.3' into ibs-for-mfd-merged 2026-07-30 14:31:53 +01:00
Bartosz Golaszewski
8bdba6f6cf gpio: legacy interface cleanups for 7.3
These are the remaining patches for legacy gpio interface
 cleanup, ensuring that files referencing them are sure to
 have CONFIG_GPIOLIB_LEGACY set, and use linux/gpio/legacy.h
 instead of the old linux/gpio.h header.
 
 There are a few more patches already merged in other
 branches for 7.3, including soc, led, net and media. Once
 everything is in, we can apply the final patches to turn
 off CONFIG_GPIOLIB_LEGACY by default and remove the obsolete
 header file.
 
 This branch is based on the immutable ib-mfd-legacy-gpio-7.3
 branch from mfd.git to avoid a conflict in the rohm drivers.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmpjrCwACgkQmmx57+YA
 GNlhuA//eRNxgyDFRUtuRchUUnIjpCzPdZOXTvnTmDTVYIsHaKS6J/KTBZcxRG7g
 tA749mgpQ2tT0hZFhT1XHCaxHwwBfmV0lomIO65pNcmqmEAUODxTwEy3t4ON4loi
 Ee0SqEXhI+NhMbEoQkrpcCk5y+89Xo+iABbEv12UL/V/K0PKfRDCRs2ZbARnE0yu
 L9wiqt2TJn3baHMabxBZJSWXrYpHCaPqm+vQgIhELQZ4TGswfi6OvCEPhUkk1QUa
 mVvWH7LtUi1A0Ya1HvAhgncvboY6LZYjDHMw7meQmUOSTIu7XoQ6+XjEJ6LJSgtH
 rLAdrFUHFezoHd0UaklnB3taEa7KOZIljNIY8IGRMSqv7jYF8fYXTPuxnS9fuj2o
 u+GxDriWYLp1DfH7HlkrVbmVeX6zunH8qYx91z5aRl7YHNKfwg0wRv8mxAgeBTJy
 1HO/su+ZT0X21hvVibiQNy08VWiQ5+9F5DV+SPTKtaT8chGjjx6uw7oyZkgvzWyu
 xdHuwOzH9WAhL7WnGcJ7PkJzWDoLVkl3KzRCCaYMXBCyLRwCIJTfC5CH7hJNh41i
 fW8b5Nfh7DRAhEuapQk87/NE/sRIFKZW2kfyzbCzsJHm+TW/5X+O6OwoJ+KUSdWQ
 SqVJOVUKDWjg0S8+jxu0mr1ikzwKgrFv2gzWFxaffb6Oi0rqBc4=
 =Ybrr
 -----END PGP SIGNATURE-----

Merge tag 'config-gpio-legacy-for-7.3' of https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground into gpio/for-next

gpio: legacy interface cleanups for 7.3

These are the remaining patches for legacy gpio interface
cleanup, ensuring that files referencing them are sure to
have CONFIG_GPIOLIB_LEGACY set, and use linux/gpio/legacy.h
instead of the old linux/gpio.h header.

There are a few more patches already merged in other
branches for 7.3, including soc, led, net and media. Once
everything is in, we can apply the final patches to turn
off CONFIG_GPIOLIB_LEGACY by default and remove the obsolete
header file.

This branch is based on the immutable ib-mfd-legacy-gpio-7.3
branch from mfd.git to avoid a conflict in the rohm drivers.
2026-07-27 09:56:49 +02:00
Arnd Bergmann
682006310d mfd: replace linux/gpio.h inclusions
linux/gpio.h should no longer be used, convert these instead to
either linux/gpio/consumer.h or linux/gpio/legacy.h as needed.

Acked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-07-24 20:12:48 +02:00
Andrei Kuchynski
5855464dff mfd: cros_ec: Read EC features during probe to catch transfer error
cros_ec_check_features() does not return an error if the underlying
EC_CMD_GET_FEATURES command fails. Consequently, when the Fingerprint
device fails to respond, the probe function ignores the failure and falls
back to installing it as 'cros_ec' device instead of 'cros_fp'.
This leads to a sysfs duplicate filename collision later when the real
'cros_ec' device attempts to register:

  cros-ec-spi spi5.0: EC failed to respond in time
  cros-ec-dev.19.auto: cannot get EC features: -110
  sysfs : cannot create duplicate filename '/class/chromeos/cros_ec'
        : sysfs_do_create_link_sd+0x94/0xdc
        : ec_device_probe+0x150/0x4f0

Fix this by explicitly calling the newly introduced cros_ec_read_features()
function. If the transfer fails, abort the broken device initialization.
Move the initialization of class_dev before this call to prevent a missing
release() callback warning on the error path.

Signed-off-by: Andrei Kuchynski <akuchynski@chromium.org>
Link: https://patch.msgid.link/20260608211518.2214740-3-akuchynski@chromium.org
Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-23 17:02:44 +01:00
Dmitry Torokhov
6c0c972cac mfd: rohm-bd718x7: Use software nodes for gpio-keys
Refactor the rohm-bd7182x7 MFD driver to use software nodes for
instantiating the gpio-keys child device, replacing the old
platform_data mechanism.

The power key's properties are now defined using software nodes and
property entries. The IRQ is passed as a resource attached to the
platform device.

This will allow dropping support for using platform data for configuring
gpio-keys in the future.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://patch.msgid.link/20260611-rohm-software-nodes-v5-2-0244664a3b65@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-16 13:33:04 +01:00
Dmitry Torokhov
13b3dce7da mfd: rohm-bd71828: Use software nodes for gpio-keys
Refactor the rohm-bd71828 MFD driver to use software nodes for
instantiating the gpio-keys child device, replacing the old
platform_data mechanism.

The power key's properties are now defined using software nodes and
property entries. The IRQ is passed as a resource attached to the
platform device.

This will allow dropping support for using platform data for configuring
gpio-keys in the future.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://patch.msgid.link/20260611-rohm-software-nodes-v5-1-0244664a3b65@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-07-16 13:32:51 +01:00
Bartosz Golaszewski
4108b2633d mfd: tps6586: use platform_device_set_of_node()
Ahead of reworking the reference counting logic for platform devices,
encapsulate the assignment of the OF node for dynamically allocated
platform devices with the provided helper.

Acked-by: Lee Jones <lee@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260706-pdev-fwnode-ref-v3-12-1ff028e33779@oss.qualcomm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-10 16:07:09 +02:00
Uwe Kleine-König (The Capable Hub)
995832b2ce Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files)
Replace the #include of <linux/mod_devicetable.h> by the more specific
<linux/device-id/*.h> where applicable. For most cases the include
can be dropped completely, only a few drivers need one or two headers
added.

Acked-by: Danilo Krummrich <dakr@kernel.org>
Acked-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/1a3f2007c5c5dcf555c09a4035ce3ae8ef1b6c49.1782808461.git.u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
2026-07-03 07:38:17 +02:00
Linus Torvalds
6beaec3aee MFD for v7.2
- New Support & Features
   - Renesas RSMU: Add support for the IDT 8a34002 Clock Matrix
   - Samsung S2MU005: Add support for the Samsung S2MU005 PMIC which includes charger,
     MUIC, flash and RGB LED controllers
   - SpacemiT P1: Add a reboot cell for the SpacemiT P1 chip
   - Texas Instruments BQ25792: Add support for the TI BQ25792 charger manager
 
 - Improvements & Fixes
   - Core: Unify the user-visible company name to "Qualcomm" across various config
     options
   - ChromeOS EC: Delay `dev_set_drvdata()` until the probe process has successfully
     completed to avoid use-after-free issues
   - ChromeOS EC: Prevent adding `cros_ec_ucsi` as an MFD sub-device if it is already
     defined in Device Tree or ACPI
   - Cirrus Logic CS42L43: Add a sanity check for firmware size to prevent out-of-bounds
     memory access during firmware loading
   - Cirrus Logic CS5535: Associate the GPIO cell with a dedicated software node to
     support board files requesting GPIOs
   - Maxim MAX77620: Modernize poweroff handling by converting to the sys-off API
   - Qualcomm RPM: Add the missing QDSS clock resource for the MSM8960 SoC
   - Renesas RSMU: Fix page register setup for the 8A3400x family by correctly
     calculating the page address
   - Renesas RZ/MTU3: Make the reset line optional to support newer SoC variants (RZ/T2H,
     RZ/N2H)
   - Renesas RZ/MTU3: Modernize the driver by using device-managed APIs for reset control
     and device addition
   - Samsung Core: Set the coherent DMA mask to zero for the Samsung PMIC device to
     suppress unnecessary "DMA mask not set" messages
   - Silicon Motion SM501: Fix a reference leak on failed device registration by properly
     dropping the platform device reference
   - Texas Instruments TPS65219: Make poweroff handler registration conditional on the
     "system-power-controller" Device Tree property
   - Texas Instruments TPS6586x: Fix Device Tree node reference counting by manually
     bumping the refcount for sub-devices
   - Texas Instruments TPS65910: Add return value checking for the dummy I2C transfer
     used to work around silicon erratum SWCZ010
   - Texas Instruments TWL4030: Update board-specific checks to use Device Tree
     compatibles instead of legacy machine IDs
 
 - Cleanups & Refactoring
   - Core: Consistently define `pci_device_id` arrays using named initializers across
     various Intel and Silicon Motion drivers
   - Maintainers: Shift maintenance of Samsung PMIC drivers to André Draszik
   - Maxim MAX77759: Improve code style by reformatting the IRQ table and refining macro
     comments
   - MEN MENF21BMC / Texas Instruments TWL: Correctly treat `i2c_check_functionality()`
     as returning a boolean status
   - Rohm BD72720: Drop the non-existent BUCK11 ID to improve code clarity
   - Silicon Labs Si476x: Fix various spelling mistakes in driver comments
   - Spreadtrum SC27xx: Transition to `devm_mfd_add_devices()` and separate MFD cell
     tables for each PMIC model
   - Timberdale: Move GPIO pin definitions into the driver and transition to using a
     software node for the GPIO cell
   - Wolfson WM8994: Remove dead legacy-GPIO code and its associated `irq_gpio` member
 
 - Device Tree Binding Updates
   - Aspeed AST2x00: Document the AST2700 SCU0 and add support for its SoC0/SoC1 pin
     controllers
   - Hisilicon Hi655x: Convert the Hi655x PMIC binding from text format to YAML DT schema
   - Khadas MCU: Add a new compatible and fan-supply property for the Khadas VIM4 MCU
   - MediaTek MT6397: Add support for the MT6365 PMIC and document regulator supplies for
     the MT6359 variant
   - Qualcomm TCSR: Add compatibles for Nord and IPQ5210 TCSR blocks
   - Renesas RZ/G3L: Revert the addition of the `renesas,r9a08g046-lvds-cmn` compatible
     string due to documentation errors
   - Samsung S2MU005: Document the S2MU005 PMIC and its sub-devices (charger, MUIC,
     flash and RGB LEDs)
   - Spreadtrum SC2731: Include regulator bindings for the SC2730 variant
   - STMPE: Fix the schema by marking 'compatible' and '#pwm-cells' as required for the
     PWM subnode
   - Texas Instruments BQ257xx: Expand the BQ25703A binding to include the BQ25792
     variant
 
 - Removals
   - Motorola EZX PCAP: Remove the unused and non-functional driver for Motorola EZX
     phones
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmoylaAACgkQUa+KL4f8
 d2HKlw/+LNN6+pdOuvpFd/I+SnMyYnpFH/DMCHBDu7KnOWtn1AVsCAhKy7jz2cmz
 8NCtKvPaYcJWvsV+zYw+VPWilgUJ0lU3mRDJ4b8KIRjMv37JYA9xhFrz3pr/MS/Z
 z//gGHbWzzKsH9E8BEpbxHOx4kwqI1RiTBS2yV8OuooHpqfp8kg9E5lKW+roP4YQ
 VcWkHduywOOkT+PKUjKySFx8qJ7ySskx6RFEVH8Nywu6AmSuNiKOeGtDkKKIGGFe
 YL2L19m/In0p0z4aqwqJWpj5sZQ3CSOAMT82k25/ApR7+Aot8lsbWuANbySfr5l/
 Yv695XrN01qaXrEmCkk7cpKpzW18QFxVEnfdpCJrZcG1OkfwvfHCcGbZC8ihD/xN
 fGkaOP7f9Jx3uoQQX+j1dgU3GJyMPAABxPdrzU2o59mE6UFGUZobepFGWBqYSPCJ
 b7P530qhnt8qp0iXKDwpnzt1LhxiAIo0PnZJ2DFDRiZXzl/IOOK0ywgBENu1cebn
 gkL3xpA4TMASeHcE8dPCNdYeI6PqRjV0LO80HWG2vGk9nmolW8BnuvtGp4kHroxh
 Y37yg9BR67JbTrUfTwFU/U9utqkiY3cTZ8skElff/rsKdysKGBcGXdeCh4dTEQXo
 3XNGKb1RRUgiCixjPqQkf+iLWZalr+QY8Z40OmqcDncXQe8t3+o=
 =9Igx
 -----END PGP SIGNATURE-----

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

Pull MFD updates from Lee Jones:
 "New Support & Features:
   - Renesas RSMU: Add support for the IDT 8a34002 Clock Matrix
   - Samsung S2MU005: Add support for the Samsung S2MU005 PMIC which
     includes charger, MUIC, flash and RGB LED controllers
   - SpacemiT P1: Add a reboot cell for the SpacemiT P1 chip
   - Texas Instruments BQ25792: Add support for the TI BQ25792 charger
     manager

  Improvements & Fixes:
   - Core: Unify the user-visible company name to "Qualcomm" across
     various config options
   - ChromeOS EC:
       - Delay `dev_set_drvdata()` until the probe process has
         successfully completed to avoid use-after-free issues
       - Prevent adding `cros_ec_ucsi` as an MFD sub-device if it is
         already defined in Device Tree or ACPI
   - Cirrus Logic CS42L43: Add a sanity check for firmware size to
     prevent out-of-bounds memory access during firmware loading
   - Cirrus Logic CS5535: Associate the GPIO cell with a dedicated
     software node to support board files requesting GPIOs
   - Maxim MAX77620: Modernize poweroff handling by converting to the
     sys-off API
   - Qualcomm RPM: Add the missing QDSS clock resource for the MSM8960
     SoC
   - Renesas RSMU: Fix page register setup for the 8A3400x family by
     correctly calculating the page address
   - Renesas RZ/MTU3:
       - Make the reset line optional to support newer SoC variants
         (RZ/T2H, RZ/N2H)
       - Modernize the driver by using device-managed APIs for reset
         control and device addition
   - Samsung Core: Set the coherent DMA mask to zero for the Samsung
     PMIC device to suppress unnecessary "DMA mask not set" messages
   - Silicon Motion SM501: Fix a reference leak on failed device
     registration by properly dropping the platform device reference
   - Texas Instruments:
       - TPS65219: Make poweroff handler registration conditional on the
         "system-power-controller" Device Tree property
       - TPS6586x: Fix Device Tree node reference counting by manually
         bumping the refcount for sub-devices
       - TPS65910: Add return value checking for the dummy I2C transfer
         used to work around silicon erratum SWCZ010
       - TWL4030: Update board-specific checks to use Device Tree
         compatibles instead of legacy machine IDs

  Cleanups & Refactoring:
   - Core: Consistently define `pci_device_id` arrays using named
     initializers across various Intel and Silicon Motion drivers
   - Maintainers: Shift maintenance of Samsung PMIC drivers to André
     Draszik
   - Maxim MAX77759: Improve code style by reformatting the IRQ table
     and refining macro comments
   - MEN MENF21BMC / Texas Instruments TWL: Correctly treat
     `i2c_check_functionality()` as returning a boolean status
   - Rohm BD72720: Drop the non-existent BUCK11 ID to improve code
     clarity
   - Silicon Labs Si476x: Fix various spelling mistakes in driver
     comments
   - Spreadtrum SC27xx: Transition to `devm_mfd_add_devices()` and
     separate MFD cell tables for each PMIC model
   - Timberdale: Move GPIO pin definitions into the driver and
     transition to using a software node for the GPIO cell
   - Wolfson WM8994: Remove dead legacy-GPIO code and its associated
     `irq_gpio` member

  Device Tree Binding Updates:
   - Aspeed AST2x00: Document the AST2700 SCU0 and add support for its
     SoC0/SoC1 pin controllers
   - Hisilicon Hi655x: Convert the Hi655x PMIC binding from text format
     to YAML DT schema
   - Khadas MCU: Add a new compatible and fan-supply property for the
     Khadas VIM4 MCU
   - MediaTek MT6397: Add support for the MT6365 PMIC and document
     regulator supplies for the MT6359 variant
   - Qualcomm TCSR: Add compatibles for Nord and IPQ5210 TCSR blocks
   - Renesas RZ/G3L: Revert the addition of the
     `renesas,r9a08g046-lvds-cmn` compatible string due to documentation
     errors
   - Samsung S2MU005: Document the S2MU005 PMIC and its sub-devices
     (charger, MUIC, flash and RGB LEDs)
   - Spreadtrum SC2731: Include regulator bindings for the SC2730
     variant
   - STMPE: Fix the schema by marking 'compatible' and '#pwm-cells' as
     required for the PWM subnode
   - Texas Instruments BQ257xx: Expand the BQ25703A binding to include
     the BQ25792 variant

  Removals:
   - Motorola EZX PCAP: Remove the unused and non-functional driver for
     Motorola EZX phones"

* tag 'mfd-next-7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (47 commits)
  dt-bindings: mfd: syscon: Revert renesas,r9a08g046-lvds-cmn
  dt-bindings: mfd: st,stmpe: Add missing properties for PWM subnode
  mfd: rz-mtu3: Make reset optional
  mfd: rz-mtu3: Store &pdev->dev in local variable
  mfd: rz-mtu3: Use local variable for reset
  mfd: rz-mtu3: Use device-managed APIs
  dt-bindings: mfd: aspeed,ast2x00-scu: Support AST2700 SoC1 pinctrl
  mfd: tps6586x: Fix OF node refcount
  dt-bindings: mfd: sprd,sc2731: Include SC2730 regulator bindings
  mfd: twl4030-power: Update checks for specific boards to use the DT
  dt-bindings: mfd: qcom,tcsr: Document the IPQ5210 TCSR block
  mfd: qcom_rpm: Add msm8960 QDSS clock resource
  mfd: si476x-i2c: Fix spelling mistakes in comments
  mfd: max77620: Convert poweroff support to sys-off API
  mfd: dt-bindings: mt6397: Add regulator supplies
  dt-bindings: mfd: mediatek: mt6397: Add MT6365 PMIC support
  dt-bindings: mfd: mediatek: mt6397: Add rtc for MT6359
  mfd: cs42l43: Sanity check firmware size
  mfd: qcom: Unify user-visible "Qualcomm" name
  mfd: cros_ec: Delay dev_set_drvdata() until probe success
  ...
2026-06-18 14:26:29 -07:00
Linus Torvalds
70cb95c736 soc: drivers for 7.2
There are a few added drivers, but mostly the normal maintenance to drivers
 for firmware, memory controller and other soc specific hadware:
 
  - The NXP QuickEngine gets modern MSI support, which allows some cleanups to
    the GICv3 irqchip chip driver
 
  - A new SoC specific driver for the Renesas R-Car MFIS unit is added,
    encapsulating support for the on-chip mailbox and hwspinlock
    implementations that are not easily separated into individual
    drivers
 
  - The Qualcomm SoC drivers add support for additional SoC implementations,
    and flexiblity around power managedment for the serial-engine driver
    as well as probing the LLCC driver using custom hardware descriptions
    inside of the device itself.
 
  - Added support for the Samsung thermal management unit
 
  - A cleanup to the Tegra 'PMC' driver interfaces to remove legacy
    APIs and allow multiple PMC instances everywhere.
 
  - Updates to the TI SCI and KNAS drivers to improve suspend/resume
    support.
 
  - Minor driver changes for mediatek, xilinx, allwinner, aspeed, tegra,
    broadcom, amd, microchip and starfive specific drivers
 
  - Memory controller updates for Tegra and Renesas for additional SoC
    types and other improvements.
 
  - Firmware driver updates for Arm FF-A, SMCCC and SCMI interfaces,
    to update driver probing, object lifetimes and address minor bugs.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmow8HMACgkQmmx57+YA
 GNmV4A//WYorQo+qes020w70BAc67/CCVsYpDLDz0mWD5G/uQoQkmyqJTA/b2VnM
 iBzrxJ5lGRP7xkhfDVCfb3wsMNsJV9X4QRLGB13XkXA/vRMZxBd3xKV0K/CWUJYo
 0YJV/BeFDonhbIjTyeZ0ddUvkdOtqn7tua+YiVpRLL4lqV0JzwzQ1mrqKuJ1EFk0
 LWw/oLf+xhcY9X6lae0kranLcR6wauGVu9FLXu2nMtGnn1ErkUfywmd8C1mZ8yLk
 QCEjSNdvjXQKSAFhNhAcNPxEDFqvNqKQEXfa62i3m8rM8mX1/ZJUd49NCEQaOnXm
 ZbeZVHLATf8ut6WKvAwOdtcmvY2HAvBy9xyU7mdiYw3+3hDHQWU068bqYcEbfY6O
 04vhYjnvYnYCZNifH3MvsdMteILN5Eja+dNq7Li2LbnMqbSUHr4gJm0nQcbvsbs0
 x42GsuqtmPy1PL4/9hlwN/eDj+Bce4O2x1ZXl8VoChGRUD1JJXzr4NGDumBv03hA
 eqja4VdMWb9Z/w7y6nlXkx48DibpBJJCgotbYl6DSfJjfGX+jnYrHHcZg5BCIvUc
 X1Fy6236sWBQsj1crNcm2QZ2JWJE28HRYcDq3JGDDGvWkcrkB4c1H0N/rIkO4H5F
 nTW5LgJDTd/KEzq3WOKN+gcHoLjXWl0wKJpb4WQ7sdvcYUTdHx8=
 =27+M
 -----END PGP SIGNATURE-----

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

Pull SoC driver updates from Arnd Bergmann:
 "There are a few added drivers, but mostly the normal maintenance to
  drivers for firmware, memory controller and other soc specific
  hardware:

   - The NXP QuickEngine gets modern MSI support, which allows some
     cleanups to the GICv3 irqchip chip driver

   - A new SoC specific driver for the Renesas R-Car MFIS unit is added,
     encapsulating support for the on-chip mailbox and hwspinlock
     implementations that are not easily separated into individual
     drivers

   - The Qualcomm SoC drivers add support for additional SoC
     implementations, and flexibility around power management for the
     serial-engine driver as well as probing the LLCC driver using
     custom hardware descriptions inside of the device itself.

   - Added support for the Samsung thermal management unit

   - A cleanup to the Tegra 'PMC' driver interfaces to remove legacy
     APIs and allow multiple PMC instances everywhere.

   - Updates to the TI SCI and KNAS drivers to improve suspend/resume
     support.

   - Minor driver changes for mediatek, xilinx, allwinner, aspeed,
     tegra, broadcom, amd, microchip and starfive specific drivers

   - Memory controller updates for Tegra and Renesas for additional SoC
     types and other improvements.

   - Firmware driver updates for Arm FF-A, SMCCC and SCMI interfaces, to
     update driver probing, object lifetimes and address minor bugs"

* tag 'soc-drivers-7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (189 commits)
  Revert "firmware: zynqmp: Add dynamic CSU register discovery and sysfs interface"
  Revert "Documentation: ABI: add sysfs interface for ZynqMP CSU registers"
  memory: tegra234: drop dead NULL check in tegra234_mc_icc_aggregate()
  memory: tegra264: drop redundant tegra264_mc_icc_aggregate()
  memory: tegra186-emc: stop borrowing MC aggregate hook for EMC
  soc: aspeed: cleanup dead default for ASPEED_SOCINFO
  firmware: tegra: bpmp: Add support for multi-socket platforms
  firmware: tegra: bpmp: Propagate debugfs errors
  soc/tegra: pmc: Add Tegra238 support
  soc/tegra: pmc: Restrict power-off handler to Nexus 7
  soc/tegra: pmc: Populate powergate debugfs only when needed
  soc/tegra: pmc: Move legacy code behind CONFIG_ARM guard
  soc/tegra: pmc: Remove unused legacy functions
  soc/tegra: pmc: Create PMC context dynamically
  firmware: samsung: acpm: remove compile-testing stubs
  firmware: samsung: acpm: Add devm_acpm_get_by_phandle helper
  firmware: samsung: acpm: Add TMU protocol support
  firmware: samsung: acpm: Make acpm_ops const and access via pointer
  firmware: samsung: acpm: Drop redundant _ops suffix in acpm_ops members
  firmware: samsung: acpm: Annotate rx_data->cmd with __counted_by_ptr
  ...
2026-06-17 11:21:40 -07:00
Cosmin Tanislav
f6b692d1f4 mfd: rz-mtu3: Make reset optional
The Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs do not have a
reset line for the MTU3 block.

Prepare for them by making it optional.

Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Link: https://patch.msgid.link/20260527145606.136536-5-cosmin-gabriel.tanislav.xa@renesas.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17 11:33:08 +01:00
Cosmin Tanislav
a3bd9f3dd5 mfd: rz-mtu3: Store &pdev->dev in local variable
&pdev->dev is accessed multiple times during probe. Store it in a local
variable and use that to simplify the code.

Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Link: https://patch.msgid.link/20260527145606.136536-4-cosmin-gabriel.tanislav.xa@renesas.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17 11:33:05 +01:00
Cosmin Tanislav
4bf15cafe9 mfd: rz-mtu3: Use local variable for reset
Remove struct rz_mtu3_priv::rstc and use a local variable for it as it
is not needed outside of rz_mtu3_probe() anymore.

Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Link: https://patch.msgid.link/20260527145606.136536-3-cosmin-gabriel.tanislav.xa@renesas.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17 11:33:03 +01:00
Cosmin Tanislav
ed1a370da2 mfd: rz-mtu3: Use device-managed APIs
Replace devm_reset_control_get_exclusive() and the manual
reset_control_deassert()/reset_control_assert() with handling by
devm_reset_control_get_exclusive_deasserted().

Replace mfd_add_devices()/mfd_remove_devices() with
devm_mfd_add_devices().

Remove the custom cleanup action.

Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Link: https://patch.msgid.link/20260527145606.136536-2-cosmin-gabriel.tanislav.xa@renesas.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17 11:33:00 +01:00
Bartosz Golaszewski
3001ed2b4e mfd: tps6586x: Fix OF node refcount
Platform devices created with platform_device_alloc() call
platform_device_release() when the last reference to the device's
kobject is dropped. This function calls of_node_put() unconditionally.
This works fine for devices created with platform_device_register_full()
but users of the split approach (platform_device_alloc() +
platform_device_add()) must bump the reference of the of_node they
assign manually. Add the missing call to of_node_get().

Cc: stable@vger.kernel.org
Fixes: 62f6b08793 ("tps6586x: Add device tree support")
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260521-pdev-fwnode-ref-v1-1-88c324a1b8d2@oss.qualcomm.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17 11:32:56 +01:00
Ethan Nelson-Moore
7aa3d8aba5 mfd: twl4030-power: Update checks for specific boards to use the DT
The twl4030-power driver contains two checks for ARM machine IDs via
machine_is_*() macros. The two boards concerned now support only FDT
booting, which does not use machine IDs, and therefore the code should
be updated to check the DT compatible property instead.
The legacy board files for these machines were removed in
commit 1b383f44aa ("ARM: OMAP2+: Drop board file for 3430sdp") and
commit e92fc4f04a ("ARM: OMAP2+: Drop legacy board file for LDP").
The presence of these machine ID checks prevents the removal of machine
IDs no longer used by the kernel from arch/arm/tools/mach-types,
because the machine_is_*() macros are generated from mach-types. To
resolve this issue, use of_machine_is_compatible() instead.

Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Link: https://patch.msgid.link/20260517023723.92731-2-enelsonmoore@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17 11:32:51 +01:00
Antony Kurniawan Soemardi
6b6e7e965a mfd: qcom_rpm: Add msm8960 QDSS clock resource
The msm8960 RPM resource table is missing the QDSS clock entry (resource
ID 209) that is present in the android-msm-mako-3.4 downstream kernel.
Add it so that RPM clock initialization succeeds.

Tested-by: Rudraksha Gupta <guptarud@gmail.com>
Signed-off-by: Antony Kurniawan Soemardi <linux@smankusors.com>
Link: https://patch.msgid.link/20260514-msm8960-wifi-v2-3-7cbae45dab5e@smankusors.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17 11:32:46 +01:00
Md Shofiqul Islam
a44ec8fd38 mfd: si476x-i2c: Fix spelling mistakes in comments
Fix spelling mistake in comments:
 - succes -> success (4 times)

Signed-off-by: Md Shofiqul Islam <shofiqtest@gmail.com>
Link: https://patch.msgid.link/20260514181954.1442-1-shofiqtest@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17 11:32:44 +01:00
Diogo Ivo
f01e402beb mfd: max77620: Convert poweroff support to sys-off API
Convert max77620_pm_power_off() to the sys-off callback prototype and
register it with the sys-off API when the device tree marks the PMIC as
a system power controller. This also removes the global max77620_scratch
pointer by passing the chip instance through the callback data.

This modernizes the driver's poweroff handling and aligns it with
the kernel sys-off infrastructure.

Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
Link: https://patch.msgid.link/20260514-smaug-poweroff-v1-2-30f9a4688966@tecnico.ulisboa.pt
Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17 11:32:41 +01:00
Charles Keepax
b6ef1a74b3 mfd: cs42l43: Sanity check firmware size
Currently the code checks if a firmware was received, however it does
not verify that the firmware size is larger than the firmware header. As
the firmware pointer is dereferenced as a pointer to the header
structure this could lead to an out of bounds memory access. Add the
missing check.

Fixes: ace6d14481 ("mfd: cs42l43: Add support for cs42l43 core driver")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260508134804.1787461-1-ckeepax@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17 11:32:30 +01:00