summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2026-07-30serial: 8250_bcm7271: Remove redundant dev_err_probe()Pan Chuang
Since commit 55b48e23f5c4 ("genirq/devres: Add error handling in devm_request_*_irq()"), devm_request_irq() automatically logs detailed error messages on failure. Remove the now-redundant driver-specific dev_err_probe() call. Signed-off-by: Pan Chuang <panchuang@vivo.com> Link: https://patch.msgid.link/20260722034342.316755-2-panchuang@vivo.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-30serial: bcm63xx-uart: silence false positive coccinelle warning on clk_putPei Xiao
Coccinelle warns about missing clk_put on the error path after clk_get, but the error path returns with an ERR_PTR where clk_put must not be called. Restructure into a single if block so the logic is clear to silence false positive coccinelle warning. Commit 580d952e44de ("tty: serial: bcm63xx: fix missing clk_put() in bcm63xx_uart") previously tried to fix this same warning by adding a clk_put, which was reverted because it was wrong. Prevent anyone from making the same mistake again. Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn> Link: https://patch.msgid.link/604886147edb67c3ed85b192eb3f7a4a6dd0f0ac.1784788388.git.xiaopei01@kylinos.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-30serial: sh-sci: remove check for zero baud rate from uart_get_baud_rate()Hugo Villeneuve
The minimum baud rate supported by this driver is 0, so even for the B0 case, uart_get_baud_rate() will return 9600, not zero. This check is no longer necessary since commit 16ae2a877bf4 ("serial: Fix crash if the minimum rate of the device is > 9600 baud") so remove it. Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com> Link: https://patch.msgid.link/20260720193411.3517484-1-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-30serial: rsci: remove check for zero baud rate from uart_get_baud_rate()Hugo Villeneuve
The minimum baud rate supported by this driver is 0, so even for the B0 case, uart_get_baud_rate() will return 9600, not zero. This check is no longer necessary since commit 16ae2a877bf4 ("serial: Fix crash if the minimum rate of the device is > 9600 baud") so remove it. Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com> Link: https://patch.msgid.link/20260720195147.3630241-1-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-30Revert "serial: 8250: drop lockdep annotation from serial8250_clear_IER()"John Ogness
This reverts commit 3d9e6f556e235ddcdc9f73600fdd46fe1736b090. The 8250 driver no longer depends on @oops_in_progress and will no longer violate the port->lock locking constraints. Signed-off-by: John Ogness <john.ogness@linutronix.de> Reviewed-by: Petr Mladek <pmladek@suse.com> Link: https://patch.msgid.link/20260729120439.281252-3-john.ogness@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-30serial: 8250: Switch to nbcon console, take 2John Ogness
Implement the necessary callbacks to switch the 8250 console driver to perform as an nbcon console. Add implementations for the nbcon console callbacks: ->write_atomic() ->write_thread() ->device_lock() ->device_unlock() and add CON_NBCON to the initial @flags. All hardware access in the callbacks is within unsafe sections. The ->write_atomic() and ->write_thread() callbacks allow safe handover/takeover per byte and add a preceding newline if they take over from another context mid-line. For the ->write_atomic() callback, a new irq_work is used to defer modem control since it may be called from a context that does not allow waking up tasks. During suspend/resume the irq_work is not used as this has been shown to cause suspend problems for some hardware. Upon resume, any pending modem control is performed. Note: A new __serial8250_clear_IER() is introduced for direct clearing of UART_IER during console writing (which will not be holding the port lock for atomic printing or KDB/KGDB). This allows restoring a lockdep check to serial8250_clear_IER() in a follow-up commit. Signed-off-by: John Ogness <john.ogness@linutronix.de> Link: https://patch.msgid.link/20260729120439.281252-2-john.ogness@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-30serial: 8250: remove always included kconfig.hHugo Villeneuve
The inclusion of <linux/kconfig.h> in commit 7ab80d1e72431 ("serial: 8250: fix compile error with hub6_match_port() when compiled as a module") is unneeded as it's guaranteed by the build starting from commit 2a11c8ea20bf ("kconfig: Introduce IS_ENABLED(), IS_BUILTIN() and IS_MODULE()"). Remove it here. Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20260721144847.3728422-1-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-30serial: max310x: remove always included kconfig.hHugo Villeneuve
The inclusion of <linux/kconfig.h> in commit f18643843bc6 ("serial: max310x: fix compile errors if CONFIG_SPI_MASTER is disabled") is unneeded as it's guaranteed by the build starting from the commit 2a11c8ea20bf ("kconfig: Introduce IS_ENABLED(), IS_BUILTIN() and IS_MODULE()"). Remove it here. Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20260721144420.3727708-1-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-30serial: qcom-geni: fix TX DMA buffer flushJan Sebastian Götte
When transmit flushing a qcom-geni UART during an ongoing TX DMA, the UART gets stuck infinitely repeating corrupted TX DMA frames. The DMA-mode uart_ops does not provide a flush_buffer callback, so an in-flight transfer can complete after serial core has reset the transmit kfifo, underflowing its length and resubmitting page-sized transfers indefinitely. Add one that stops the transfer and clears tx_remaining and tx_queued. The stop path was also broken: it unmapped the buffer while the serial engine could still read it, and never reset the TX DMA state machine. Cancel the main sequencer command first, then reset the state machine and wait for it before unmapping. Drop the early return so a pending mapping is also cleaned up when the main command is inactive. The bug can be triggered from userspace with a large write immediately followed by TCOFLUSH. A following tcdrain will hang forever. The bug was reproduced and this fix was validated on Arduino Uno Q (QRB2210) using /dev/ttyHS1. Assisted-by: Claude:claude-5-opus Codex:gpt-5 Signed-off-by: Jan Sebastian Götte <linux@jaseg.de> Fixes: 2aaa43c70778 ("tty: serial: qcom-geni-serial: add support for serial engine DMA") Cc: stable <stable@kernel.org> Reviewed-by: Praveen Talari <praveen.talari@oss.qualcomm.com> Link: https://patch.msgid.link/20260729174105.21838-2-git@jaseg.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-30serial: 8250_dma: Clear stale RX state on shutdownCunhao Lu
serial8250_release_dma() terminates RX DMA and releases the channel, but leaves rx_running set. If the port is closed while an RX transfer is active, the stale state remains while rxchan is NULL until the channel is requested again on the next open. The DesignWare BUSY workaround added by commit a7b9ce39fbe4 ("serial: 8250_dw: Ensure BUSY is deasserted") calls serial8250_rx_dma_flush() from the LCR write path during startup. This happens before serial8250_request_dma() obtains a new RX channel. On reopen, the stale rx_running state therefore makes the flush path pass a NULL channel to dmaengine_pause(), causing a kernel Oops. Clear rx_running after terminating RX DMA, matching the TX cleanup. Also make the flush helper return if the DMA object or RX channel is not available so startup and teardown paths cannot pass a NULL channel to the DMAengine API. Fixes: 0fcb7901f9d6 ("tty: serial: 8250_dma: keep own book keeping about RX transfers") Cc: stable <stable@kernel.org> Signed-off-by: Cunhao Lu <1579567540@qq.com> Link: https://patch.msgid.link/tencent_9EE2945F4C933B4D810C73C2D7485E000F06@qq.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-30serial: sc16is7xx: enable THRI before filling TX FIFOLuca Fresi
sc16is7xx_handle_tx() currently requests the THRI enable only after it has filled the TX FIFO. The request is asynchronous because the IER update is performed later by reg_work. The SC16IS7xx generates a THRI interrupt when the TX FIFO crosses its trigger level. If the FIFO drains past that level before reg_work enables THRI, the chip does not generate a new interrupt. Characters remain queued indefinitely even though the hardware FIFO is empty. This was observed on an SC16IS752 while both UART channels were active. During the stall the software TX buffer remained non-empty while TXLVL reported 64 bytes free, LSR reported THR and transmitter empty, IER had THRI enabled, and IIR reported no interrupt pending. Enable THRI synchronously before filling the FIFO so the threshold crossing cannot be missed. Fixes: cc4c1d05eb10 ("sc16is7xx: Properly resume TX after stop") Cc: stable <stable@kernel.org> Signed-off-by: Luca Fresi <luca.fresi@bithiatec.com> Link: https://patch.msgid.link/20260721222404.204746-1-luca.fresi@bithiatec.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-30rust: pci: use `Option<&IdInfo>` for device ID infoGary Guo
It is possible that `pci_device_id_any` will be passed to the driver, e.g. `driver_override` is used on the device. Therefore, the driver must be able to handle the case where `driver_data` is 0. Thus, update the `probe` functions to get `Option`. The current code cannot tell if the info does not exist or is the first entry; however this will be achievable once the code is updated to use a `&'static IdInfo` pointer instead of indices. Signed-off-by: Gary Guo <gary@garyguo.net> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://patch.msgid.link/20260629-id_info-v2-3-56fccbe9c5ef@garyguo.net Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-07-30Revert "serial: 8250: Clear CON_PRINTBUFFER on port re-registration"Fushuai Wang
This reverts commit d338ab1d90603f875c4f7ed223406535378173a5. uart_console() only indicates that the port is selected as the console. It does not mean that the console has already been registered or has printed the buffered messages. On platforms where an initial 8250 port is replaced when the real UART device is registered, clearing CON_PRINTBUFFER causes the console to start at the end of the printk ring buffer. Without earlycon, all messages logged before UART registration are therefore lost. Fixes: d338ab1d9060 ("serial: 8250: Clear CON_PRINTBUFFER on port re-registration") Reported-by: Mark Brown <broonie@kernel.org> Reported-by: Anirudh Srinivasan <asrinivasan@oss.tenstorrent.com> Link: https://lore.kernel.org/all/20260522101042.21976-1-fushuai.wang@linux.dev/ Signed-off-by: Fushuai Wang <wangfushuai@baidu.com> Reviewed-by: John Ogness <john.ogness@linutronix.de> Link: https://patch.msgid.link/20260724093151.53216-1-fushuai.wang@linux.dev Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-30clk: imx95-blk-ctl: Fix REFCLK rise-fall mismatch on i.MX95Richard Zhu
When the internal PLL is used as the PCIe reference clock source on i.MX95, a REFCLK rise-fall time mismatch is observed during PCIe Gen1 compliance testing with the Lfast IO analyzer. Fix this issue by configuring the IREF_TX field to 0xF (15), which adjusts the transmitter current reference to meet the PCIe specification timing requirements. Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20260730090447.271109-1-hongxing.zhu@oss.nxp.com Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
2026-07-30clk: imx95-blk-ctl: Add func_out_en clock for i.MX9x PCIeRichard Zhu
Add a func_out_en clock for i.MX9x PCIe to serve as the parent gate clock of the CREF_EN (BIT6) gate clock. Both of these two gate clocks enable the output of the internal 100MHz differential reference clock. When the internal PLL clock is used as the PCIe reference clock, both BIT6 (CREF_EN) and BIT2 (FUNC_OUTPUT_EN) control the PCIE_REF_OUT_CLK. If these bits default to 1, the output clock is enabled. With typical 100-ohm termination on the board, this results in approximately 6mA of unnecessary power consumption when the PCIe internal PLL clock is not in use. To eliminate this power consumption, add a func_out_en clock gate that serves as the parent of the existing CREF_EN (BIT6) gate clock. Both gates must be enabled to output the internal 100MHz differential reference clock, and both will be disabled when the clock is not needed. Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20260730085542.263025-1-hongxing.zhu@oss.nxp.com Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
2026-07-30drm/tyr: add Memory Management Unit (MMU) supportBoris Brezillon
Add Memory Management Unit (MMU) support in Tyr. The MMU module wraps a SlotManager instance to allocate MMU address-space slots for use by virtual memory (VM) address spaces. The MMU's SlotManager uses an AddressSpaceManager to handle the hardware-specific callbacks. For example, the AddressSpaceManager activates and evicts VMs from slots by writing commands to the MMU registers. Add an implementation block for the MMU's MEMATTR register to provide a method for translating the Memory Attribute Indirection Register (MAIR) format from the pagetable configuration to a format understood by the MMU. Create an mmu instance during probe, it will be used by subsequent patches in this series. Wrap the iomem stored in TyrDrmRegistrationData in an Arc. The iomem is stored in the mmu through its AddressSpaceManager. In anticipation of the iomem also being stored in the firmware object, set up shared ownership of the iomem now. Update Kconfig to add the new MMU and IOMMU dependencies required by this MMU module. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Co-developed-by: Deborah Brouwer <deborah.brouwer@collabora.com> Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com> Link: https://patch.msgid.link/20260728-fw-boot-b4-v10-3-9187aefa3f2f@collabora.com Signed-off-by: Alice Ryhl <aliceryhl@google.com>
2026-07-30drm/tyr: add a generic slot managerBoris Brezillon
Introduce a generic slot manager to dynamically allocate limited hardware slots to software "seats". It can be used for both address space (AS) and command stream group (CSG) slots. The slot manager initially assigns seats to its free slots. It will continue to reuse the same slot for a seat, as long as another seat does not start to use the slot in the interim. When contention arises because all of the slots are allocated, the slot manager will lazily evict and reuse slots that have become idle (if any). The seat state is protected using the LockedBy pattern with the same lock that guards the SlotManager. This ensures the seat state stays consistent across slot operations. Hardware specific behaviour is controlled through the SlotManager's specific manager type that implements the `SlotOperations` trait. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Co-developed-by: Deborah Brouwer <deborah.brouwer@collabora.com> Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com> Link: https://patch.msgid.link/20260728-fw-boot-b4-v10-2-9187aefa3f2f@collabora.com Signed-off-by: Alice Ryhl <aliceryhl@google.com>
2026-07-30drm/tyr: add resources to RegistrationDataDeborah Brouwer
Currently Tyr is not storing any resources in its drm::Driver RegistrationData. Move Tyr's device-private resources and gpu information from drm::Driver::Data to drm::Driver::RegistrationData. This allows Tyr to access this data safely within the lifetime of its binding to its parent platform device and while registered with userspace. Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com> Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com> Link: https://patch.msgid.link/20260728-fw-boot-b4-v10-1-9187aefa3f2f@collabora.com Signed-off-by: Alice Ryhl <aliceryhl@google.com>
2026-07-30mfd: si476x-i2c: Get rid of duplicate NULL checksAndy Shevchenko
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-30mfd: cgbc: Fix teardown ordering in cgbc_remove()Thomas Richard
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: 6f1067cfbee7 ("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-30mfd: mt6397-core: Add mt6323 AUXADC supportRoman Vivchar
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-30mfd: rohm: Factor out power button registrationDmitry Torokhov
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-30mfd: ucb1x00: Convert Assabet gpio-keys to use software nodesDmitry Torokhov
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-30mfd: ucb1x00: Register software node for GPIO controllerDmitry Torokhov
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-30mfd: cs42l43: Tidy up formatting on sdw_device_id tableCharles Keepax
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-30mfd: cs42l43: Remove redundant NULL checks on SoundWireCharles Keepax
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-30mfd: Unify style of spi_device_id arraysUwe Kleine-König (The Capable Hub)
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-30mfd: Initialize spi_device_id arrays using member namesUwe Kleine-König (The Capable Hub)
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-30mfd: Drop unused assignment of spi_device_id driver dataUwe Kleine-König (The Capable Hub)
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-30mfd: sprd-sc27xx: Add SC2730 regulator cellOtto Pflüger
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-30mfd: viperboard: Remove redundant NULL check before kfree()Mohammad Shahid
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-30mfd: db8500-prcmu: Fold dbx500 header into db8500Linus Walleij
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-30mfd: 88pm886: Initialize the battery pageDuje Mihanović
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-30mfd: cs42l43: Use new SoundWire enumeration helperCharles Keepax
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-30mfd: axp20x: Preserve other control bits when powering offOleg Proshkin
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-30mfd: ipaq-micro: Fix out-of-bounds stack read in ipaq_micro_strDmitry Torokhov
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-30mfd: si476x: Modernize GPIO handlingLinus Walleij
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-30mfd: mt6397-core: Add mt6323 EFUSE supportRoman Vivchar
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-30Merge branches 'ib-mfd-legacy-gpio-7.3' and 'ib-mfd-platform-chrome-7.3' ↵Lee Jones
into ibs-for-mfd-merged
2026-07-30qede: sync udp_tunnel ports outside qede_lock in the recovery pathDenis V. Lunev
A TX timeout on a qede NIC that has VXLAN/GENEVE tunnel ports configured wedges the rtnetlink control plane of the whole machine: NETDEV WATCHDOG: ens6f1 (qede): transmit queue 2 timed out 10226 ms [qede_tx_timeout:586(ens6f1)]TX timeout on queue 2! [qede_recovery_handler:2665(ens6f0)]Starting a recovery process The recovery path deadlocks on the driver's own mutex: qede_sp_task rtnl_lock() mutex_lock(&edev->qede_lock) <- taken qede_recovery_handler qede_load udp_tunnel_nic_reset_ntf __udp_tunnel_nic_device_sync info->sync_table == qede_udp_tunnel_sync mutex_lock(&edev->qede_lock) <- same task: deadlock The mutex is not recursive, so the kworker blocks on itself with rtnl_lock held, and neither lock is ever released. Every task that calls rtnl_lock() afterwards (ip, ovs-vswitchd, lldpad, IPv6 addrconf, sshd) blocks forever while the node still answers ping. In a vmcore from an affected production node rtnl_mutex.owner decodes to the very kworker blocked at the innermost mutex_lock() above. Re-sync the tunnel ports from qede_sp_task() after the internal lock is dropped, still under rtnl_lock as the udp_tunnel API requires. This mirrors qede_open(), which calls udp_tunnel_nic_reset_ntf() under rtnl without the internal lock. qede_recovery_handler() now returns whether it has successfully reloaded an open device, and the caller re-syncs the ports only in that case. This keeps the old gating exactly: a device that was down or a failed recovery returns false, as those paths never reached the udp_tunnel_nic_reset_ntf() call before either. This was the only user of the qede_lock()/qede_unlock() helpers, so remove them. Fixes: 8cd160a29415 ("qede: convert to new udp_tunnel_nic infra") Signed-off-by: Denis V. Lunev <den@openvz.org> CC: Andrew Lunn <andrew+netdev@lunn.ch> CC: "David S. Miller" <davem@davemloft.net> CC: Eric Dumazet <edumazet@google.com> CC: Jakub Kicinski <kuba@kernel.org> CC: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://patch.msgid.link/20260726104311.1782900-1-den@openvz.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-30Merge tag 'linux-can-fixes-for-7.2-20260729' of ↵Paolo Abeni
git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2026-07-29 this is a pull request of 20 patches for net/main. The first 2 patches fix problems in the CAN J1939 protocol and are by Tetsuo Handa and Oleksij Rempel. The next 2 patches fix problems in the CAN ISOTP protocol and are by Oliver Hartkopp and Minhong He. Avi Weiss contributes contributed 4 fixes for the ctucanfd, Pengpeng Hou's patch adds a missing MODULE_DEVICE_TABLE. The patches for the peak_usb driver are contributed by James Gao, Maoyi Xie, Maoyi Xie and add sanity checks for the USB bulk data parsing and fix a double free. 2 fixes for the kvaser_usb driver are provided by Abdun Nihaal and Pengpeng Hou, a mem leak is fixed and sanity checks for the USB bulk data parsing. Tu Nguyen's patch for the rcar_canfd driver fixes the initializing flow. Pengpeng Hou contributes a patch for the softing driver to validate the firmware record spans. Lucas Martins Alves's patch for the c_can driver keeps the controller in init mode until configuration is complete. A patch by my add missing URB resubmission on skb allocation failure to the gs_usb driver. Guangshuo Li's patch for the etas_es58x driver fixes a RX buffer leak. The last patch is by Pengpeng Hou and adds sanity checks to the USB bulk data parsing of the ems_usb driver. linux-can-fixes-for-7.2-20260729 * tag 'linux-can-fixes-for-7.2-20260729' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: ems_usb: validate CPC message lengths can: etas_es58x: es58x_read_bulk_callback(): fix RX buffer leak on URB resubmit failure can: gs_usb: gs_usb_receive_bulk_callback(): resubmit URB on skb allocation failure can: c_can: c_can_chip_config(): keep controller in init mode until bittiming is configured can: softing: fw_parse(): validate firmware record spans can: rcar_canfd: change the initializing flow for clocks and resets can: kvaser_usb_leaf: kvaser_usb_leaf_wait_cmd(): validate received command extents can: kvaser_usb: kvaser_usb_hydra_get_busparams(): fix memory leak in kvaser_usb_hydra_get_busparams() can: peak_usb: validate uCAN receive record lengths can: peak_usb: peak_usb_start(): fix double free of transfer buffer on URB submit error can: peak_usb: add bounds check for USB channel index can: ctucanfd: add missing MODULE_DEVICE_TABLE() can: ctucanfd: use self-test mode for PRESUME_ACK can: ctucanfd: handle bus error interrupts can: ctucanfd: mark error-active controller status valid can: ctucanfd: unmap BAR0 using base address can: isotp: check register_netdevice_notifier() error in module init can: isotp: fix timer drain order, wakeup handling and tx_gen ordering can: j1939: transport: j1939_session_fresh_new(): initialize receive buffer can: j1939: use netdevice_tracker for j1939_{priv,session,ecu} tracking ==================== Link: https://patch.msgid.link/20260729102802.505168-1-mkl@pengutronix.de Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-30iommu/iova: Move CPU magazine init to first insertLogan Odell
A large amount of memory may be allocated for these magazines on machines with a lot of IOMMU groups and CPU cores. Not all may be used as some devices may be unused or be bound to drivers that do not use the DMA-API. Furthermore, some drivers may not use all levels or CPUs. Move the initialization of the loaded and prev magazines for each CPU on the first attempt to try to insert a freed IOVA to them. Signed-off-by: Logan Odell <loganodell@google.com> Signed-off-by: Michal Clapinski <mclapinski@google.com> Reviewed-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2026-07-30iommu/amd: Put PCI device after handling PPR faultsShuai Xue
iommu_call_iopf_notifier() looks up the requester with pci_get_domain_bus_and_slot(), which returns a PCI device with its reference count incremented. Neither the successful iommu_report_device_fault() path nor the abort path drops that reference, so every handled PPR request leaks a PCI device reference. This is the same ownership rule that was fixed for the old iommu_v2 ppr_notifier() path by commit 6cf0981c2233 ("iommu/amd: Fix pci device refcount leak in ppr_notifier()"), but iommu_call_iopf_notifier() was added later as a separate PPR/IOPF notifier path. Drop the PCI device reference after handling the PPR entry. Fixes: 978d626b8f1a ("iommu/amd: Add IO page fault notifier handler") Cc: stable@vger.kernel.org Assisted-by: Qoder:Qwen-3.8-MAX-Preview Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com> Reviewed-by: Vasant Hegde <vasant.hegde@amd.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2026-07-30spi: Few fix/improvement for spi-nxp-fspiMark Brown
haibo.chen@oss.nxp.com <haibo.chen@oss.nxp.com> says: Patch 1 introduce per-SoC clock rate limits for both SDR and DTR modes by adding max_sdr_rate and max_dtr_rate to nxp_fspi_devtype_data. Patch 2 enter stop mode before reconfiguring MCR0 and DLL to follow FlexSPI reference manual initialization sequence Patch 3 propagate clock reconfig failures in nxp_fspi_select_mem() Link: https://patch.msgid.link/20260728-fspi-clock-v2-0-dbe786a4a6eb@nxp.com
2026-07-30spi: spi-nxp-fspi: propagate clock reconfig failures in nxp_fspi_select_mem()Haibo Chen
nxp_fspi_select_mem() disables the FlexSPI clocks before calling clk_set_rate() and re-enabling them. If clk_set_rate() or the clock re-enable fails, the function returned early (as void) leaving both the serial root clock and the register interface clock disabled. As the function returned void, nxp_fspi_exec_op() had no way to know about the failure and continued to access FlexSPI registers (LUT setup, data transfer, AHB buffer invalidation). Accessing the controller registers while its clock is gated off results in a synchronous external abort. Make nxp_fspi_select_mem() return an error code and have nxp_fspi_exec_op() bail out on failure before any further register access, including nxp_fspi_invalid(). Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Link: https://patch.msgid.link/20260728-fspi-clock-v2-3-dbe786a4a6eb@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-30spi: spi-nxp-fspi: enter stop mode before reconfiguring MCR0 and DLLHaibo Chen
In nxp_fspi_select_mem() the RX sample clock source (MCR0[RXCLKSRC]) and the DLL control registers (DLLxCR) are reconfigured while the FlexSPI module is still enabled. According to the FlexSPI reference manual initialization sequence, MCR0 and the DLL control registers should be programmed while the module is in stop mode, i.e. with MCR0[MDIS] set to 1, and the module re-enabled (MCR0[MDIS] = 0) afterwards. Wrap the RX sample clock source selection and the DLL calibration/ override reconfiguration in a stop-mode window to align with the RM and avoid reconfiguring timing-critical registers while the module is active. Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20260728-fspi-clock-v2-2-dbe786a4a6eb@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-30spi: spi-nxp-fspi: add per-SoC SDR/DTR clock rate limits for all supported SoCsHaibo Chen
The commit f43579ef3500 ("spi: spi-nxp-fspi: limit the clock rate for different sample clock source selection") introduced a global 166MHz cap for DTR mode (RXCLKSRC=3), based on the i.MX8MN datasheet timing specification (Section 3.9.9, page 65). After reviewing the FlexSPI timing parameters in the datasheets for all supported SoCs, the following corrections and additions are needed: 1. SDR mode (RXCLKSRC=0) limits vary per SoC: - i.MX8MN/MM/MP/95: 66MHz (IMX8MNCEC §3.9.9, IMX8MMCEC §3.9.10, IMX8MPCEC, IMX95CEC Rev.8 §4.11.7) - i.MX8QXP/QM/DXL/ULP: 60MHz (IMX8QXPCEC, IMX8QMCEC, IMX8DXLCEC, IMX8ULPCEC §7.3.1 ND mode) - LX2160A: 100MHz (LX2160ACEC FlexSPI timing parameters) 2. DTR mode (RXCLKSRC=3) limits vary per SoC: - i.MX8MN/MM/MP/ULP: 166MHz - i.MX8QXP/QM/DXL: 200MHz (same FlexSPI IP across this family) - i.MX95: 200MHz (IMX95CEC §4.11.7.3.2.3 Table 106) - LX2160A: DTR disabled (FSPI_QUIRK_DISABLE_DTR) Update related platform data with correct speed limation according to datasheet. Fixes: f43579ef3500 ("spi: spi-nxp-fspi: limit the clock rate for different sample clock source selection") Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Link: https://patch.msgid.link/20260728-fspi-clock-v2-1-dbe786a4a6eb@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-30spi: spi-mpc52xx: use platform_get_irq_optional for IRQ lookupRosen Penev
Replace irq_of_parse_and_map() calls with platform_get_irq_optional() to fetch both IRQs in the probe function. This is a more portable approach that works with both DT and non-DT platforms and follows modern platform API conventions. The -EPROBE_DEFER case is handled properly so deferred probe works as expected, and invalid IRQ numbers are normalized to 0. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://patch.msgid.link/20260727194714.11354-1-rosenp@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-30net: phy: micrel: Add loopback support for ksz9131Maxime Chevallier
ksz9131 is configured for local loopback in a similar fashion as the ksz9031, with a need for full-duplex operation, but with some extra steps to take as specified in section 4.13.1 : 1. Configure the following registers: - MMD 1C, Register 15 = EEEE - MMD 1C, Register 16 = EEEE - MMD 1C, Register 18 = EEEE - MMD 1C, Register 1B = EEEE These 4 registers are marked as "Reserved" in the register map. When setting loopback up without configuring these 4 registers, the PHY appears to shut its RXC down, which can trigger failures on MACs that require it, such as stmmac. The datasheet does not specify to which state the registers must be reset when disabling loopback, so let's restore them to their measured initial values. This was discovered when trying to use stmmac selftests on imx8mp with a ksz9131 connected in RGMII. Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20260728075222.956780-1-maxime.chevallier@bootlin.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-30net: intel: remove conditional return with no effectSang-Heon Jeon
Both branches of the check return the same value, so the check has no effect. Remove it and return the value directly. This is the result of running the Coccinelle script from scripts/coccinelle/misc/cond_return_no_effect.cocci. Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com> Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com> Link: https://patch.msgid.link/20260725150852.859188-5-ekffu200098@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>