summaryrefslogtreecommitdiff
path: root/drivers/mfd
AgeCommit message (Collapse)Author
7 hoursMerge tag 'mfd-next-7.4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "New Support & Features: - Cirrus Logic CS42L43: Add support for the CS42L44 variant - Khadas MCU: Add support for the VIM4 MCU variant along with per-variant fan duty-cycle levels and optional fan supply regulator support - Maxim MAX77705: Add support for the PASS2 hardware revision - MediaTek MT6397: Add AUXADC sub-device support for MT6397 - Motorola CPCAP: Support per-board sub-device compositions and add the Tegra20 Mot composition - ROHM BD73800: Add support for the BD73800 PMIC core, regulator, RTC, clock gate, and GPIO sub-devices - TI LM3533: Add VIN regulator supply support, configure initial backlight mapping mode from Device Tree, and implement the `backlight_scale` property - X-Powers AC200: Add support for the AC200 I2C mixed-signal companion IC Improvements & Fixes: - Cirrus Logic CS42L43: Synchronize SoundWire enumeration work in `remove()` before devres cleanup begins - Dialog DA903x: Manage IRQ work cancellation and sub-device removal via devres to prevent use-after-free during teardown - Dialog DA9150: Balance `enable_irq_wake()` with `disable_irq_wake()` during probe failure and driver removal - Intel LPSS: Add DMI quirks for Dell Latitude 5285 and 7275 to ignore ACPI resource conflicts on the I2C4 controller - Intel Quark I2C/GPIO: Manage the fixed-rate clock and its clkdev lookup with devres to fix a resource leak on unbind - Maxim MAX77705: Select `REGMAP_I2C` and `REGMAP_IRQ` in Kconfig to fix build errors - Qualcomm WCD934x: Initialize the parent DMA mask to suppress "DMA mask not set" warnings on child devices - Qualcomm WCD934x: Pass the valid device pointer to `dev_err_probe()` on IRQ lookup failure to avoid a NULL pointer dereference - Rockchip RK8xx: Register the poweroff handler in the atomic `SYS_OFF_MODE_POWER_OFF` phase so polling I2C transfers complete during shutdown - ST-Ericsson AB8500: Use `devm_mfd_add_devices()` to prevent leaking child devices on probe failure - TI BQ257xx: Mark self-modifying BQ25792 configuration registers as volatile - TI LM3533: Set `coherent_dma_mask` to zero to suppress "DMA mask not set" warnings - TI TPS65217: Check for errors during IRQ initialization and masking, and manage IRQ domain and wake teardown with devres - TI TWL: Unregister the auxiliary platform device via a devres action on probe failure and driver unbind Cleanups & Refactoring - Core: Convert drivers from deprecated `SIMPLE_DEV_PM_OPS()` to `DEFINE_SIMPLE_DEV_PM_OPS()` and `pm_sleep_ptr()` - Core: Fix spelling mistakes in comments across various MFD drivers and headers - Maintainers: Add ROHM BD73800 PMIC files under the ROHM PMIC entry - Maintainers: Specify the `for-mfd-next` branch for the MFD and Syscon git trees - Dialog DA9062: Use `DEFINE_RES_IRQ_NAMED()` for IRQ resource definitions - Intel LPSS: Simplify DebugFS handling by dropping redundant error checks and intermediate dentry variables, using octal permissions, and switching to `debugfs_remove()` - Khadas MCU: Convert MFD cell arrays to `const` and use `MFD_CELL_NAME()` - ST-Ericsson AB8500: Fix a spelling typo in a comment - TI LM3533: Convert from platform data to Device Tree bindings and pass only regmap and light sensor presence to child devices - TI LM3533: Remove driver-specific regmap wrappers, redundant pdata helpers, and unnecessary `extern` qualifiers, and use `dev_groups` for sysfs attributes - Wolfson WM831x: Fix a spelling typo in a comment Device Tree Binding Updates - HiSilicon Hi6421 SPMI: Fix the compatible string to match `hisilicon,hi6421-spmi` - MediaTek MT6357: Allow an `adc` child node - MediaTek MT6360: Allow two-cell interrupt specifiers with trigger flags - MediaTek MT6397: Document the `#sound-dai-cells` property - MediaTek MT6397: Document the battery-backed NVMEM layout under the RTC child node - MediaTek MT6397: Document the MT6323 PMIC EFUSE child node - Motorola CPCAP: Convert MFD and power button bindings to DT schema and document the Mapphone and Mot compositions - Qualcomm SPMI PMIC: Document the PM4125 audio codec compatible - Qualcomm SPMI PMIC: Document the PMAU0102 PMIC compatible - Qualcomm TCSR: Document the MSM8952 TCSR compatible - Rockchip RK805: Fold the pin controller binding into the RK805 PMIC DT schema - ROHM BD73800: Document the BD73800 PMIC and its regulators - ROHM PMIC: Factor out common pin properties into `rohm,pmic-pins.yaml` and reference them across BD71815, BD71828, and BD72720 bindings - ST-Ericsson AB8500: Document AB8500 and AB8505 buck converter regulators - ST-Ericsson AB8500: Document codec audio graph ports, sound DAI cells, and analog microphone wiring properties - ST-Ericsson DB8500 PRCMU: Deprecate the `db8500-prcmu-regulators` child node and make it optional - Syscon: Document the Ambarella CV75 secure scratchpad compatible - TI BQ25703A: Add the BQ25798 compatible with fallback to BQ25792 - TI Keystone: Convert Device State Control bindings to DT schema - TI LM3533: Document the LM3533 LED controller, backlight, and indicator LED bindings - TI LP3943: Convert MFD and PWM bindings to DT schema - TI TPS61050: Convert bindings to DT schema - TI TPS65086: Make the `regulators` child node optional - TI TPS65910: Document `wakeup-source` and GPIO hog child nodes - TI TWL6040: Convert bindings to DT schema and align property names with the driver - X-Powers AC200: Document the AC200 mixed-signal companion IC" * tag 'mfd-next-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (74 commits) dt-bindings: mfd: db8500-prcmu: Deprecate EPOD regulators dt-bindings: mfd: syscon: Add Ambarella CV75 secure scratchpad dt-bindings: mfd: rockchip,rk805: Convert pinctrl to DT schema mfd: intel-lpss: Add Dell Latitude 7275 to the resource conflict quirk mfd: intel-lpss: Add resource conflict quirk for Dell Latitude 5285 mfd: tps65217: Use devres for IRQ domain and wake teardown mfd: tps65217: Check return value when masking interrupt sources mfd: tps65217: Fix NULL pointer dereference on IRQ init failure dt-bindings: mfd: qcom,spmi-pmic: Add compatibles for pm4125-codec mfd: bq257xx: Mark self-modifying BQ25792 registers volatile dt-bindings: mfd: mediatek: mt6397: describe the RTC's nvmem layout mfd: mt6397-core: Add mt6397 AUXADC support mfd: max77705: Mark PASS2 revision as supported mfd: ab8500: Fix child device leaks on probe failure dt-bindings: mfd: Add MT6397 sound DAI cells dt-bindings: mfd: mediatek: mt6397: Add mt6323 PMIC EFUSE dt-bindings: mfd: hisilicon: Fix Hi6421 SPMI compatible dt-bindings: mfd: ti,bq25703a: Expand to include BQ25798 dt-bindings: mfd: Allow MT6360 interrupt flags dt-bindings: mfd: mediatek: Allow MT6357 ADC ...
4 daysMerge tag 'gpio-updates-for-v7.4-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio updates from Bartosz Golaszewski: "Nothing stands out as particularly interesting, it's been a calm cycle. We have three new drivers, support for more models and lots of updates across many modules (details are in the signed tag as usual). There are also some minor changes and additions to the in-kernel GPIO API. GPIO core: - provide a new controller API: gpiochip_generic_get_config() - return -EOPNOTSUPP instead of -ENODEV to user-space if it requests hardware timestamping on systems where it's unavailable (no user-space regressions reported) New drivers: - add a driver for ROHM BD73800 PMIC GPIO controller - add a driver for Axiado AX3005 SGPIO controller - add a driver for Analog Devices AD7768 GPIO controller New hardware support: - extend gpio-rcar with support for R-Car X5H (R8A78000) - extend gpio-tegra186 with support for Tegra 268 Driver changes: - refactor and improve gpio-rtd1625: switch to modern or better fitting interfaces and improve coding style - improve error handling of return values of platform_get_irq_optional() in several drivers - normalize the return value of the gpio_chip::get() callback in gpio-siox in order to not propagate invalid values up to the GPIO core - implement gpio_chip::get_direction() for gpio-pcf857x - use managed variants of notifier registration functions in several drivers - remove legacy gpio_set_value_cansleep() as it has no more users - add pinctrl support to gpio-realtek-otto - add runtime PM support to the gpio-regmap helper module - add more ACPI GPIO quirks for various hardware - stop needlessly reading gpio_chip::base in gpio-pxa - add support for tracking of direction of generic GPIO chips with no direction registers via pinctrl backend to gpio-mmio (use the new core API: gpiochip_generic_get_config()) - use the "safe" variants of debugfs_create_file() in gpio-sloppy-analyzer - use device name as GPIO chip label in gpio-omap - refactor bit ops in gpio-dln2 - prepare gpio-it87 for upcoming kmalloc_obj() conversion Devicetree bindings: - document new model in gpio-pca95xx - allow the gpio-hogs property in gpio-zynq and fsl,qoriq-gpio - allow the gpio-ranges property in gpio-realtek-otto Misc fixes: - add missing MODULE_ALIAS() to gpio-crystalcove - fix a comment typo in example GPIO tools - fix unbalanced brackets in documentation - add names to regmaps in gpio-mvebu to avoid collisions in debugfs output - fix GPIO lookup using relative paths in GPIO ACPI" * tag 'gpio-updates-for-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (63 commits) gpiolib: acpi: Fix GPIO lookup using relative path gpio: legacy: Kill gpio_set_value_cansleep() dt-bindings: gpio: pca95xx: add onnn,pca9655 with nxp,pca9555 fallback gpiolib: acpi: Ignore GPIO 11 interrupt on Acer Nitro V 16S AI gpio: pxa: stop reading gpio_chip::base in direction callbacks gpio: axiado: add AX3005 SGPIO controller support dt-bindings: gpio: add Axiado AX3005 SGPIO controller gpiolib: acpi: Add quirk for Lenovo IdeaPad Slim 3 15ABR8 MAINTAINERS: Add ROHM BD73800 PMIC files gpio: bd73800: Support ROHM BD73800 PMIC GPIOs clk: bd718x7: Support ROHM BD73800 regulator: bd71828: Support ROHM BD73800 rtc: bd70528: Support RTC on ROHM BD73800 mfd: Support for ROHM BD73800 PMIC core dt-bindings: mfd: ROHM BD73800 PMIC dt-bindings: regulator: ROHM BD73800 regulators dt-bindings: rohm,bd*: Ref common ROHM bindings dt-bindings: mfd: Common ROHM PMIC properties gpio: siox: normalize return value of gpio_get() gpio: dln2: use assign_bit() where applicable ...
11 daysmfd: intel-lpss: Add Dell Latitude 7275 to the resource conflict quirkD. Manresa
The Dell Latitude 7275 2-in-1 has the same BIOS bug as the Latitude 5285: the ACPI GEXP device declares an OperationRegion (BAR0) on the GNVS variable SB04 and the I2C4 controller (INT3446) builds its _CRS from that same variable, so intel_lpss_acpi fails to bind the controller with -EBUSY and the front camera sensor (OV5670, INT3479) is never registered unless acpi_enforce_resources=lax is passed. Add the machine to the DMI table so QUIRK_IGNORE_RESOURCE_CONFLICTS is applied to INT3446 on it as well. Assisted-by: LLM Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com> Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: D. Manresa <dmanresa@gmail.com> Signed-off-by: Thierry Chatard <tchatard@gmail.com> Link: https://patch.msgid.link/20261002163350.1248431-3-tchatard@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
11 daysmfd: intel-lpss: Add resource conflict quirk for Dell Latitude 5285Thierry Chatard
The Dell Latitude 5285 2-in-1 has a BIOS bug where the ACPI GEXP device and the I2C4 controller (INT3446) both claim the same MMIO region via the shared SB04 variable. This causes intel_lpss_acpi to fail binding to I2C4 with -EBUSY, preventing the front camera (OV5670) sensor from being registered. Match the affected machine by DMI and the affected device by ACPI ID, carrying QUIRK_IGNORE_RESOURCE_CONFLICTS in the ACPI match data and applying it to the per-device info in probe. This follows the quirk organisation used by the PCI counterpart. Assisted-by: LLM Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Thierry Chatard <tchatard@gmail.com> Link: https://patch.msgid.link/20261002163350.1248431-2-tchatard@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
11 daysmfd: tps65217: Use devres for IRQ domain and wake teardownRadiy Zhambakiev
Removing the parent device used to tear the IRQ domain down in tps65217_remove() before the MFD children are unbound: the i2c core only releases the parent's devres after the remove callback returns, whereas devm_mfd_add_devices() registered its own devres action which unbinds the children. Children that requested interrupts from the domain (e.g. tps65217-charger) therefore call free_irq() on virtual IRQs whose descriptors have already been disposed. With CONFIG_SPARSE_IRQ free_irq() then returns early without stopping the threaded handler, leaking the irqaction, the IRQ kthread and a module reference. Register the domain teardown as a devres action right after the domain is created instead. Devres actions are released in reverse order of registration, so the MFD children release their IRQs first, then the parent interrupt is freed and its thread stopped, and only then is the domain torn down. The same ordering covers probe failure, which no longer needs manual cleanup, and the remove callback can be dropped entirely. Balance the enable_irq_wake() in tps65217_irq_init() by registering disable_irq_wake() as a devres action as well. Only do so when enabling actually succeeded, since the parent chip may not support setting wake-up. Fixes: 6556bdacf646fcaa ("mfd: tps65217: Add support for IRQs") Cc: stable@vger.kernel.org Signed-off-by: Radiy Zhambakiev <r.zhambakiev@prosoftsystems.ru> Link: https://patch.msgid.link/20261002113624.178588-4-r.zhambakiev@prosoftsystems.ru Signed-off-by: Lee Jones <lee@kernel.org>
11 daysmfd: tps65217: Check return value when masking interrupt sourcesRadiy Zhambakiev
tps65217_irq_init() ignores the error returned by tps65217_set_bits() when masking all interrupt sources. A failed register write leaves the driver's software mask out of sync with the hardware and may result in spurious interrupts. Check the return value and propagate the error to the caller. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 6556bdacf646fcaa ("mfd: tps65217: Add support for IRQs") Cc: stable@vger.kernel.org Signed-off-by: Radiy Zhambakiev <r.zhambakiev@prosoftsystems.ru> Link: https://patch.msgid.link/20261002113624.178588-3-r.zhambakiev@prosoftsystems.ru Signed-off-by: Lee Jones <lee@kernel.org>
11 daysmfd: tps65217: Fix NULL pointer dereference on IRQ init failureRadiy Zhambakiev
tps65217_probe() ignores the return value of tps65217_irq_init(), so when the irq domain creation fails the probe still completes and the driver ends up bound with a NULL tps->irq_domain. Unloading the module then makes tps65217_remove() call irq_domain_remove() on the NULL pointer and oops the kernel. On top of that, irq_find_mapping() may fall back to the default irq domain and dispose of mappings that belong to other interrupt controllers. Check the return value and abort the probe on failure so the error is reported and no inconsistent state is left for removal. Fixes: 6556bdacf646fcaa ("mfd: tps65217: Add support for IRQs") Cc: stable@vger.kernel.org Signed-off-by: Radiy Zhambakiev <r.zhambakiev@prosoftsystems.ru> Reviewed-by: Andreas Kemnade <andreas@kemnade.info> Link: https://patch.msgid.link/20261002113624.178588-2-r.zhambakiev@prosoftsystems.ru Signed-off-by: Lee Jones <lee@kernel.org>
11 daysmfd: bq257xx: Mark self-modifying BQ25792 registers volatileAlexey Charkov
Some BQ25792 configuration registers change without being written: input source detection sets VINDPM and IINDPM at plug-in, plug-in also clears EN_HIZ, the FORCE_* bits clear once their operation starts or completes, EN_ACDRV1/2 follow input path changes, and ADC_EN clears after a one-shot conversion. Reading them from the cache returns stale values. Mark these registers volatile, keeping the cache for the rest. Cc: stable@vger.kernel.org Fixes: 9adbe53e32cd ("mfd: bq257xx: Add BQ25792 support") Signed-off-by: Alexey Charkov <alchark@flipper.net> Link: https://patch.msgid.link/20261001-bq25792-volatile-v1-1-cb3d4ec8a414@flipper.net Signed-off-by: Lee Jones <lee@kernel.org>
12 daysmfd: mt6397-core: Add mt6397 AUXADC supportRyan Brue
The mt6397 PMIC includes an AUXADC. Register the AUXADC in the mt6397 devices array to allow the corresponding driver to probe using compatible string. Assisted-by: LLM Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Ryan Brue <ryanbrue.dev@gmail.com> Link: https://patch.msgid.link/20260928-rbrue-suez-upstreaming-mt6397-auxadc-v4-3-23533a0d30e3@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
12 daysmfd: max77705: Mark PASS2 revision as supportedDenys Romaniuk
The existing driver takes a safe approach and only probes on tested MAX77705 revisions. The only tested revision at the time was PASS3. PASS2 chips are present in the Samsung Galaxy S10/S10+/S10e devices. Testing on the S10 and S10+ shows the driver operates correctly on PASS2: interrupts are registered and fire, bind and unbind release the I2C device cleanly, and the charger and fuel gauge report plausible values, charging the battery to the same voltage as the vendor kernel, haptic feedback works. Link: https://lore.kernel.org/all/20251023131732.GN475031@google.com/ Signed-off-by: Denys Romaniuk <chiffathefoxx@gmail.com> Link: https://patch.msgid.link/20260928-max77705-pass2-supported-v2-1-c04f3932c182@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
12 daysmfd: ab8500: Fix child device leaks on probe failureGuangshuo Li
ab8500_probe() registers MFD child devices before completing the remaining device initialization. If a later MFD registration or sysfs group creation fails, previously registered child devices are not removed. Use devm_mfd_add_devices() so registered MFD child devices are removed when probe fails. The issue was identified by a static analysis tool I developed and confirmed by manual review. Fixes: cca69b67b3ba ("mfd: Export ab8500 chip id to sysfs") Fixes: 9c717cf3fa16 ("mfd: ab8500-core: Add device for new RTC version for AB8540 cut2") Cc: stable@vger.kernel.org Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com> Link: https://patch.msgid.link/20260924144355.1604369-1-lgs201920130244@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-29mfd: ac200: Add X-Powers AC200 supportJames Hilliard
The X-Powers AC200 is a mixed-signal companion IC with a paged register map accessed over I2C. Enable and rate-lock the shared input clock, retain the vendor resume path's 40 ms wait before creating the regmap and accessing registers, and deassert the common reset. No minimum delay is documented. Set only the deassert bit instead of forcing a reset cycle, avoiding a chip-wide reset of unrelated function registers. Leave the common reset deasserted during driver removal and system shutdown; function drivers own their block resets. Supplier unbind still tears down linked consumers and releases the provider's clock references. Cache only the common page selector. Individual functions can reset independently and invalidate their other registers, so leave all functional registers volatile. Register the audio codec and TV encoder using static MFD cells and automatically assigned platform device IDs. Their firmware properties belong to the parent node. Map their supply lookups to the parent with MFD supply aliases, without assigning separate OF nodes to the cells. When INTB is connected, pass its physical IRQ to the TV encoder cell. Select a cell array without IRQ resources when INTB is absent. No regmap IRQ controller or private IRQ domain is needed. Configure the level-triggered INTB output, defaulting to level-low when the upstream IRQ has no trigger type. Mask all sources before enabling INTB. Function drivers request shared threaded IRQs before enabling their own source, check and clear their own status, and mask their source before freeing the IRQ. Disable INTB after removing the children on failure or removal, while the regmap and clock are still available. The Ethernet PHY is enumerated on its MDIO bus rather than as an MFD child. It follows the x-powers,ac200 phandle and uses this regmap for ancillary package-control access. Co-developed-by: Jernej Skrabec <jernej.skrabec@gmail.com> Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com> Signed-off-by: James Hilliard <james.hilliard1@gmail.com> Link: https://patch.msgid.link/20260922-submit-ac200-mfd-v13-2-8832afd2481c@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-24mfd: Fix a bunch of typos in commentsHemanth Selam
Fix misspellings in comments across the MFD drivers and headers, found with scripts/checkpatch.pl using the list in scripts/spelling.txt. Only touches comments, no code changes. Signed-off-by: Hemanth Selam <hemanth.selam@gmail.com> Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com> Reviewed-by: André Draszik <andre.draszik@linaro.org> Link: https://patch.msgid.link/20260924103046.1709181-1-hemanth.selam@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-24mfd: da9150: Balance IRQ wake on teardownMyeonghun Pak
DA9150 enables IRQ wake after registering its regmap IRQ chip, but does not disable it on a later probe failure or driver removal. This leaves the wake depth elevated after the handler is removed, and repeated bind attempts can accumulate the imbalance. Remember whether enabling IRQ wake succeeded and balance only a successful call. Remove MFD children first so their nested IRQ users are gone, then disable wake before removing the regmap IRQ chip. Preserve the existing non-fatal behavior when IRQ wake cannot be enabled. This issue was identified during our ongoing static-analysis research while reviewing kernel code. Fixes: b8fce55c09d3 ("mfd: Add support for DA9150 combined charger & fuel-gauge device") Assisted-by: LLM Co-developed-by: Ijae Kim <ae878000@gmail.com> Signed-off-by: Ijae Kim <ae878000@gmail.com> Signed-off-by: Myeonghun Pak <mhun512@gmail.com> Link: https://patch.msgid.link/20260923021936.957065-1-mhun512@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-24mfd: motorola-cpcap: Add support for Mot CPCAP compositionSvyatoslav Ryhel
Add a MFD subdevice composition used in Tegra20 based Mot board (Motorola Atrix 4G and Droid X2). Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Link: https://patch.msgid.link/20260721095654.429346-7-clamor95@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-24mfd: motorola-cpcap: Diverge configuration per-boardSvyatoslav Ryhel
MFD have rigid subdevice structure which does not allow flexible dynamic subdevice linking. Address this by diverging CPCAP subdevice composition to take into account board specific configuration. Create a common and default subdevice composition, rename edit existing subdevice composition into cpcap_mapphone_devices since it targets mainly Mapphone board. Removed st,6556002 as it is no longer applicable to all cases and duplicates motorola,cpcap, which is used as the default composition. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Link: https://patch.msgid.link/20260721095654.429346-6-clamor95@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-24mfd: intel-lpss: Switch to debugfs_remove()Maria Lisina
debugfs_remove_recursive() is deprecated and has become an alias to debugfs_remove(), replace it with the direct debugfs_remove() call instead. Signed-off-by: Maria Lisina <sekoohaka.sarisan@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20260916-intel-lpss-debugfs-v7-4-eb51d41f55e0@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-24mfd: intel-lpss: Remove extra DebugFS dentryMaria Lisina
There is no point to keep the variable dir just to assing lpss->debugfs to it later, just use lpss->debugfs directly. Signed-off-by: Maria Lisina <sekoohaka.sarisan@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20260916-intel-lpss-debugfs-v7-3-eb51d41f55e0@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-24mfd: intel-lpss: Use plain octal values for file permissionsMaria Lisina
S_IRUGO macro is obsoleted and not recommended to use, therefore replace it with plain octal values. Signed-off-by: Maria Lisina <sekoohaka.sarisan@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20260916-intel-lpss-debugfs-v7-2-eb51d41f55e0@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-24mfd: intel-lpss: Remove redundant DebugFS error checkMaria Lisina
The DebugFS API is designed to handle errors gracefully. Any explicit checking on return values is considered an anti-pattern. This patch removes unnecessary error checking and converts intel_lpss_debugfs_add() into a void function. Signed-off-by: Maria Lisina <sekoohaka.sarisan@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20260916-intel-lpss-debugfs-v7-1-eb51d41f55e0@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-24mfd: twl-core: Unregister the auxiliary platform device on unbindMyeonghun Pak
twl_probe() registers a standalone platform device named "twl", but keeps its pointer only in a local variable. Probe errors unregister the device, while successful probe leaves no way for twl_remove() to release it. The platform device therefore remains registered after the I2C driver unbinds. Register a managed action on the I2C device immediately after adding the platform device. This unregisters it on probe failure and driver unbind, and also handles failure to register the action itself. Remove the manual error-path unregister to avoid releasing the device twice. This issue was identified during our ongoing static-analysis research while reviewing kernel code. Fixes: defa6be1c821 ("mfd: Fix compile for twl-core.c by removing cpu_is_omap usage") Cc: stable@vger.kernel.org Assisted-by: OpenAI:GPT-5.6 Co-developed-by: Ijae Kim <ae878000@gmail.com> Signed-off-by: Ijae Kim <ae878000@gmail.com> Signed-off-by: Myeonghun Pak <mhun512@gmail.com> Link: https://patch.msgid.link/20260913205013.54777-1-mhun512@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-24mfd: intel_quark_i2c_gpio: Manage the fixed-rate clockMyeonghun Pak
The I2C clock is allocated by clk_register_fixed_rate(), but cleanup uses clk_unregister(), leaving the fixed-rate provider allocation behind. Manage the provider with devm_clk_hw_register_fixed_rate() and its lookup with devm_clk_hw_register_clkdev(). Managed resources release the lookup before the provider, after the MFD children have been removed. Remove the manual clock cleanup and the private structure that only stored the clock and lookup pointers. This issue was identified during our ongoing static-analysis research while reviewing kernel code. Fixes: 60ae5b9f5cdd ("mfd: intel_quark_i2c_gpio: Add Intel Quark X1000 I2C-GPIO MFD Driver") Assisted-by: OpenAI:GPT-5.6 Co-developed-by: Ijae Kim <ae878000@gmail.com> Signed-off-by: Ijae Kim <ae878000@gmail.com> Signed-off-by: Myeonghun Pak <mhun512@gmail.com> Link: https://patch.msgid.link/20260912191223.46136-1-mhun512@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-24mfd: rk8xx: Register poweroff handler in atomic phaseEric Anderson
This fixes a regression from v6.1 to v6.6 where Google Veyron devices (rk3288) would not power off after being shut down. Prior to commit 4fec8a5a85c4 ("mfd: rk808: Convert to device managed resources"), pm_power_off was called by legacy_pm_power_off() which itself was registered using SYS_OFF_MODE_POWER_OFF. But in that commit the registration of rk808_power_off() moved to SYS_OFF_MODE_POWER_OFF_PREPARE. At the very least, the code should be consistent between SYS_OFF_MODE_POWER_OFF and SYS_OFF_MODE_RESTART; both should be *_PREPARE or both not. It appears interrupt delivery is already shut down (but not disabled) when SYS_OFF_MODE_POWER_OFF_PREPARE is triggered, so regmap_update_bits() in rk808_power_off() does not complete successfully. Registering rk808_power_off() as SYS_OFF_MODE_POWER_OFF runs with interrupts disabled which causes polling I/O to be used instead, and the device to power down. Fixes: 4fec8a5a85c4 ("mfd: rk808: Convert to device managed resources") Signed-off-by: Eric Anderson <ejona86@gmail.com> Assisted-by: Gemini:gemini-3.5-flash Link: https://patch.msgid.link/20260908-veyron-shutdown-v1-1-066ecb80f5f2@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-24mfd: cs42l43: Move cancel_work_sync() into removeCharles Keepax
The cs42l43 driver kicks off a work item waiting for the device to appear on the SoundWire bus, once the device appears the MFD children are added and the clean up is then done through devres. As the work is synchronised in from the devres clean up this could lead to new devres items being added after the clean up has started, if the driver is removed before the work has fully completed. The work should be synchronised before any devres clean up is started. Fixes: 0f35dc4bd50d ("mfd: cs42l43: Use devres for remove as well") Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20260904131243.755201-1-ckeepax@opensource.cirrus.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-24mfd: ab8500: Fix typo "interupts" in commentHemanth Selam
Correct "interupts" to "interrupts", reported by scripts/checkpatch.pl using the misspelling list in scripts/spelling.txt. Only touches a comment, no code changes. Since v1 the subject carries the driver name and a capitalised description, to match the MFD subsystem convention. Assisted-by: Cursor:claude-opus-5 Reviewed-by: Linus Walleij <linusw@kernel.org> Signed-off-by: Hemanth Selam <hemanth.selam@gmail.com> Link: https://patch.msgid.link/20260907045526.18873-1-hemanth.selam@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-24mfd: wcd934x: Fix NULL pointer dereference on IRQ probe deferralDavid Heidelberg
ddata->dev is only assigned at the end of wcd934x_slim_probe(), but the of_irq_get() error path has passed it to the error print since the driver was added, while it is still NULL. This used to be harmless with dev_err(), which copes with a NULL device and was skipped on -EPROBE_DEFER. Since the switch to dev_err_probe(), a deferred IRQ reaches device_set_deferred_probe_reason() -> dev_driver_string(), which dereferences the NULL pointer and crashes during probe. Use dev, which is already valid at this point. Cc: stable@vger.kernel.org Fixes: 0f1b1b899521 ("mfd: wcd934x: Simplify with dev_err_probe()") Reported-by: Sashiko <sashiko-bot@kernel.org> Link: https://lore.kernel.org/mfd/20260903145651.AC1311F00ACA@smtp.kernel.org/ Signed-off-by: David Heidelberg <david@ixit.cz> Link: https://patch.msgid.link/20260903-wcd-dma-v3-1-d3920c6563c4@ixit.cz Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-24mfd: wcd934x: set DMA mask on parent to silence "DMA mask not set"David Heidelberg
The wcd934x MFD parent (a slim_device) never initializes its dma_mask/coherent_dma_mask. When the DT-aware children pass through of_dma_configure() this triggers the "DMA mask not set" warning for each child. Cc: stable@vger.kernel.org Fixes: f959dcd6ddfd ("dma-direct: Fix potential NULL pointer dereference") Assisted-by: tencent:hy3 Signed-off-by: David Heidelberg <david@ixit.cz> Link: https://patch.msgid.link/20260903-wcd-dma-v2-1-189cff560a28@ixit.cz Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-24mfd: cs42l43: Add support for new cs42l44 variantCharles Keepax
The cs42l44 is a cost optimised variant of cs42l43b. Add basic support for this new device. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20260901151417.2546618-1-ckeepax@opensource.cirrus.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-24mfd: Convert to DEFINE_SIMPLE_DEV_PM_OPS()Triet Hoang
Convert the deprecated SIMPLE_DEV_PM_OPS() to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr(). This allows us to drop the __maybe_unused annotations from PM callbacks. This is a straightforward cleanup with no functional change intended. Signed-off-by: Triet Hoang <triet.hoang.dev@gmail.com> Link: https://patch.msgid.link/20260829050228.42638-1-triet.hoang.dev@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-24mfd: wm831x: Fix typo "convertor" in commentHemanth Selam
Correct "convertor" to "converter", reported by scripts/checkpatch.pl using the misspelling list in scripts/spelling.txt. Only touches a comment, no code changes. Since v1 the subject carries the driver name and a capitalised description, to match the MFD subsystem convention. Assisted-by: Cursor:claude-opus-5 Signed-off-by: Hemanth Selam <hemanth.selam@gmail.com> Link: https://patch.msgid.link/20260907045331.16932-4-hemanth.selam@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-24mfd: Fix MAX77705 dependency on regmapDavid Heidelberg
The max77705 uses devm_regmap_add_irq_chip(), so add REGMAP_IRQ and REGMAP_I2C to what the core driver selects in order to provide these APIs. This fixes a build error: drivers/mfd/max77705.o: in function `max77705_i2c_probe': max77705.c:(.text+0x250): undefined reference to `devm_regmap_add_irq_chip' Cc: stable@vger.kernel.org Fixes: c8d50f029748 ("mfd: Add new driver for MAX77705 PMIC") Signed-off-by: David Heidelberg <david@ixit.cz> Link: https://patch.msgid.link/20260827-deps-reg-max77705-v1-1-c83a74d3d428@ixit.cz Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-24mfd: da9062: Use DEFINE_RES_IRQ_NAMED()Hiroki Nakajima
Use the dedicated DEFINE_RES_IRQ_NAMED() helper for the DA9062 IRQ resources instead of open-coding it with DEFINE_RES_NAMED(). This makes the intended resource type explicit and keeps the definitions consistent with the DA9061 resources. This is a mechanical cleanup with no functional change. With an x86_64 allmodconfig and W=1, drivers/mfd/da9062-core.o builds successfully and is byte-identical before and after this change. Assisted-by: Codex:gpt-5 coccinelle Signed-off-by: Hiroki Nakajima <3na7nanana@gmail.com> Link: https://patch.msgid.link/20260823174248.833535-1-3na7nanana@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-24mfd: da903x: Cancel IRQ work during teardownHongyan Xu
The IRQ handler disables the IRQ and schedules irq_work. Releasing the IRQ does not drain that work, which can continue to use the devm-allocated chip and notifier state. Manage both IRQ-work cancellation and subdevice removal with devres. Register the subdevice-removal action before requesting the IRQ, then add the IRQ-work action after the request. This avoids leaving a live IRQ without work cancellation if action registration fails. Devres cleanup then disables the IRQ and drains the work before releasing the IRQ and removing child devices. Register both actions before creating the children so partial probe failures use the same ordering. This issue was found by the author's in-house static analysis tool. The patch was reviewed by the author against the latest mainline tree. Fixes: 26b8f5e1e2d1 ("mfd: add base support for Dialog DA9030/DA9034 PMICs") Cc: stable@vger.kernel.org Suggested-by: Lee Jones <lee@kernel.org> Assisted-by: Codex:GPT-5 Signed-off-by: Hongyan Xu <getshell@seu.edu.cn> Link: https://patch.msgid.link/20260814153019.1114-1-getshell@seu.edu.cn Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-24Merge branches 'ib-mfd-thermal-7.4', 'ib-mfd-clk-gpio-regulator-rtc-7.4' and ↵Lee Jones
'ib-mfd-backlight-iio-leds-7.4' into ibs-for-mfd-merged
2026-09-23mfd: khadas-mcu: Add support for VIM4 MCU variantRonald Claveau
Refactor probe() to use per-variant values instead of hardcoded globals. Add dedicated regmap configuration for the VIM4 MCU, with its own volatile/writeable registers. Add a new compatible string "khadas,vim4-mcu". Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr> Link: https://patch.msgid.link/20260917-add-mcu-fan-khadas-vim4-v12-3-497cd543a148@aliel.fr Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-23mfd: khadas-mcu: Use MFD_CELL_* macros for cell declarationsRonald Claveau
Convert khadas_mcu_fan_cells[] and khadas_mcu_cells[] to use the MFD_CELL_NAME() helper macro instead of open-coding the struct mfd_cell initialisers. While at it, make both arrays const since they are never modified after initialisation. This is a pure cleanup with no functional change, done in preparation for a subsequent patch which will need to attach platform_data to the fan cell. Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patch.msgid.link/20260917-add-mcu-fan-khadas-vim4-v12-2-497cd543a148@aliel.fr Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-23mfd: Support for ROHM BD73800 PMIC coreMatti Vaittinen
The BD73800 integrates regulators, ADC (intended for accumulating current / voltage / power values), a real-time clock (RTC), clock gate and GPIOs. Add core support for ROHM BD73800 Power Management IC. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Link: https://patch.msgid.link/3e3a25abe337e3f68cde585674019dca439ac897.1789538455.git.mazziesaccount@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-10mfd: lm3533: Set DMA maskSvyatoslav Ryhel
Missing coherent_dma_mask assigning triggers the following warning in dmesg: [ 3.287872] platform lm3533-backlight.0: DMA mask not set Since this warning might be elevated to an error in the future, set coherent_dma_mask to zero because both the core and cells do not utilize DMA. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Link: https://patch.msgid.link/20260731113632.158440-11-clamor95@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-10mfd: lm3533: Add support for VIN power supplySvyatoslav Ryhel
Add support for 2.7V-5.5V VIN power supply. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Link: https://patch.msgid.link/20260731113632.158440-10-clamor95@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-10mfd: lm3533: Convert to use OF bindingsSvyatoslav Ryhel
Since there are no users of this driver via platform data, remove the platform data support and switch to using Device Tree bindings. Previously, all cell devices were linked to the parent device. This could cause problems further down the line because the LM3533 has multiple cells of the same type. Using a single phandle to the parent could cause confusion when attempting to reference or call the correct child node. Since this commit adds a dedicated node for every cell, remove linking of the cell to the parent node. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Reviewed-by: Daniel Thompson (RISCstar) <danielt@kernel.org> #for backlight Acked-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> #for-iio Link: https://patch.msgid.link/20260731113632.158440-9-clamor95@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-10mfd: lm3533: Use dev_groups in struct device_driverSvyatoslav Ryhel
Instead of creating and removing the device sysfs attributes directly during probe and remove of the driver, respectively, use dev_groups in struct device_driver to point to the attribute definitions and let the core take care of creating and removing them. No intentional functional impact. Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Reviewed-by: Johan Hovold <johan@kernel.org> Link: https://patch.msgid.link/20260731113632.158440-8-clamor95@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-10mfd: lm3533-core: Remove redundant pdata helpersSvyatoslav Ryhel
The lm3533_set_boost_freq() and lm3533_set_boost_ovp() functions are used only in lm3533_device_setup(), which in turn is only called by lm3533_device_init(). Incorporate their code directly into lm3533_device_init() to simplify driver readability. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Link: https://patch.msgid.link/20260731113632.158440-7-clamor95@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-10mfd: lm3533: Pass only regmap and light sensor presence to child devicesSvyatoslav Ryhel
Instead of passing the entire lm3533 core data structure, only pass the regmap and the light sensor presence flag to child devices. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Acked-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> #for-iio Link: https://patch.msgid.link/20260731113632.158440-5-clamor95@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-10mfd: lm3533: Remove driver specific regmap wrappersSvyatoslav Ryhel
Remove driver-specific regmap wrappers in favor of using regmap helpers directly. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Acked-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> Link: https://patch.msgid.link/20260731113632.158440-3-clamor95@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-09-04treewide: refresh kmalloc_obj() conversionsKees Cook
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-08-27Merge tag 'mfd-next-7.3' of ↵Linus Torvalds
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-19Merge tag 'driver-core-7.3-rc1' of ↵Linus Torvalds
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-12mfd: cs42l43: Fix regmap defaults orderingCharles Keepax
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: a6fe20d67dc7 ("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-12mfd: qnap-mcu: keep the reply buffer alive past a command timeoutAli Ahmet Memis
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: 998f70d1806b ("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-10Merge tag 'v7.2-rc7' into driver-core-nextDanilo Krummrich
We need the driver-core fixes in here as well to build on top of. Signed-off-by: Danilo Krummrich <dakr@kernel.org>