summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2025-08-17serial: 8250_omap: extract omap_8250_set_termios_atomic()Jiri Slaby (SUSE)
To use guard()s easily in omap_8250_set_termios(), split it into atomic and non-atomic part. The former can be easily guarded -- without a need of indenting or moving code. omap_8250_set_termios() would likely profit from a cleanup similar to one in serial8250_do_set_termios() in commit cdc4a3e0b235 ("serial: 8250: extract serial8250_set_fcr()") and earlier. Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20250814072456.182853-12-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-17serial: 8250_core: use guard() in serial_unlink_irq_chain()Jiri Slaby (SUSE)
Having all the new guards, use them in the 8250 code. This improves readability, makes error handling easier, and marks locked portions of code explicit. serial_unlink_irq_chain() is done separately here because with the guard() used, those BUG_ON()s can be switched WARN_ON()s as we can actually handle the conditions and return (despite something went really wrong). Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20250814072456.182853-11-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-17serial: 8250: use guard()sJiri Slaby (SUSE)
Having all the new guards, use them in the 8250 code. This improves readability, makes error handling easier, and marks locked portions of code explicit. Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20250814072456.182853-10-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-17serial: serial_core: use guard()sJiri Slaby (SUSE)
Having all the new guards, use them in the serial_core code. This improves readability, makes error handling easier, and marks locked portions of code explicit. Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20250814072456.182853-9-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-17mxser: use guard()sJiri Slaby (SUSE)
Having all the new guards, use them in the mxser code. This improves readability, makes error handling easier, and marks locked portions of code explicit. Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20250814072456.182853-8-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-17mxser: use tty_port_tty guard() in mxser_port_isr()Jiri Slaby (SUSE)
Use scoped_guard() and reorder the function. This is done separately from the other changes, as it is slighly more intrusive: scoped_guard() handles the have-tty case and returns. The non-tty case is done at the end of the function. Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20250814072456.182853-7-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-17tty: tty_port: use guard()sJiri Slaby (SUSE)
Having all the new guards, use them in the tty_port code. This improves readability, makes error handling easier, and marks locked portions of code explicit. Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20250814072456.182853-6-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-17serial: 8250: introduce RPM guard()sJiri Slaby (SUSE)
Having this, guards like these work: guard(serial8250_rpm)(up); or scoped_guard(serial8250_rpm, up) { ... } See e.g. "serial: 8250: use guard()s" later in this series. And make them available to anyone (EXPORT + put in 8250.h) as drivers open code this anyway. The _tx ones are not defined as they would have no user. Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20250814072456.182853-5-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-17usb: gadget: f_ncm: Fix MAC assignment NCM ethernetraub camaioni
This fix is already present in f_ecm.c and was never propagated to f_ncm.c When creating multiple NCM ethernet devices on a composite usb gadget device each MAC address on the HOST side will be identical. Having the same MAC on different network interfaces is bad. This fix updates the MAC address inside the ncm_strings_defs global during the ncm_bind call. This ensures each device has a unique MAC. In f_ecm.c ecm_string_defs is updated in the same way. The defunct MAC assignment in ncm_alloc has been removed. Signed-off-by: raub camaioni <raubcameo@gmail.com> Link: https://lore.kernel.org/r/20250815131358.1047525-1-raubcameo@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-17USB: Check no positive return values from pm_runtime_resume_and_get()Sakari Ailus
pm_runtime_resume_and_get() always returns a negative error code or zero; there's no need to check for positive values such as returned by pm_runtime_get_sync(). Simply drop the check. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Link: https://lore.kernel.org/r/20250815113121.925641-1-sakari.ailus@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-17usb: typec: ucsi: Add support for READ_POWER_LEVEL commandVenkat Jayaraman
Add support for UCSI READ_POWER_LEVEL command as per UCSI specification v2.1 and above to debugfs. Following power related fields will be exposed as files in debugfs:- peak_current (Peak current), avg_current (Average current) and vbus_voltage (VBUS voltage) These files will be updated either when a READ_POWER_LEVEL command is sent from OS or when a device is connected. Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Venkat Jayaraman <venkat.jayaraman@intel.com> Link: https://lore.kernel.org/r/20250814163028.18058-1-venkat.jayaraman@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-17usb: typec: maxim_contaminant: re-enable cc toggle if cc is open and port is ↵Amit Sunil Dhamne
clean Presently in `max_contaminant_is_contaminant()` if there's no contaminant detected previously, CC is open & stopped toggling and no contaminant is currently present, TCPC.RC would be programmed to do DRP toggling. However, it didn't actively look for a connection. This would lead to Type-C not detect *any* new connections. Hence, in the above situation, re-enable toggling & program TCPC to look for a new connection. Also, return early if TCPC was looking for connection as this indicates TCPC has neither detected a potential connection nor a change in contaminant state. In addition, once dry detection is complete (port is dry), restart toggling. Fixes: 02b332a06397e ("usb: typec: maxim_contaminant: Implement check_contaminant callback") Cc: stable <stable@kernel.org> Signed-off-by: Amit Sunil Dhamne <amitsd@google.com> Reviewed-by: Badhri Jagan Sridharan <badhri@google.com> Link: https://lore.kernel.org/r/20250815-fix-upstream-contaminant-v2-2-6c8d6c3adafb@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-17usb: typec: maxim_contaminant: disable low power mode when reading ↵Amit Sunil Dhamne
comparator values Low power mode is enabled when reading CC resistance as part of `max_contaminant_read_resistance_kohm()` and left in that state. However, it's supposed to work with 1uA current source. To read CC comparator values current source is changed to 80uA. This causes a storm of CC interrupts as it (falsely) detects a potential contaminant. To prevent this, disable low power mode current sourcing before reading comparator values. Fixes: 02b332a06397 ("usb: typec: maxim_contaminant: Implement check_contaminant callback") Cc: stable <stable@kernel.org> Signed-off-by: Amit Sunil Dhamne <amitsd@google.com> Reviewed-by: Badhri Jagan Sridharan <badhri@google.com> Rule: add Link: https://lore.kernel.org/stable/20250814-fix-upstream-contaminant-v1-1-801ce8089031%40google.com Link: https://lore.kernel.org/r/20250815-fix-upstream-contaminant-v2-1-6c8d6c3adafb@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-17usb: dwc3: Remove WARN_ON for device endpoint command timeoutsSelvarasu Ganesan
This commit addresses a rarely observed endpoint command timeout which causes kernel panic due to warn when 'panic_on_warn' is enabled and unnecessary call trace prints when 'panic_on_warn' is disabled. It is seen during fast software-controlled connect/disconnect testcases. The following is one such endpoint command timeout that we observed: 1. Connect ======= ->dwc3_thread_interrupt ->dwc3_ep0_interrupt ->configfs_composite_setup ->composite_setup ->usb_ep_queue ->dwc3_gadget_ep0_queue ->__dwc3_gadget_ep0_queue ->__dwc3_ep0_do_control_data ->dwc3_send_gadget_ep_cmd 2. Disconnect ========== ->dwc3_thread_interrupt ->dwc3_gadget_disconnect_interrupt ->dwc3_ep0_reset_state ->dwc3_ep0_end_control_data ->dwc3_send_gadget_ep_cmd In the issue scenario, in Exynos platforms, we observed that control transfers for the previous connect have not yet been completed and end transfer command sent as a part of the disconnect sequence and processing of USB_ENDPOINT_HALT feature request from the host timeout. This maybe an expected scenario since the controller is processing EP commands sent as a part of the previous connect. It maybe better to remove WARN_ON in all places where device endpoint commands are sent to avoid unnecessary kernel panic due to warn. Cc: stable <stable@kernel.org> Co-developed-by: Akash M <akash.m5@samsung.com> Signed-off-by: Akash M <akash.m5@samsung.com> Signed-off-by: Selvarasu Ganesan <selvarasu.g@samsung.com> Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20250808125315.1607-1-selvarasu.g@samsung.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-17USB: storage: Ignore driver CD mode for Realtek multi-mode Wi-Fi donglesZenm Chen
Many Realtek USB Wi-Fi dongles released in recent years have two modes: one is driver CD mode which has Windows driver onboard, another one is Wi-Fi mode. Add the US_FL_IGNORE_DEVICE quirk for these multi-mode devices. Otherwise, usb_modeswitch may fail to switch them to Wi-Fi mode. Currently there are only two USB IDs known to be used by these multi-mode Wi-Fi dongles: 0bda:1a2b and 0bda:a192. Information about Mercury MW310UH in /sys/kernel/debug/usb/devices. T: Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 12 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=0bda ProdID=a192 Rev= 2.00 S: Manufacturer=Realtek S: Product=DISK C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none) E: Ad=8a(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=0b(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms Information about D-Link AX9U rev. A1 in /sys/kernel/debug/usb/devices. T: Bus=03 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 55 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=0bda ProdID=1a2b Rev= 0.00 S: Manufacturer=Realtek S: Product=DISK C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none) E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms Cc: stable <stable@kernel.org> Signed-off-by: Zenm Chen <zenmchen@gmail.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Link: https://lore.kernel.org/r/20250813162415.2630-1-zenmchen@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-16iio: light: Simple conversions to iio_push_to_buffers_with_ts()Jonathan Cameron
This new function allows for runtime checks on the provided source buffer being of sufficient size to accommodate the enabled channel data layout and the naturally aligned s64 timestamp (which is non obvious and a frequent source of bugs in the past). This patch includes the remaining simple cases for light sensor drivers. Cc: Mudit Sharma <muditsharma.info@gmail.com> Cc: Jiri Kosina <jikos@kernel.org> Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Cc: Javier Carrasco <javier.carrasco.cruz@gmail.com> Cc: Matti Vaittinen <mazziesaccount@gmail.com> Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://patch.msgid.link/20250802164436.515988-17-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2025-08-16iio: light: vl6180: Use iio_push_to_buffers_with_ts() to allow source size ↵Jonathan Cameron
runtime check Use iio_push_to_buffers_with_ts() to allow source size runtime check. Also move the structure used as the source to the stack as it is only 16 bytes and not the target of an DMA or similar. Cc: Abhash Jha <abhashkumarjha123@gmail.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://patch.msgid.link/20250802164436.515988-16-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2025-08-16iio: light: vcnl4000: Use a structure to make buffer arrangement explicit.Jonathan Cameron
Removes the need for comments to describe the buffer passed to iio_push_to_buffers_with_timestamp(). Reviewed-by: Mårten Lindahl <marten.lindahl@axis.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://patch.msgid.link/20250802164436.515988-15-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2025-08-16iio: light: tcs3472: Use iio_push_to_buffers_with_ts() to allow source size ↵Jonathan Cameron
runtime check Use iio_push_to_buffers_with_ts() to allow source size runtime check. Also move the structure used as the source to the stack as it is only 16 bytes and not the target of an DMA or similar. Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://patch.msgid.link/20250802164436.515988-14-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2025-08-16iio: light: tcs3414: Use iio_push_to_buffers_with_ts() to allow source size ↵Jonathan Cameron
runtime check Use iio_push_to_buffers_with_ts() to allow source size runtime check. Also move the structure used as the source to the stack as it is only 16 bytes and not the target of an DMA or similar. Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://patch.msgid.link/20250802164436.515988-13-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2025-08-16iio: light: st_uvis25: Use iio_push_to_buffers_with_ts() to allow source ↵Jonathan Cameron
size runtime check Use iio_push_to_buffers_with_ts() to allow source size runtime check. Also move the structure used as the source to the stack as it is only 16 bytes and not the target of an DMA or similar. Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://patch.msgid.link/20250802164436.515988-12-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2025-08-16iio: light: max44000: Use iio_push_to_buffers_with_ts() to allow source size ↵Jonathan Cameron
runtime check Use iio_push_to_buffers_with_ts() to allow source size runtime check. Also move the structure used as the source to the stack as it is only 16 bytes and not the target of an DMA or similar. Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://patch.msgid.link/20250802164436.515988-11-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2025-08-16iio: light: isl29125: Use iio_push_to_buffers_with_ts() to allow source size ↵Jonathan Cameron
runtime check Also move the structure used as the source to the stack as it is only 16 bytes and not the target of an DMA or similar. Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://patch.msgid.link/20250802164436.515988-10-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2025-08-16iio: light: adjd_s311: Use iio_push_to_buffers_with_ts() to allow source ↵Jonathan Cameron
size runtime check Also move the structure used as the source to the stack as it is only 16 bytes and not the target of an DMA or similar. Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://patch.msgid.link/20250802164436.515988-9-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2025-08-16iio: light: acpi-als: Use iio_push_to_buffers_with_ts() to allow runtime ↵Jonathan Cameron
source size check This function allows for runtime detection of undersized storage which can be non obvious due to the injection of a timestamp within the helper. Cc: Gwendal Grignou <gwendal@chromium.org> Link: https://patch.msgid.link/20250802164436.515988-8-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Andy Shevchenko <andy@kernel.org>
2025-08-16iio: light: acpi-als: Use a structure for layout of data to push to buffer.Jonathan Cameron
Using a structure makes the padding and alignment rules explicit, removing the need for a comment. Also move the storage to the stack as it is only 16 bytes. Cc: Gwendal Grignou <gwendal@chromium.org> Link: https://patch.msgid.link/20250802164436.515988-7-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Andy Shevchenko <andy@kernel.org>
2025-08-16Merge tag 'ata-ata-6.17-rc2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux Pull ata fixes from Damien Le Moal: - Fix a regression affecting old IDE/PATA device scan and introduced by the recent link power management cleanups & fixes. The regression prevented devices from being properly detected (me) - Fix command duration limits (CDL) feature control: attempting to enable the feature while NCQ commands are being executed resulted in a silent failure to enable CDL when needed (Igor) * tag 'ata-ata-6.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux: ata: libata-scsi: Fix CDL control ata: libata-eh: Fix link state check for IDE/PATA ports
2025-08-16iio: light: as73211: Ensure buffer holes are zeroedJonathan Cameron
Given that the buffer is copied to a kfifo that ultimately user space can read, ensure we zero it. Fixes: 403e5586b52e ("iio: light: as73211: New driver") Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://patch.msgid.link/20250802164436.515988-2-jic23@kernel.org Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2025-08-16iio: adc: rzg2l_adc: Set driver data before enabling runtime PMClaudiu Beznea
When stress-testing the system by repeatedly unbinding and binding the ADC device in a loop, and the ADC is a supplier for another device (e.g., a thermal hardware block that reads temperature through the ADC), it may happen that the ADC device is runtime-resumed immediately after runtime PM is enabled, triggered by its consumer. At this point, since drvdata is not yet set and the driver's runtime PM callbacks rely on it, a crash can occur. To avoid this, set drvdata just after it was allocated. Fixes: 89ee8174e8c8 ("iio: adc: rzg2l_adc: Simplify the runtime PM code") Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://patch.msgid.link/20250810123328.800104-3-claudiu.beznea.uj@bp.renesas.com Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2025-08-16iio: adc: rzg2l: Cleanup suspend/resume pathClaudiu Beznea
There is no need to manually track the runtime PM status in the driver. The pm_runtime_force_suspend() and pm_runtime_force_resume() functions already call pm_runtime_status_suspended() to check the runtime PM state. Additionally, avoid calling pm_runtime_put_autosuspend() during the suspend/resume path, as this would decrease the usage counter of a potential user that had the ADC open before the suspend/resume cycle. Fixes: 563cf94f9329 ("iio: adc: rzg2l_adc: Add suspend/resume support") Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Link: https://patch.msgid.link/20250810123328.800104-2-claudiu.beznea.uj@bp.renesas.com Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2025-08-16pcmcia: Add error handling for add_interval() in do_validate_mem()Wentao Liang
In the do_validate_mem(), the call to add_interval() does not handle errors. If kmalloc() fails in add_interval(), it could result in a null pointer being inserted into the linked list, leading to illegal memory access when sub_interval() is called next. This patch adds an error handling for the add_interval(). If add_interval() returns an error, the function will return early with the error code. Fixes: 7b4884ca8853 ("pcmcia: validate late-added resources") Signed-off-by: Wentao Liang <vulab@iscas.ac.cn> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2025-08-16pcmcia: cs: Remove unused pcmcia_get_socket_by_nrDr. David Alan Gilbert
The last use of pcmcia_get_socket_by_nr() was removed in 2010 by commit 5716d415f8c5 ("pcmcia: remove obsolete ioctl") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2025-08-16pcmcia: omap: Add missing check for platform_get_resourceChen Ni
Add missing check for platform_get_resource() and return error if it fails to catch the error. Fixes: d87d44f7ab35 ("ARM: omap1: move CF chipselect setup to board file") Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2025-08-16iio: dac: ad5791: drop unused member of struct ad5791_stateNuno Sá
The regulator pointers reg_vdd and reg_vss are no longer used. So drop them. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Reviewed-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20250811-ad5791-drop-unused-v1-1-3412fbf3ba36@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2025-08-16pcmcia: Use str_off_on() and str_yes_no() helpersThorsten Blum
Remove hard-coded strings by using the str_off_on() and str_yes_no() helper functions. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2025-08-16pcmcia: remove PCCARD_IODYNLukas Bulwahn
The config PCCARD_IODYN was last used in the config option PCMCIA_M8XX with its m8xx_pcmcia driver. This driver was removed with commit 39eb56da2b53 ("pcmcia: Remove m8xx_pcmcia driver"), included in v3.17, back in 2014. Since then, the config PCCARD_IODYN is unused. Remove the config option, the corresponding file included with this config and the corresponding definition in the pcmcia header file. Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2025-08-16pcmcia: ds: Emphasize "really" epizeuxisBagas Sanjaya
pcmcia_dev_present() comment writes about small timeframe where the function returns NULL (racy condition), in epizeuxis device. In the past, it tripped contributors who misunderstood it for "really" duplicate ([1], [2]). Add comma between "really" words to emphasize the epizeuxis. Link: https://lore.kernel.org/all/YxT1As38WRZcyH0%2F@shine.dominikbrodowski.net/ [1] Link: https://lore.kernel.org/all/20220831083623.GA25639@isilmar-4.linta.de/ [2] Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2025-08-16iio: st_lsm6dsx: Replace scnprintf() with sysfs_emit()Akshay Bansod
Update the sysfs interface for sampling frequency and scale attributes. Replace `scnprintf()` with `sysfs_emit_at()` which is PAGE_SIZE-aware and recommended for use in sysfs. Signed-off-by: Akshay Bansod <akbansd@gmail.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://patch.msgid.link/20250811165641.1214347-1-akbansd@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2025-08-16iio: adc: ad7380: fix missing max_conversion_rate_hz on adaq4381-4David Lechner
Add max_conversion_rate_hz to the chip info for "adaq4381-4". Without this, the driver fails to probe because it tries to set the initial sample rate to 0 Hz, which is not valid. Fixes: bbeaec81a03e ("iio: ad7380: add support for SPI offload") Signed-off-by: David Lechner <dlechner@baylibre.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://patch.msgid.link/20250811-iio-adc-ad7380-fix-missing-max_conversion_rate_hs-on-ad4381-4-v1-1-ffb728d7a71c@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2025-08-16pcmcia: Fix a NULL pointer dereference in __iodyn_find_io_region()Ma Ke
In __iodyn_find_io_region(), pcmcia_make_resource() is assigned to res and used in pci_bus_alloc_resource(). There is a dereference of res in pci_bus_alloc_resource(), which could lead to a NULL pointer dereference on failure of pcmcia_make_resource(). Fix this bug by adding a check of res. Cc: stable@vger.kernel.org Fixes: 49b1153adfe1 ("pcmcia: move all pcmcia_resource_ops providers into one module") Signed-off-by: Ma Ke <make24@iscas.ac.cn> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2025-08-16iio: adc: imx93_adc: load calibrated values even calibration failedHaibo Chen
ADC calibration might fail because of the noise on reference voltage. To avoid calibration fail, need to meet the following requirement: ADC reference voltage Noise < 1.8V * 1/2^ENOB For the case which the ADC reference voltage on board do not meet the requirement, still load the calibrated values, so ADC can also work but maybe not that accurate. Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Primoz Fiser <primoz.fiser@norik.com> Link: https://patch.msgid.link/20250812-adc-v2-2-0260833f13b8@nxp.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2025-08-16iio: adc: imx93_adc: keep one style of the hex valuesHaibo Chen
Use capital letters consistently for hex values. Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://patch.msgid.link/20250812-adc-v2-1-0260833f13b8@nxp.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2025-08-16iio: iio_format_list() should set stride=1 for IIO_VAL_CHARBen Collins
iio_format_list() sets a stride across the val array of 1 for INT type, and 2 for all others. Add IIO_VAL_CHAR so it also gets a stride of 1 assuming val is an array of integers with char type values. No drivers currently use this, but I found this issue adding an avail callback for IIO_INFO_THERMOCOUPLE_TYPE for a driver I'm working on. Signed-off-by: Ben Collins <bcollins@kernel.org> Reviewed-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/vidvwybkm3vwmtopihyaj6tlvswwa5ixmgptfzpk5ujl2ixjjb@olz6275ftabs Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2025-08-16pcmcia: omap_cf: Mark driver struct with __refdata to prevent section mismatchGeert Uytterhoeven
As described in the added code comment, a reference to .exit.text is ok for drivers registered via platform_driver_probe(). Make this explicit to prevent the following section mismatch warning WARNING: modpost: drivers/pcmcia/omap_cf: section mismatch in reference: omap_cf_driver+0x4 (section: .data) -> omap_cf_remove (section: .exit.text) that triggers on an omap1_defconfig + CONFIG_OMAP_CF=m build. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2025-08-16Merge tag 'scsi-fixes' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "One core change removing the 'w' access flag of attributes that don't have a set routine (and therefore can't be written to) which should have no practical impact. The big scsi_debug update is caused by reformatting lots of arrays and the rest of the bug fixes in drivers are trivial" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ufs: core: Remove error print for devm_add_action_or_reset() scsi: ufs: mediatek: Fix out-of-bounds access in MCQ IRQ mapping scsi: lpfc: Remove redundant assignment to avoid memory leak scsi: lpfc: Fix wrong function reference in a comment scsi: ufs: core: Fix interrupt handling for MCQ Mode scsi: scsi_debug: Make read-only arrays static const scsi: core: sysfs: Correct sysfs attributes access rights
2025-08-16iio: adc: ti-tsc2046: use us_to_ktime() where appropriateXichao Zhao
Given scan_interval_us and time_per_scan_us are both in usecs, it makes more sense to use us_to_ktime() helper rather than converting to nanosecs as needed for ns_to_ktime(). Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://patch.msgid.link/20250813075556.466872-1-zhao.xichao@vivo.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2025-08-16iio: light: ltr390: Add device powerdown functionality via devm apiAkshay Jindal
Use devm_add_action_or_reset() to do cleanup when the device is removed. Signed-off-by: Akshay Jindal <akshayaj.lkd@gmail.com> Link: https://patch.msgid.link/20250814034544.93331-1-akshayaj.lkd@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2025-08-16iio: health: afe4404: Do not store dev pointer in device structAndrew Davis
The device *dev is only used in probe(), so no need to store it in the device local data struct. In all the places in probe() we did use that, just use a new local variable for the same. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://patch.msgid.link/20250813225840.576305-4-afd@ti.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2025-08-16iio: health: afe4403: Do not store dev pointer in device structAndrew Davis
The device *dev is only used in probe(), so no need to store it in the device local data struct. In all the places in probe() we did use that, just use a new local variable for the same. Signed-off-by: Andrew Davis <afd@ti.com> Link: https://patch.msgid.link/20250813225840.576305-1-afd@ti.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2025-08-16iio: remove unneeded 'fast_io' parameter in regmap_configWolfram Sang
When using MMIO with regmap, fast_io is implied. No need to set it again. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://patch.msgid.link/20250813161517.4746-6-wsa+renesas@sang-engineering.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>