summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2026-08-10watchdog: qcom: report WDIOF_POWERUNDER in bootstatusKathiravan Thirumoorthy1-5/+13
On IPQ platforms, identify the restart reason as POWERUNDER, similar to CARDRESET, and expose it via the bootstatus sysfs interface. Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com> Link: https://lore.kernel.org/r/20260728-qcom_wdt_powerunder-v1-1-de8d9e964e7d@oss.qualcomm.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10watchdog: sprd: Remove redundant dev_err()Pan Chuang1-3/+1
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() call. Signed-off-by: Pan Chuang <panchuang@vivo.com> Link: https://lore.kernel.org/r/20260722084218.79073-10-panchuang@vivo.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10watchdog: sama5d4: Remove redundant dev_err()Pan Chuang1-3/+1
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() call. Signed-off-by: Pan Chuang <panchuang@vivo.com> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20260722084218.79073-9-panchuang@vivo.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10watchdog: realtek_otto: Remove redundant dev_err_probe()Pan Chuang1-1/+1
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://lore.kernel.org/r/20260722084218.79073-8-panchuang@vivo.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10watchdog: orion: Remove redundant dev_err()Pan Chuang1-6/+2
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() calls. Signed-off-by: Pan Chuang <panchuang@vivo.com> Link: https://lore.kernel.org/r/20260722084218.79073-7-panchuang@vivo.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10watchdog: marvell_gti: Remove redundant dev_err_probe()Pan Chuang1-1/+1
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://lore.kernel.org/r/20260722084218.79073-6-panchuang@vivo.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10watchdog: keembay: Remove redundant dev_err_probe()Pan Chuang1-2/+2
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() calls. Signed-off-by: Pan Chuang <panchuang@vivo.com> Link: https://lore.kernel.org/r/20260722084218.79073-5-panchuang@vivo.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10watchdog: intel-mid_wdt: Remove redundant dev_err()Pan Chuang1-3/+1
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() call. Signed-off-by: Pan Chuang <panchuang@vivo.com> Link: https://lore.kernel.org/r/20260722084218.79073-4-panchuang@vivo.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10watchdog: cadence_wdt: Remove redundant dev_err()Pan Chuang1-5/+1
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() call. Signed-off-by: Pan Chuang <panchuang@vivo.com> Link: https://lore.kernel.org/r/20260722084218.79073-3-panchuang@vivo.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10watchdog: bd96801_wdt: Remove redundant dev_err_probe()Pan Chuang1-2/+1
Since commit 55b48e23f5c4 ("genirq/devres: Add error handling in devm_request_*_irq()"), devm_request_threaded_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://lore.kernel.org/r/20260722084218.79073-2-panchuang@vivo.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10watchdog: take all OF aliases into account when assigning idRasmus Villemoes1-3/+23
If some, but not all, watchdog devices have device tree aliases, those without aliases might (depending on probe order) be assigned an id which would otherwise be assigned to one of those with an alias. This is problematic when for example watchdog0 is an alias for an always-running gpio watchdog that userspace must handle, but the SOC's watchdog device(s) get probed first and thus one of those become /dev/watchdog0, and then at some point later, the gpio watchdog device gets probed and becomes /dev/watchdog5. Ensure that ids for devices without a device tree alias are allocated from among those where no watchdogX alias exists. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Link: https://lore.kernel.org/r/20260714105356.2931450-1-linux@rasmusvillemoes.dk [groeck: Use scnprintf() instead of snprintf() to make gcc happy] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10watchdog: via_wdt: add missing MODULE_DEVICE_TABLE()Pengpeng Hou1-0/+1
The driver has a match table for the pci bus wired into its driver structure, but the table is not exported with MODULE_DEVICE_TABLE(). Add the missing MODULE_DEVICE_TABLE() entry so module alias information is generated for automatic module loading. This is a source-level fix. It does not claim dynamic hardware reproduction; the evidence is the driver-owned match table, its use by the driver registration structure, and the missing module alias publication. Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn> Link: https://lore.kernel.org/r/20260705001613.68871-1-pengpeng@iscas.ac.cn Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10watchdog: realtek-otto: Change to use regmap APIRustam Adilov2-36/+39
To make the realtek watchdog driver functional when SWAP_IO_SPACE config is enabled, change all of the register access to be done by regmap API which helps us to tweak endianness with big-endian or little-endian property from within the device tree node. Add the REGMAP_MMIO as a select to REALTEK_OTTO_WDT now that the regmap is used. Signed-off-by: Rustam Adilov <adilov@disroot.org> Link: https://lore.kernel.org/r/20260710074316.46643-2-adilov@disroot.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10watchdog: npcm: add bootstatus supportTomer Maimon1-2/+215
The NPCM750 uses RESSR and the NPCM845 uses INTCR2 to latch reset indications. Read those bits during probe and map them into watchdog bootstatus flags. For NPCM845, cache the sampled INTCR2 state in SCRPAD10 after the reset status bits are cleared so later probes can report the same boot-time state. Also report WDIOF_CARDRESET for the watchdog instance whose reset bit is latched, while leaving WPCM450 behavior unchanged. Signed-off-by: Tomer Maimon <tmaimon77@gmail.com> Link: https://lore.kernel.org/r/20260706144828.3517631-4-tmaimon77@gmail.com [groeck: Declare npcm750_data and npcm845_data with __maybe_unused] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10watchdog: lenovo_se30g2_se60_wdt: Watchdog for Lenovo SE30G2 and SE60Mark Pearson3-0/+302
Watchdog driver implementation for Lenovo SE30G2 and SE60 platforms. Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca> Link: https://lore.kernel.org/r/20260706145412.3833185-1-mpearson-lenovo@squebb.ca Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10watchdog: w83627hf_wdt: Use WDOG_HW_RUNNING for running chip on bootPaul Louvel1-0/+1
If the watchdog is already running when the driver is initialized, the driver currently refreshes it once using the default timeout of 60 seconds. Since commit ee142889e32f ("watchdog: Introduce WDOG_HW_RUNNING flag"), the watchdog core can kick an already running watchdog alive until userspace open the device. Add the WDOG_HW_RUNNING flag to the watchdog status if the watchdog is already running. Signed-off-by: Paul Louvel <paul.louvel@bootlin.com> Link: https://lore.kernel.org/r/20260707-w83627hf_wdt-nct6126d-v4-3-829e5f63d548@bootlin.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10watchdog: w83627hf_wdt: Report the probed chip name via WDIOC_GETSUPPORTPaul Louvel1-2/+4
The watchdog identity string reported via WDIOC_GETSUPPORT has always been hardcoded to "W83627HF Watchdog", even though this driver supports a wide range of Nuvoton/Winbond Super I/O chips. This is misleading, since the driver itself correctly log the chip name in wdt_init(), but could report later a different chip name with WDIOC_GETSUPPORT. Instead format the identity at probe time using the actual chip name that was detected. Signed-off-by: Paul Louvel <paul.louvel@bootlin.com> Link: https://lore.kernel.org/r/20260707-w83627hf_wdt-nct6126d-v4-2-829e5f63d548@bootlin.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10watchdog: w83627hf_wdt: Correctly identify Nuvoton NCT6126 chipPaul Louvel1-3/+12
Currently, the NCT6126 is probed as a NCT6116 because the NCT6126 shares the same high-byte chip ID as the NCT6116. Read the low byte of the chip ID as well to distinguish between the two devices and identify the NCT6126 correctly. Signed-off-by: Paul Louvel <paul.louvel@bootlin.com> Link: https://lore.kernel.org/r/20260707-w83627hf_wdt-nct6126d-v4-1-829e5f63d548@bootlin.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10watchdog: pretimeout: Add "dump" pretimeout governorTzung-Bi Shih4-2/+67
Add a new "dump" pretimeout governor that triggers a backtrace of all CPUs (via trigger_all_cpu_backtrace()) to the kernel log buffer. This provides diagnostic information right before the hardware watchdog fires. In addition, update the WATCHDOG_PRETIMEOUT_GOV_SEL Kconfig logic to fall back to the "panic" governor only when both "noop" and "dump" governors are disabled. Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org> Link: https://lore.kernel.org/r/20260707102105.3600275-1-tzungbi@kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10watchdog: Use named initializers for platform_device_id arraysUwe Kleine-König (The Capable Hub)3-12/+12
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 union. For one driver drop the unused assignment to .driver_data instead. While touching these arrays unify spacing and usage of commas. There is no effect on the compiled arrays. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Link: https://lore.kernel.org/r/22bc09d0c9c8dfe75a205b0a9ccc98ccfba1de10.1781622532.git.u.kleine-koenig@baylibre.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (asus-ec-sensors) add ROG STRIX Z390-E GAMINGRodrigo Araujo1-0/+2
The ROG STRIX Z390-E GAMING and Z390-F GAMING are essentially the same board apart from the E's onboard WiFi, so they share the same EC sensor layout. Signed-off-by: Rodrigo Araujo <araujo.rm@gmail.com> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20260809212705.1501382-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (sysfs) Allow drivers to register const attributesThomas Weißschuh1-3/+3
Switch to the __DEVICE_ATTR() macro which can handle callbacks taking both const and non-const attribute structure arguments. Allow the step-wise migration of the drivers. Also use container_of_const() over container_of() to avoid casting away the constness accidentally. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20260806-sysfs-const-attr-hwmon-v2-3-22fee8b85509@weissschuh.net [groeck: Squashed 'hwmon: (core) Constify PEC device attribute'] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (corsair-psu) Update documentationWilken Gottwalt2-3/+3
Add information about the HX1500i 2025 series and fix the missing HX1500i in Kbuild. Signed-off-by: Wilken Gottwalt <wilken.gottwalt@posteo.net> Link: https://lore.kernel.org/r/anVuBd8Bb7T66OUO@monster.localdomain Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (core) Use const APIs for the dynamically allocated sysfs attributesThomas Weißschuh1-27/+27
The non-const sysfs attribute APIs are going to go away at some point. Switch to the const variants to prepare for that. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20260806-sysfs-const-attr-hwmon-v2-2-22fee8b85509@weissschuh.net Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (core) Constify device attributesThomas Weißschuh1-8/+8
Mark the attribute structures as const, as they are never modified. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20260806-sysfs-const-attr-hwmon-v2-1-22fee8b85509@weissschuh.net Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (yogafan) Add support for new Lenovo modelsSergio Melas1-8/+61
Add DMI quirk entries and map correct ACPI paths and configurations for additional Lenovo laptop models including the LOQ 15IAX9, XiaoXin Pro 13ARE 2020, IdeaPad 3 15ALC6, Legion Pro 7 16AFR10H, Yoga Pro 7 14IAH10, and Yoga 7 16ARP8. Reorder the DMI quirk table to evaluate specific model matches before generic family fallbacks, preventing DMI shadowing. Signed-off-by: Sergio Melas <sergiomelas@gmail.com> Link: https://lore.kernel.org/r/20260806131103.19104-1-sergiomelas@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (adt7470) Add thermal zone sensor supportLuiz Angelo Daros de Luca1-0/+2
Register the ADT7470 temperature channels as thermal zone sensors. Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> Link: https://lore.kernel.org/r/20260805-adt7470_thermalzone-v6-4-5605a5f95467@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (adt7470) Expose fan control via PWM frameworkLuiz Angelo Daros de Luca2-1/+194
The ADT7470 features four PWM outputs designed to control fans. Previously, these were only accessible through the legacy hwmon sysfs interface. Expose the ADT7470 fan control lines through the generic PWM framework. This allows generic PWM consumers described in Device Tree, such as "pwm-fan", to use the device through the "#pwm-cells" property. This is particularly necessary for boards where the ADT7470 external temperature sensors are not populated and the chip is used strictly as a fan controller (e.g., Edgecore ECS-2100-52T switches). In such setups, delegating control to the generic PWM subsystem allows the kernel's thermal framework to manage the fans based on unrelated temperature zones, such as internal SoC sensors. When a PWM consumer applies a new PWM state, the driver automatically switches the corresponding PWM channel to manual mode so that the requested duty cycle takes effect. The duty cycle specified by the PWM framework is internally converted to the 0-255 scale expected by the hardware registers. To prevent conflicting access, the hwmon PWM sysfs attributes are hidden when the device is registered with PWM framework support (i.e. when "#pwm-cells" is present in DT and CONFIG_PWM is reachable). Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> Link: https://lore.kernel.org/r/20260805-adt7470_thermalzone-v6-3-5605a5f95467@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (adt7470) Add ADT7470_PWM_MAX macroLuiz Angelo Daros de Luca1-3/+4
Instead of a magic 255, use a macro to refer to it. Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> Link: https://lore.kernel.org/r/20260805-adt7470_thermalzone-v6-2-5605a5f95467@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (pmbus/ir36021) Use pmbus_read_smbus_i2c_block_data for block commandsGuenter Roeck1-15/+7
The driver uses i2c_smbus_read_i2c_block_data() for PMBus block commands. Use pmbus_read_smbus_i2c_block_data() instead to enable the driver to work with I2C controllers which do not support i2c_smbus_read_i2c_block_data(). Drop the functionality check to get an explicit error message if the required SMBus commands are not supported. Reviewed-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (pmbus/max20830) Use pmbus_read_smbus_i2c_block_data for block commandsGuenter Roeck1-30/+4
The driver tries to use both pmbus_read_smbus_i2c_block_data() and i2c_smbus_read_i2c_block_data() for PMBus block commands. Use pmbus_read_smbus_i2c_block_data() instead to simplify the code. Drop the functionality check to simplify the code and to trigger a return with -EOPNOTSUPP if SMBus block commands are not supported. Cc: Alexis Czezar Torreno <alexisczezar.torreno@analog.com> Cc: Nuno Sá <nuno.sa@analog.com> Reviewed-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (pmbus/ltc2978) Use pmbus_read_smbus_i2c_block_data for block commandsGuenter Roeck1-12/+9
The driver uses a mix of pmbus_read_smbus_i2c_block_data() and i2c_smbus_read_i2c_block_data() for PMBus block commands. Use pmbus_read_smbus_i2c_block_data() instead to enable the driver to work I2C controllers which do not support both block commands. Drop the functionality check to simplify the code and to trigger a return with -EOPNOTSUPP if SMBus block commands are not supported. As part of this patch, rework detection of LT7170 and LT7171. The return length of pmbus_read_smbus_i2c_block_data() may be less than the requested number of bytes, meaning the return length needs to be checked. Also, checking for "LT7170-1" after checking for "LT7170" and checking for "LT7171-1" after checking for "LT7171" is pointless since the first check will already produce a match, so drop the second part of the check. Cc: Alexis Czezar Torreno <alexisczezar.torreno@analog.com> Cc: Nuno Sá <nuno.sa@analog.com> Reviewed-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (pmbus/adm1275) Use pmbus_read_smbus_i2c_block_data for block commandsGuenter Roeck1-7/+2
The driver uses i2c_smbus_read_block_data() for PMBus block commands. Use pmbus_read_smbus_i2c_block_data() instead to enable the driver to work with I2C controllers which do not support i2c_smbus_read_block_data(). Drop the functionality check to get an explicit error message if the required SMBus commands are not supported. Reviewed-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (pmbus/core) Introduce pmbus_read_smbus_i2c_block_data()Guenter Roeck2-8/+91
PMBus drivers need support for reading SMBus block data. Unfortunately, not all i2C controllers support this command. Implement pmbus_read_smbus_i2c_block_data() which first tries to use i2c_smbus_read_block_data(). If not supported, try to emulate it by calling i2c_smbus_read_i2c_block_data(). Export the new function for use in PMBus drivers. Cc: Alexis Czezar Torreno <alexisczezar.torreno@analog.com> Cc: Nuno Sá <nuno.sa@analog.com> Reviewed-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (pmbus/mpq8646) Gate the writesVincent Jardin2-0/+308
The write cases of debugfs entries are provisioning and bench helpers. By designs the MPQ8646 powers the CPU core rail, so a wrong write can brown out the board or persist a bad setpoint into finite-cycle NVM. Said differently: some wrong register writes can and likely will physically damage or destroy the chip and/or the board. To be safe, it is disabled by default behind a CONFIG_SENSORS_MPQ8646_DEBUG_UNSAFE and we print an explicit warning banner at probe time when they are built in. Signed-off-by: Vincent Jardin <vjardin@free.fr> Link: https://lore.kernel.org/r/20260730-mpq8646_v0-v7-4-e7c7ad768d5d@free.fr Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (pmbus) Add MPQ8646 driverVincent Jardin3-0/+700
Add a new driver for the MPS MPQ8646 that is a PMBus device. Beyond basic PMBus telemetry, the driver adds: - alarm acknowledge via inX_reset_history. - STATUS_WORD MPS-extended bit decode and the NVM-backed PROTECTION_LAST post-mortem, exposed as a read-only debugfs decoder. - In-driver alarm-poll fallback work item (thanks lm90) for boards without SMBALERT Signed-off-by: Vincent Jardin <vjardin@free.fr> Link: https://lore.kernel.org/r/20260730-mpq8646_v0-v7-3-e7c7ad768d5d@free.fr Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (pmbus/core) export pmbus_check_and_notify_faults()Vincent Jardin2-3/+12
Factor of pmbus_fault_handler() into an exported helper so drivers can notify sequence from a polling work item on boards for which the chip's SMBALERT# pin is not wired to the CPU. The interrupt handler becomes a thin wrapper. Like the SMBALERT# path, the helper notifies and then clears the latched faults unconditionally, so a polling caller inherits exactly the interrupt semantics. Signed-off-by: Vincent Jardin <vjardin@free.fr> Link: https://lore.kernel.org/r/20260730-mpq8646_v0-v7-1-e7c7ad768d5d@free.fr Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (cros_ec) Avoid threshold temperature conversion overflowsThomas Weißschuh1-2/+7
If the EC returns non-sensical values the temperature conversions might overflow on 32-bit systems. As these values wouldn't make sense, clamp them to 255 degrees celsius. The machine would die before reaching that limit anyways. Suggested-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/lkml/0fbf7f69-bb90-4209-b9d5-258759711496@roeck-us.net/ Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20260730-cros_ec-hwmon-overflow-v3-1-c7198ba034ad@weissschuh.net Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (lm90) Switch channel parsing to fwnode APIsFlaviu Nistor1-26/+28
Replace OF property handling with fwnode in the probe function to read the channels properties, improving the driver compatibility since this method is not limited to Device Tree only. Add also the needed headers for explicit include and clean up related function naming. Signed-off-by: Flaviu Nistor <flaviu.nistor@gmail.com> Link: https://lore.kernel.org/r/20260730091409.10544-1-flaviu.nistor@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: remove tautological dependency expressions from KconfigLaszlo Ersek1-8/+0
Commit 554b3529fe01 ("thermal/drivers/core: Remove the module Kconfig's option") [1] obviated some of the "Optional dependencies" (as described in "Documentation/kbuild/kconfig-language.rst") in "drivers/hwmon/Kconfig". Namely, said commit restricted the valid/possible subset of the full Cartesian product "CONFIG_THERMAL x CONFIG_THERMAL_OF" to { (n, n), (y, n), (y, y) } through "drivers/thermal/Kconfig". Numerically (using tristate values), this set can be expressed as: { (0, 0), (2, 0), (2, 2) } Over this set, the "drivers/hwmon/Kconfig" tristate expression THERMAL || !THERMAL_OF or equivalently, max(THERMAL, 2-THERMAL_OF) invariably evaluates to "y" (2). Similarly, with THERMAL having been restricted to { n, y } or numerically, { 0, 2 } the "drivers/hwmon/Kconfig" tristate expression THERMAL || THERMAL=n or equivalently, max(THERMAL, THERMAL=0) invariably evaluates to "y" (2). (Note that "THERMAL=0" returns either "y" (2) or "n" (0).) Commit f37353320ee9 ("hwmon/drivers/core: Simplify complex dependency") [2], which is the final commit of the series that [1] is the beginning of, cleaned up the hwmon C source code in fact; however, it missed the now-collapsed dependencies in Kconfig. At the time of [2], six of today's such dependencies were present in Kconfig. Since then, two more have been added (such that they persist, anyway): one by commit 4f8d374b770a ("hwmon: (max6650) add thermal cooling device capability"), which was independent of the above-noted series, and another by commit 9855caf5d4eb ("hwmon: add driver for the hwmon parts of qnap-mcu devices"), which was a descendant of the series. Remove these always-"y" dependencies. Cc: Andrew Jeffery <andrew@codeconstruct.com.au> Cc: Cristian Marussi <cristian.marussi@arm.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Heiko Stuebner <heiko@sntech.de> Cc: Joel Stanley <joel@jms.id.au> Cc: Sudeep Holla <sudeep.holla@kernel.org> Cc: arm-scmi@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-aspeed@lists.ozlabs.org Cc: linux-hwmon@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Laszlo Ersek <laszlo.ersek@arm.com> Link: https://lore.kernel.org/r/20260729215436.2103380-1-laszlo.ersek@arm.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (pmbus/max20830): add support for max20830c and max20840cAlexis Czezar Torreno2-15/+25
Add support for MAX20830C and MAX20840 step-down DC-DC switching regulator with PMBus interface. MAX20830C is a different packaging for MAX20830, and MAX20840C supports 40A regulation compared to MAX20830 that is only 30A. Signed-off-by: Alexis Czezar Torreno <alexisczezar.torreno@analog.com> Link: https://lore.kernel.org/r/20260730-dev-max20830c-v5-4-a7553f84ee74@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (pmbus/max20830): add VOUT feedback resistor scaling supportAlexis Czezar Torreno1-1/+64
Implement support for external voltage divider scaling using the adi,vout-rfb1-ohms and adi,vout-rfb2-ohms device tree properties. When the desired output voltage exceeds VREF, a resistor divider (RFB1 and RFB2) is used to scale down the feedback voltage. The driver reads these resistor values from device tree and applies the scaling formula: VOUT_actual = VOUT_measured × (1 + RFB1/RFB2) The properties are optional. If not specified, the driver assumes no voltage divider is present and reports the raw VOUT reading. Signed-off-by: Alexis Czezar Torreno <alexisczezar.torreno@analog.com> Link: https://lore.kernel.org/r/20260730-dev-max20830c-v5-2-a7553f84ee74@analog.com [groeck: Fixed minor conflicts] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (pmbus) Let PMBus drivers report the supported PMBus revisionGuenter Roeck3-16/+44
Some PMBus chips do not support the PMBUS_REVISION command. Knowing the PMBUs revision supported by a chip is relevant for PMBUs core functionality, so add support for letting chip drivers report the PMBUs revision. Use the new capability to report the PMBus revision supported by MAX20830. While at it, add definitions for PMBUs revisons 1.3.1 and 1.4. Cc: Nuno Sá <nuno.sa@analog.com> Cc: Alexis Czezar Torreno <alexisczezar.torreno@analog.com> Reviewed-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (nzxt-kraken3) Add support for NZXT Kraken 2024 EliteSean Lyon1-1/+8
The Kraken 2024 Elite (USB ID 1e71:3012) is protocol-compatible with the existing Kraken 2023 devices and works with the current Z53 code paths. Add its USB product ID and map it to the KRAKEN2023 kind. Tested on hardware: liquid temperature and pump/fan speeds read correctly (cross-checked against liquidctl), and PWM control of both the pump and fan channels works as expected. Signed-off-by: Sean Lyon <sean@seanlyon.dev> Link: https://lore.kernel.org/r/20260728031127.26553-1-sean@seanlyon.dev Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (pmbus/vt7505) Add driver for Analog Devices MAX16545/MAX16550 and ↵Georgi Vlaev3-0/+297
Volterra VT7505 Add a PMBus driver for the Analog Devices MAX16545 and MAX16550, and the Volterra VT7505 controllers. The driver reports input/output voltage, input/output current, input power and temperature over PMBus. All values use the direct data format. Peak input voltage, output voltage, output current, input power and temperature readings are exposed and can be reset. The reported current and power depend on the external current-report resistor connected to the ILOAD pin, which can be provided through the "adi,rload-ohms" device tree property. On the MAX16550 and VT7505, the severe-OCP deglitch time can optionally be configured with the "adi,ocp-severe-filter-us" device tree property. When omitted, the existing hardware setting is left unchanged. Co-developed-by: Dhruva Devineni <ddevineni@juniper.net> Co-developed-by: Debjit Ghosh <dghosh@juniper.net> Co-developed-by: JawaharBalaji Thirumalaisamy <jawaharb@juniper.net> Co-developed-by: Avadhut Naik <avadhutn@juniper.net> Co-developed-by: Santhanakrishnan Balraj <sbalraj@juniper.net> Co-developed-by: Brian Mak <makb@juniper.net> Signed-off-by: Georgi Vlaev <gvlaev@juniper.net> Signed-off-by: Sanman Pradhan <psanman@juniper.net> Link: https://lore.kernel.org/r/20260725211945.288415-3-sanman.pradhan@hpe.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (kb9002) Add driver for Kandou KB9002 retimerAndy Chung3-0/+472
The Kandou KB9002 is an 8-lane PCIe 5.0 retimer that exposes an SMBus target with mandatory PEC. Add a hwmon driver reporting the firmware aggregated maximum die temperature as temp1_input, with the firmware version and boot status under debugfs. Signed-off-by: Andy Chung <Andy.Chung@amd.com> Link: https://lore.kernel.org/r/20260724-kb9002-upstream-v5-3-9523c3ffe83a@amd.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (pmbus/mp2975) Eliminate dead codeGuenter Roeck1-5/+0
Coverity reports dead code in mp2975_data2reg_linear11(). Code analysis shows that the parameter passed to the function is always non-negative. This means that negative values do not need to be handled, and the associated variable and conditional code can be removed. No functional impact or change. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (pmbus/ltc4283) Add missing MODULE_DEVICE_TABLE for OF match tablesurendra1-0/+1
The driver registers ltc4283_of_match as the platform driver's .of_match_table so the kernel probes the device when a DT node with compatible "adi,ltc4283" is present, but the corresponding MODULE_DEVICE_TABLE(of, ...) call is absent. Without it the module alias table (modules.alias) does not contain an "of:N*T*Cadi,ltc4283" entry, so udev / kmod cannot auto-load the module when the DT node appears, breaking modules-based deployments while built-in configurations happen to work by accident. Add the missing MODULE_DEVICE_TABLE() to fix module auto-loading. Fixes: dd63353a0b5e ("hwmon: ltc4283: Add support for the LTC4283 Swap Controller") Signed-off-by: surendra <kr494167@gmail.com> Link: https://lore.kernel.org/r/20260721055022.34629-1-kr494167@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (pmbus/max34440): Add support for MAX34452Carlos Jones Jr2-20/+60
Add support for Maxim MAX34452 PMBus 16-Channel V/I Monitor and 12-Channel Sequencer/Marginer. The device is similar to MAX34451 and shares the same configuration function. The MAX34452 supports: - 16 configurable voltage/current monitoring channels - 5 temperature sensors (pages 16-20) - Dynamic channel configuration via MFR_CHANNEL_CONFIG - IOUT average monitoring Signed-off-by: Carlos Jones Jr <carlosjr.jones@analog.com> Co-Developed by: Alexis Czezar Torreno <alexisczezar.torreno@analog.com> Signed-off-by: Alexis Czezar Torreno <alexisczezar.torreno@analog.com> Link: https://lore.kernel.org/r/20260722-max34451_fixes-v2-3-bbddb18ec1d6@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-10hwmon: (pmbus/max34440): add support for newer version of max34451Alexis Czezar Torreno1-4/+17
The MAX34451 released a newer version called max34451etna8+. This simply changes the direct format coefficients Signed-off-by: Alexis Czezar Torreno <alexisczezar.torreno@analog.com> Link: https://lore.kernel.org/r/20260722-max34451_fixes-v2-2-bbddb18ec1d6@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>