summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2026-06-09nvmet: fix refcount leak in nvmet_sq_create()Wentao Liang
In nvmet_sq_create(), a reference on the ctrl is taken via kref_get_unless_zero() before calling nvmet_check_sqid(). If nvmet_check_sqid() fails, the function returns the error directly without releasing the reference, leading to a leak. Fix this by jumping to the "ctrl_put" label, which already performs the necessary nvmet_ctrl_put(ctrl). This ensures the reference is properly released on this error path. Cc: stable@vger.kernel.org Fixes: 1eb380caf527 ("nvmet: Introduce nvmet_sq_create() and nvmet_cq_create()") Signed-off-by: Wentao Liang <vulab@iscas.ac.cn> Signed-off-by: Keith Busch <kbusch@kernel.org>
2026-06-09PCI: meson: Add missing remove callbackShuvam Pandey
meson_pcie_probe() powers on the PHY and registers the DesignWare host bridge with dw_pcie_host_init(), but the driver has no remove callback. On driver unbind or module unload, the driver core therefore proceeds to devres cleanup without first unregistering the host bridge or powering off the PHY. Add a remove callback that deinitializes the DesignWare host bridge and powers off the PHY while device-managed resources are still valid. Fixes: 9c0ef6d34fdb ("PCI: amlogic: Add the Amlogic Meson PCIe controller driver") Signed-off-by: Shuvam Pandey <shuvampandey1@gmail.com> Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Link: https://patch.msgid.link/1a0c86ab264cdc1c79c917e984b90991af51d827.1779123847.git.shuvampandey1@gmail.com
2026-06-09PCI: meson: Propagate devm_add_action_or_reset() failureShuvam Pandey
meson_pcie_probe_clock() enables a clock and then registers a devres action to disable it during teardown. If devm_add_action_or_reset() fails, it runs the action immediately, disabling the clock. The return value is currently ignored, so on that failure path, meson_pcie_probe_clock() returns the disabled clock and probe continues. Return the error so the existing probe error path unwinds normally. Fixes: 9c0ef6d34fdbf ("PCI: amlogic: Add the Amlogic Meson PCIe controller driver") Signed-off-by: Shuvam Pandey <shuvampandey1@gmail.com> Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patch.msgid.link/177909148011.9588.6639767953842842291@gmail.com
2026-06-09virtio-blk: clamp zone report to the report buffer capacityMichael Bommarito
virtblk_report_zones() trusts the device-reported number of zones when walking the report buffer: nz = min_t(u64, virtio64_to_cpu(vblk->vdev, report->nr_zones), nr_zones); ... for (i = 0; i < nz && zone_idx < nr_zones; i++) { ret = virtblk_parse_zone(vblk, &report->zones[i], ...); The buffer is allocated by virtblk_alloc_report_buffer(), whose size is capped by the queue's max hardware sectors and max segments and can therefore hold fewer descriptors than nr_zones. nz is bounded only by the device-supplied report->nr_zones and the requested nr_zones, never by the buffer's descriptor capacity. At probe time the request count is unbounded (blk_revalidate_disk_zones() calls report_zones() with nr_zones == UINT_MAX), so the device-supplied report->nr_zones is the sole gate: a device that reports more zones than fit in the buffer drives the loop to read report->zones[i] past the end of the allocation. A malicious or buggy virtio-blk device that reports an inflated nr_zones triggers this during zone revalidation at probe. KASAN reports a vmalloc-out-of-bounds read in virtblk_report_zones() against the report buffer allocated a few lines earlier. Clamp nz to the number of descriptors that actually fit in the report buffer. Fixes: 95bfec41bd3d ("virtio-blk: add support for zoned block devices") Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Link: https://patch.msgid.link/20260607124834.3059944-1-michael.bommarito@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-06-09PCI: imx6: Assert ref_clk_en after reference clock stabilizes on i.MX95Richard Zhu
According to the PHY Databook Common Block Signals section, the ref_clk_en signal must remain de-asserted until the reference clock is running at the appropriate frequency. Once the clock is stable, ref_clk_en can be asserted. For lower power states where the reference clock to the PHY is disabled, ref_clk_en should also be de-asserted. Move the ref_clk_en bit manipulation into imx95_pcie_enable_ref_clk() to ensure the reference clock stabilizes before ref_clk_en is asserted and before the PHY reset is de-asserted. This aligns with the timing requirements specified in the PHY documentation. Fixes: d8574ce57d76 ("PCI: imx6: Add external reference clock input mode support") Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com> Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Reviewed-by: Frank Li <Frank.Li@nxp.com> Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20260518072715.3166514-3-hongxing.zhu@nxp.com
2026-06-09PCI: imx6: Configure REF_USE_PAD before PHY reset for i.MX95Richard Zhu
According to the i.MX95 PCIe PHY Databook, the ref_use_pad signal in the Common Block Signals section selects the reference clock source connected to the PHY pads. Per the specification, any change to this input must be followed by a PHY reset assertion to take effect. Move the REF_USE_PAD configuration before the PHY reset toggle to comply with the required initialization sequence. Fixes: 47f54a902dcd ("PCI: imx6: Toggle the core reset for i.MX95 PCIe") Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com> [mani: renamed the callback and helper to match the usecase] Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20260518072715.3166514-2-hongxing.zhu@nxp.com
2026-06-09gpio: gpio-ltc4283: Add support for the LTC4283 Swap ControllerNuno Sá
The LTC4283 device has up to 8 pins that can be configured as GPIOs. Note that PGIO pins are not set as GPIOs by default so if they are configured to be used as GPIOs we need to make sure to initialize them to a sane default. They are set as inputs by default. Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Linus Walleij <linusw@kernel.org> Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20260502-ltc4283-support-v13-3-1c206542e652@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: ltc4283: Add support for the LTC4283 Swap ControllerNuno Sá
Support the LTC4283 Hot Swap Controller. The device features programmable current limit with foldback and independently adjustable inrush current to optimize the MOSFET safe operating area (SOA). The SOA timer limits MOSFET temperature rise for reliable protection against overstresses. An I2C interface and onboard ADC allow monitoring of board current, voltage, power, energy, and fault status. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20260502-ltc4283-support-v13-2-1c206542e652@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09Merge tag 'mm-hotfixes-stable-2026-06-08-20-51' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc fixes from Andrew Morton: "11 hotfixes. 9 are for MM. 8 are cc:stable and the remaining 3 address post-7.1 issues or aren't considered suitable for backporting. Thre's a two-patch series "mm/damon/{reclaim,lru_sort}: handle ctx allocation failures" from SeongJae Park which fixes a couple of DAMON -ENOMEM bloopers. The rest are singletons - please see the individual changelogs for details" * tag 'mm-hotfixes-stable-2026-06-08-20-51' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: mm/mincore: handle non-swap entries before !CONFIG_SWAP guard arm64: mm: call pagetable dtor when freeing hot-removed page tables mm/list_lru: drain before clearing xarray entry on reparent mm/huge_memory: use correct flags for device private PMD entry mm/damon/lru_sort: handle ctx allocation failure mm/damon/reclaim: handle ctx allocation failure zram: fix use-after-free in zram_bvec_write_partial() MAINTAINERS: update Baoquan He's email address tools headers UAPI: sync linux/taskstats.h for procacct.c mm/cma_sysfs: skip inactive CMA areas in sysfs ipc/shm: serialize orphan cleanup with shm_nattch updates
2026-06-09hwmon: (pmbus/xdp720) Fix driver issues xdp720/730Ashish Yadav
Fix driver issues: - Add the missing regulator and property files in include - Declare XDP720_DEFAULT_RIMON as unsigned constant - Declare struct pmbus_driver_info xdp720_info as constant Signed-off-by: Ashish Yadav <ashish.yadav@infineon.com> Link: https://lore.kernel.org/r/20260609072231.15486-4-Ashish.Yadav@infineon.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (pmbus/xdp720) Add support for efuse xdp730Ashish Yadav
Adds support for the Infineon XDP730 Digital eFuse Controller by updating the existing XDP720 driver. Signed-off-by: Ashish Yadav <ashish.yadav@infineon.com> Link: https://lore.kernel.org/r/20260609072231.15486-3-Ashish.Yadav@infineon.com [groeck: Fixed conflicts in xdp720_id declaration] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (adt7462) Add of_match_table to support devicetreeKory Maincent
Add of_match_table to add support of devicetree probing. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com> [rgantois: Removed of_match_ptr().] Signed-off-by: Romain Gantois <romain.gantois@bootlin.com> Link: https://lore.kernel.org/r/20260608-adt7462-bindings-v2-1-272982c40325@bootlin.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (asus-ec-sensors) add ROG MAXIMUS Z790 EXTREMEBrian Downey
Add support for ROG MAXIMUS Z790 EXTREME Signed-off-by: Brian Downey <bdowne01@gmail.com> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20260608060855.40469-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (pmbus/max20860a) Add driver for Analog Devices MAX20860ASyed Arif
Add a PMBus driver for the Analog Devices MAX20860A step-down DC-DC switching regulator. The MAX20860A provides monitoring of input/output voltage, output current, and temperature via the PMBus interface using linear data format. Optional regulator support is available via CONFIG_SENSORS_MAX20860A_REGULATOR. Signed-off-by: Syed Arif <arif.syed@hpe.com> Signed-off-by: Sanman Pradhan <psanman@juniper.net> Link: https://lore.kernel.org/r/20260601184516.919488-3-sanman.pradhan@hpe.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (pmbus) Add support for Flex BMR316, BMR321, BMR350 and BMR351Daniel Nilsson
Add support for BMR316, BMR321, BMR350 and BMR351 DC/DC converter modules from Flex to the pmbus driver. Signed-off-by: Daniel Nilsson <linux@erq.se> Link: https://lore.kernel.org/r/20260603085712.659432-2-linux@erq.se [groeck: Resolved conflicts (explicit struct members in pmbus_id)] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: Use named initializers for platform_device_id arraysUwe Kleine-König (The Capable Hub)
Named initializers are better readable and more robust to changes of the struct definition. This robustness is relevant for a planned change to struct platform_device_id replacing .driver_data by an anonymous unit. While touching these arrays unify usage of commas. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Link: https://lore.kernel.org/r/25d38df8db42d69f33fa30267c9fd5ea058223d0.1779894738.git.u.kleine-koenig@baylibre.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (cros_ec) Drop unused assignment of platform_device_id driver dataUwe Kleine-König (The Capable Hub)
The driver explicitly set the .driver_data member of struct platform_device_id to zero without relying on that value. Drop this unused assignments. While touching this array unify spacing and use named initializers for .name. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org> Acked-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/972c9998054c7944f63266819d6fb08b36edb5c5.1779894738.git.u.kleine-koenig@baylibre.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (it87) Clamp negative values to zero in set_fan()Nikita Zhandarovich
set_fan() parses user input with kstrtol() and passes the resulting value to FAN16_TO_REG() on chips with 16-bit fan support. Negative fan speeds are not meaningful and should be rejected before conversion. Worst scenario, one may be able to abuse undefined behaviour of signed overflow to possibly induce rpm * 2 == 0 in FAN16_TO_REG(), thus causing a division by zero. Instead, clamp val < 0 to zero and keep the conversion in its valid input domain, avoiding unsafe arithmetic in the register conversion path. Found by Linux Verification Center (linuxtesting.org) with static analysis tool SVACE. Fixes: 17d648bf5786 ("it87: Add support for the IT8716F") Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru> Link: https://lore.kernel.org/r/20260529141839.1639287-1-n.zhandarovich@fintech.ru Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (asus-ec-sensors) add ROG STRIX B850-E GAMING WIFIEugene Shalygin
The board has a similar sensor configuration to the ROG STRIX B850-I GAMING WIFI, but includes an additional T-Sensor header. The patch was provided via GitHub [1]. [1] https://github.com/zeule/asus-ec-sensors/pull/105 Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20260607123626.100630-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (asus-ec-sensors) add ROG STRIX B650E-E GAMING WIFIVeronika Kossmann
Add support for ROG STRIX B650E-E GAMING WIFI Signed-off-by: Veronika Kossmann <nanodesuu@gmail.com> Co-developed-by: Oleg Tsvetkov <oleg-tsv@yandex.ru> Signed-off-by: Oleg Tsvetkov <oleg-tsv@yandex.ru> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20260607110702.84599-2-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (nct6683) Add support for ASRock Z890 Pro-AReiner Pröls
Add the ASRock Z890 Pro-A customer ID to the list of supported boards for the NCT6683 hardware monitoring driver. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Reiner Pröls <reiner.proels@gmail.com> Link: https://lore.kernel.org/r/20260521212632.223724-1-Reiner.Proels@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (adt7475) Add explicit header includeFlaviu Nistor
Since device_property_read_string() and similar functions defined in linux/property.h are used in the driver add explicit include for linux/mod_devicetable.h and linux/property.h rather than having implicit inclusions. Removed of_match_ptr() improving non-Device Tree compatibility of the driver and drop unnecessary __maybe_unused. Header linux/of.h can't be removed yet since macro is_of_node() is used. Signed-off-by: Flaviu Nistor <flaviu.nistor@gmail.com> Link: https://lore.kernel.org/r/20260522052352.12139-1-flaviu.nistor@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (lm63) expose PWM frequency and LUT hysteresis as writableJan-Henrik Bruhn
The driver caches the PWM frequency register and the CONFIG_FAN slow-clock select bit, but never lets userspace pick a different output frequency. Add a pwm1_freq sysfs attribute that selects the closest SCS + PFR combination for the requested value in Hz, gated by manual mode like set_pwm1(). PFR is clamped to 31 so that 2*PFR fits in the chip's 6-bit PWM register (matching the existing scaling assumption in show_pwm1). The hardware LUT hysteresis register is shared by all LUT entries, so the per-point pwm1_auto_pointN_temp_hyst attributes can't be made RW without N-to-1 cross-attribute side effects. Following the max31760 precedent, expose a single chip-wide pwm1_auto_point_temp_hyst attribute holding the hysteresis amount in millidegrees; the per-point attributes stay RO and continue to show the resulting absolute trip-down temperature for each entry. This was tested on a Linksys LGS328MPC switch hardware where the fan would not spin with the default PWM Frequency, which is why this change is required. Signed-off-by: Jan-Henrik Bruhn <kernel@jhbruhn.de> Link: https://lore.kernel.org/r/20260523133617.3439102-1-kernel@jhbruhn.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (pmbus/adm1266) add rtc debugfs entryAbdurrahman Hussain
The driver seeds the chip's SET_RTC register once at probe with ktime_get_real_seconds(). Over a long uptime the chip's internal seconds counter drifts away from the host's wall-clock time, so the timestamp embedded in each blackbox record stops being meaningful in wall-clock terms. The datasheet recommends that the host periodically resynchronise the counter to address this; today the driver has no userspace-facing knob for that. Expose SET_RTC via an rtc debugfs file alongside the other adm1266 debugfs entries: read -- returns the chip's current SET_RTC seconds counter, so userspace can observe how far the chip has drifted from host wall-clock without writing anything. write -- the kernel re-reads ktime_get_real_seconds() itself and pushes it to the chip. The write payload is ignored; userspace does not get to supply its own timestamp value, so there is no way for it to push a wrong time into the chip. A small userspace agent (chrony hook, systemd-timesyncd dispatch script, or a periodic cron job) can write to this file to keep the chip's counter aligned with wall-clock across long uptimes. Both the read and write paths take pmbus_lock to serialise against the pmbus_core's own PAGE+register sequences and against the other adm1266 debugfs accessors that already run under the same lock. While at it, drop the now-redundant adm1266_set_rtc() probe-time helper. The new adm1266_rtc_set() callback does exactly the same byte-packing and write; probe just calls adm1266_rtc_set(client, 0) (the ignored @val argument) after pmbus_do_probe() so the pmbus_lock acquired by the new helper has a live mutex to take. Signed-off-by: Abdurrahman Hussain <abdurrahman@nexthop.ai> Assisted-by: Claude-Code:claude-opus-4-7 Assisted-by: sashiko:gemini-3.1-pro-preview Link: https://lore.kernel.org/r/20260520-adm1266-v5-3-c72ef1fac1ea@nexthop.ai Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (pmbus/adm1266) add powerup_counter debugfs entryAbdurrahman Hussain
The ADM1266 maintains a 16-bit non-volatile POWERUP_COUNTER register (0xE4, datasheet Rev. D, Table 93) that increments on every power cycle and cannot be reset by the host. Each blackbox record already embeds the counter at record time, so the standalone live value is primarily useful for matching a captured record back to the boot it came from when correlating logs. Expose it as a read-only debugfs file alongside sequencer_state. The block-read returns two payload bytes in little-endian order. Take pmbus_lock around the block-read so the access serialises with any pmbus_core sequence that sets PAGE on the device. Without it, a PAGE write from another thread could interleave between a PAGE set and a paged read elsewhere in the driver and corrupt either side's view of the device state machine. Signed-off-by: Abdurrahman Hussain <abdurrahman@nexthop.ai> Assisted-by: Claude-Code:claude-opus-4-7 Assisted-by: sashiko:gemini-3.1-pro-preview Link: https://lore.kernel.org/r/20260520-adm1266-v5-2-c72ef1fac1ea@nexthop.ai Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (pmbus/adm1266) add clear_blackbox debugfs entryAbdurrahman Hussain
The ADM1266 blackbox can be configured in two recording modes via BLACKBOX_CONFIG[0]: cyclic, where the device overwrites the oldest record once the 32-record buffer fills, and single, where it stops recording until the buffer is cleared. Deployments that need to preserve the full record history across multiple fault episodes typically run in single mode and need a way to clear the buffer after the records have been collected. Expose a write-only debugfs file alongside sequencer_state. Writing any data to it issues the documented clear-blackbox sub-command: a 2-byte block-write to READ_BLACKBOX (0xDE) with payload {0xFE, 0x00} (datasheet Rev. D). The clear is taken under pmbus_lock because READ_BLACKBOX is also used by adm1266_nvmem_read_blackbox() to walk records one at a time; both paths run under pmbus_lock so the clear cannot interleave mid-iteration and corrupt the read sequence. Signed-off-by: Abdurrahman Hussain <abdurrahman@nexthop.ai> Assisted-by: Claude-Code:claude-opus-4-7 Assisted-by: sashiko:gemini-3.1-pro-preview Link: https://lore.kernel.org/r/20260520-adm1266-v5-1-c72ef1fac1ea@nexthop.ai Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (raspberrypi) Fix delayed-work teardown raceShubham Chakraborty
The delayed polling work rearms itself from the work function, so use explicit delayed-work setup and cleanup instead of devm_delayed_work_autocancel(). Initialize the delayed work with INIT_DELAYED_WORK() and register a devres cleanup action that calls disable_delayed_work_sync() during teardown. This addresses the concern raised during review about the polling work being able to requeue itself while the driver is being removed. Signed-off-by: Shubham Chakraborty <chakrabortyshubham66@gmail.com> Link: https://lore.kernel.org/r/20260517080445.103962-4-chakrabortyshubham66@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (raspberrypi) Add voltage input supportShubham Chakraborty
Extend the raspberrypi-hwmon driver to expose firmware-provided voltage measurements through the hwmon subsystem. The driver now exports the following voltage inputs: - in0_input (core) - in1_input (sdram_c) - in2_input (sdram_i) - in3_input (sdram_p) Voltage values returned by firmware are converted from microvolts to millivolts as expected by the hwmon subsystem. Update the documentation related to it. The existing undervoltage sticky alarm handling is preserved and associated with the first voltage channel. Tested in - - Raspberry Pi 3b+ (Linux raspberrypi 6.12.75+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.75-1+rpt1 (2026-03-11) aarch64 GNU/Linux) Signed-off-by: Shubham Chakraborty <chakrabortyshubham66@gmail.com> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Link: https://lore.kernel.org/r/20260517080445.103962-3-chakrabortyshubham66@gmail.com [groeck: Added missing empty line after declaration] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (lm75) Add explicit header includeFlaviu Nistor
Since device_property_read_string() is used in the probe function add explicit include for linux/mod_devicetable.h and linux/property.h rather than having implicit inclusions. Header linux/of.h can be removed and also of_match_ptr() improving non-Device Tree compatibility of the driver. Remove __maybe_unuse because it is not needed anymore. Signed-off-by: Flaviu Nistor <flaviu.nistor@gmail.com> Link: https://lore.kernel.org/r/20260518072337.4918-1-flaviu.nistor@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (adt7411) Use scoped_guard() to acquire the subsystem lockGuenter Roeck
Use scoped_guard() instead of hwmon_lock() / hwmon_unlock() to acquire and release the hardware monitoring subsystem lock. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (ina2xx) Use scoped_guard() to acquire the subsystem lockGuenter Roeck
Use scoped_guard() instead of hwmon_lock() / hwmon_unlock() to acquire and release the hardware monitoring subsystem lock. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (lm90) Use guard() and scoped_guard() to acquire subsystem lockGuenter Roeck
Use guard() and scoped_guard() instead of hwmon_lock() / hwmon_unlock() to acquire and release the hardware monitoring subsystem lock. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (pmbus/d1u74t) Add Murata D1U74T PSU driverAbdurrahman Hussain
Add PMBUS driver for Murata D1U74T power supplies. Signed-off-by: Abdurrahman Hussain <abdurrahman@nexthop.ai> Link: https://lore.kernel.org/r/20260514-d1u74t-v4-2-1f1ee7b002ec@nexthop.ai [groeck: Dropped inappropriate tags; added missing include files] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (coretemp) fix coding style issuesRoman Bakshansky
Address several coding style warnings reported by checkpatch.pl: - Replace <asm/processor.h> with <linux/processor.h> - Add missing blank lines after declarations - Combine split quoted strings - Reorder __initconst placement No functional change. Signed-off-by: Roman Bakshansky <bakshansky.lists@gmail.com> Link: https://lore.kernel.org/r/20260516114253.5466-3-bakshansky.lists@gmail.com [groeck: Dropped false positive change. Fixed various CHECK reports.] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (coretemp) replace hardcoded core count with dynamic valueRoman Bakshansky
The hardcoded maximum of 512 cores per package was first defined by commit 34cf8c657cf0 ("hwmon: (coretemp) Enlarge per package core count limit") and later kept as a fallback with a TODO in commit 1a793caf6f69 ("hwmon: (coretemp) Use dynamic allocated memory for core temp_data") because the actual per-package core count was not reliably available at the time. Now that topology_num_cores_per_package() is stable and suitable for use, it's time to complete the TODO and allocate only the needed amount of memory for core_data. Signed-off-by: Roman Bakshansky <bakshansky.lists@gmail.com> Link: https://lore.kernel.org/r/20260516114253.5466-2-bakshansky.lists@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (pmbus/adm1266) add firmware_revision debugfs entryAbdurrahman Hussain
The ADM1266 reports its firmware revision via the IC_DEVICE_REV manufacturer-specific block-read command (0xAE, datasheet Rev. D Table 80). The first three returned bytes are the firmware major.minor.patch fields. This is useful when correlating field behaviour against ADI release notes; expose it through debugfs alongside the existing sequencer_state entry. The standard PMBus MFR_REVISION (0x9B) register is already exposed by pmbus_core's debugfs auto-create path and reports the manufacturer revision, which is a separate thing from the firmware running on the device. Signed-off-by: Abdurrahman Hussain <abdurrahman@nexthop.ai> Link: https://lore.kernel.org/r/20260512-adm1266-v3-1-a81a479b0bb0@nexthop.ai [groeck: Squashed patch adding serialization with pmbus_lock] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (nct7802) Add time step attributes for tweaking responsivenessRonan Dalton
The nct7802 chip exposes two registers that allow setting the time interval between successive duty increases or decreases in Smart Fan mode. The units are intervals of 0.1 second. The default value at power on is 10, so 1 second. Add sysfs attributes for step_up_time and step_down_time to allow controlling the responsiveness of the fan speed. Values are represented as milliseconds to the user. When set, the value is clamped to the valid range of 100 to 25500 (0.1 to 25.5 seconds), and rounded to the nearest multiple of 100. Signed-off-by: Ronan Dalton <ronan.dalton@alliedtelesis.co.nz> Cc: linux-kernel@vger.kernel.org Cc: linux-hwmon@vger.kernel.org Cc: Guenter Roeck <linux@roeck-us.net> Cc: Chris Packham <chris.packham@alliedtelesis.co.nz> Link: https://lore.kernel.org/r/20260514003404.1548747-2-ronan.dalton@alliedtelesis.co.nz Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: Use named initializers for arrays of i2c_device_dataUwe 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 i2c_device_id that replaces .driver_data by an anonymous union. While touching all these arrays, unify indention and usage of commas. 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://lore.kernel.org/r/65b77bcd452752c36d866069cc5790b26d2bf8dc.1778688803.git.u.kleine-koenig@baylibre.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: Drop unused i2c driver_dataUwe Kleine-König (The Capable Hub)
The four drivers all don't make use of the value that was explicitly assigned to the .driver_data member. Drop the assignment. While touching these lines also make the assignments use named initializers and drop a comma after the end-of-list marker. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz> # For Link: https://lore.kernel.org/r/e8ceb3931975813545a8b478cc1a71b4ede9a6c0.1778688803.git.u.kleine-koenig@baylibre.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (pmbus/mp2869) Drop unjustified __maybe_unusedUwe Kleine-König (The Capable Hub)
mp2869_of_match is used unconditionally in mp2869_driver, so there is no need for the __maybe_unused marker. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Link: https://lore.kernel.org/r/3ec2ee181d4f5bfc48c3745f9ce4fdbd1e8fb01e.1778603083.git.ukleinek@kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (pmbus/mp2869) Remove unused driver dataUwe Kleine-König (The Capable Hub)
The driver doesn't make use of the i2c .driver_data and the of .data. So drop the useless and irritating assignments. While touching all these lines, use named initializers for the i2c device ids and convert to the most common usage of spacing in such arrays. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Link: https://lore.kernel.org/r/dcfcc82a93da77b55503998c5c7acf2a80c4a615.1778603083.git.ukleinek@kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (tmp102) Use device_property_read_string APIFlaviu Nistor
Replace of_property_read_string() with the preferded device_property_read_string() in the probe function to read the device label property, improving the driver compatibility since this method is not limited to Device Tree only. Also drop the now unnecessary __maybe_unused from tmp102_of_match. Signed-off-by: Flaviu Nistor <flaviu.nistor@gmail.com> Link: https://lore.kernel.org/r/20260510092543.12352-1-flaviu.nistor@gmail.com Link: https://lore.kernel.org/r/20260518122210.10288-1-flaviu.nistor@gmail.com [groeck: Combined API change with __maybe_unused patch] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: add driver for ARCTIC Fan ControllerAureo Serrano de Souza
Add hwmon driver for the ARCTIC Fan Controller, a USB HID device (VID 0x3904, PID 0xF001) with 10 fan channels. Exposes fan speed in RPM (read-only) and PWM duty cycle (0-255, read/write) via sysfs. The device pushes IN reports at ~1 Hz containing RPM readings. PWM is set via OUT reports; the device applies the new duty cycle and sends back a 2-byte ACK (Report ID 0x02). The driver waits up to 1 s for the ACK using a completion. Measured device latency: max ~563 ms over 500 iterations. PWM control is manual-only: the device never changes duty cycle autonomously. raw_event() may run in hardirq context, so fan_rpm[] is protected by a spinlock with irq-save. pwm_duty[] is also protected by this spinlock because reset_resume() clears it outside the hwmon core lock. The OUT report buffer is built and write_pending is armed under the same lock so that no reset_resume() can race with the pwm_duty[] snapshot. priv->buf is exclusively accessed by write(), which the hwmon core serializes. Signed-off-by: Aureo Serrano de Souza <aureo.serrano@arctic.de> Link: https://lore.kernel.org/r/20260508064405.38676-1-aureo.serrano@arctic.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (pmbus) add support for Delta E50SN12051Colin Huang
Add the pmbus driver for Delta E50SN12051 600W Non-isolated 1/8th Brick DCDC Power Modules. Signed-off-by: Colin Huang <u8813345@gmail.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20260508-add-e50sn12051-v5-3-abebdcc29665@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (pmbus/max20830) add driver for max20830Alexis Czezar Torreno
Add support for MAX20830 step-down DC-DC switching regulator with PMBus interface. It allows monitoring of input/output voltage, output current and temperature through the PMBus serial interface. Signed-off-by: Alexis Czezar Torreno <alexisczezar.torreno@analog.com> Link: https://lore.kernel.org/r/20260505-dev_max20830-v4-2-4343dcbfd7d7@analog.com [groeck: checkpatch cleanup (space before and after '-')] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (lm75) Support active-high alert polarityMarkus Stockhausen
LM75 devices supported by this driver support configurable active-high alert polarity. This is already documented in the devicetree description. Add support for it to the driver. Follow documentation and defensively enforce active-low if property is not set. This avoids possible inconsistencies for future devices with wrong parametrization. No API breakage as all current devices have their parameters set to active-low. Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de> Link: https://lore.kernel.org/r/20260504151020.462342-3-markus.stockhausen@gmx.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: Move MODULE_DEVICE_TABLE next to the table itselfKrzysztof Kozlowski
By convention MODULE_DEVICE_TABLE() immediately follows the ID table it exports, because this is easier to read and verify. It also makes more sense since #ifdef for ACPI or OF could hide both of them. Most of the privers already have this correctly placed, so adjust the missing ones. No functional impact. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Acked-by: Thomas Weißschuh <linux@weissschuh.net> # cros_ec_hwmon.c Link: https://lore.kernel.org/r/20260505102923.189289-2-krzysztof.kozlowski@oss.qualcomm.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (ads7871) Use DMA-safe buffer for SPI writesTabrez Ahmed
The driver currently passes a stack-allocated buffer to spi_write(), which is incompatible with DMA on systems with CONFIG_VMAP_STACK enabled. Move the transfer buffer into the driver's private data structure to ensure it is DMA-safe. Since this shared buffer now requires serialization, this change depends on the previous commit which migrated the driver to the hwmon 'with_info' API. While moving the logic, also: - Corrected the sign extension for 14-bit data by casting to s16. - Scaled the output to millivolts (2500mV full scale ) to comply with the hwmon ABI. Signed-off-by: Tabrez Ahmed <tabreztalks@gmail.com> Link: https://lore.kernel.org/r/20260502020844.110038-4-tabreztalks@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: (ads7871) Convert to hwmon_device_register_with_infoTabrez Ahmed
Convert the ads7871 driver from the legacy hwmon_device_register() to the modern hwmon_device_register_with_info() API. This migration simplifies the driver by using the structured hwmon_channel_info approach and prepares the codebase for the transition to a shared DMA-safe buffer. While at it, fix checkpatch violations. Signed-off-by: Tabrez Ahmed <tabreztalks@gmail.com> Link: https://lore.kernel.org/r/20260502020844.110038-3-tabreztalks@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-06-09hwmon: emc2305: Support configurable fan PWM at shutdownFlorin Leotescu
Some systems require fans to enter in a defined safe state during system shutdown or reboot handoff. Add support for the optional Device Tree property "fan-shutdown-percent" to configure the shutdown PWM duty cycle per fan output. If the property is present for a fan channel, the driver converts the configured percentage value to the corresponding PWM duty cycle and applies it during driver shutdown. If the property is not present, the fan state remains unchanged. Signed-off-by: Florin Leotescu <florin.leotescu@nxp.com> Link: https://lore.kernel.org/r/20260429065955.2113012-4-florin.leotescu@oss.nxp.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>