summaryrefslogtreecommitdiff
path: root/drivers/hwmon
AgeCommit message (Collapse)Author
25 hoursMerge tag 'hwmon-for-v7.2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: "New drivers for the following chips: - Analog Devices LTC4283 Swap Controller - Analog Devices MAX20830 - Analog Devices MAX20860A - ARCTIC Fan Controller - Delta E50SN12051 - Luxshare LX1308 - Microchip EMC1812/13/14/15/33 - Monolithic MP2985 - Murata D1U74T PSU New chip support added to existing drivers: - asus-ec-sensors: Support for ROG MAXIMUS Z790 EXTREME, ROG STRIX B850-E GAMING WIFI, and ROG STRIX B650E-E GAMING WIFI - dell-smm: Add Dell Latitude 7530 to fan control whitelist - nct6683: Support for ASRock Z890 Pro-A - pmbus: Support for Flex BMR316, BMR321, BMR350 and BMR351 - pmbus/max34440: Support for ADPM12250 - pmbus/xdp720: Support for Infineon xdp730, and fix driver issues reported by Sashiko New functionality: - Add support for update_interval_us chip attribute, and support it in ina238 driver - Add support for guard() and scoped_guard() for subsystem locks, and use it in adt7411, ina2xx, and lm90 drivers - emc2305: Support configurable fan PWM at shutdown - lm63: Expose PWM frequency and LUT hysteresis as writable - lm75: Support active-high alert polarity - nct7802: Add time step attributes for tweaking responsiveness - pmbus/adm1266: Add rtc debugfs entries for rtc, powerup_counter, clear_blackbox, and firmware_revision - raspberrypi: Fix delayed-work teardown race, add voltage input support as well as voltage domain IDs - mcp9982: Add support for reporting external diode faults Miscellaneous bug fixes, changes and improvements: - Use named initializers for platform_device_id arrays and i2c_device_data, and remove unused driver data - Various drivers: Move MODULE_DEVICE_TABLE next to the table itself - ads7871: Convert to hwmon_device_register_with_info(), and use DMA-safe buffer for SPI writes - adt7411: document supported sysfs attributes - adt7462: Add of_match_table to support devicetree - adt7475: Add explicit header include - coretemp; Fix outdated documentation, coding style issues, and replace hardcoded core count with dynamic value - cros_ec: Drop unused assignment of platform_device_id driver data - emc2305: Fix fan channel index handling - gpd-fan: Reject EC PWM value 0 as invalid, fix race condition between device removal and sysfs access, upgrade log level from warn to err for platform device creation failure, initialize EC before registering hwmon device, drop global driver data and use per-device allocation - htu31: document debugfs serial_number - ina238: Add support for samples and update_interval - it87: Clamp negative values to zero in set_fan() - lm75: Add explicit header include, Add explicit default cases in lm75_is_visible(), and add section for sysfs interface to documentation - pmbus/lm25066: Fix PMBus coefficients for LM5064/5066/5066i - tmp102: Use device_property_read_string API - tmp401: Read "ti,n-factor" as signed - Convert zyxel,nsa320-mcu to DT schema" * tag 'hwmon-for-v7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (81 commits) hwmon: tmp401: Read "ti,n-factor" as signed hwmon: (pmbus/lm25066) Fix PMBus coefficients for LM5064/5066/5066i hwmon: (gpd-fan) Reject EC PWM value 0 as invalid hwmon: (dell-smm) Add Dell Latitude 7530 to fan control whitelist hwmon: temperature: add support for EMC1812 dt-bindings: hwmon: temperature: add support for EMC1812 hwmon: (gpd-fan): fix race condition between device removal and sysfs access hwmon: (gpd-fan): upgrade log level from warn to err for platform device creation failure hwmon: (gpd-fan): Initialize EC before registering hwmon device hwmon: (gpd-fan): drop global driver data and use per-device allocation hwmon: (pmbus/max34440): add support adpm12250 hwmon: (ina238) Add update_interval_us attribute hwmon: Add update_interval_us chip attribute hwmon: (ina238) Add support for samples and update_interval gpio: gpio-ltc4283: Add support for the LTC4283 Swap Controller hwmon: ltc4283: Add support for the LTC4283 Swap Controller dt-bindings: hwmon: Document the LTC4283 Swap Controller hwmon: (pmbus/xdp720) Fix driver issues xdp720/730 hwmon: (pmbus/xdp720) Add support for efuse xdp730 dt-bindings: hwmon/pmbus: Add Infineon xdp730 ...
42 hoursMerge tag 'x86-cpu-2026-06-14' of ↵Linus Torvalds
gitolite.kernel.org:pub/scm/linux/kernel/git/tip/tip Pull x86 cpuid updates from Ingo Molnar: - CPUID API updates (Ahmed S. Darwish): - Introduce a centralized CPUID parser - Introduce a centralized CPUID data model - Introduce <asm/cpuid/leaf_types.h> - Rename cpuid_leaf()/cpuid_subleaf() APIs - treewide: Explicitly include the x86 CPUID headers - Update to x86-cpuid-db v3.1 (Maciej Wieczor-Retman) - Continued removal of pre-i586 support and related simplifications (Ingo Molnar) - Add Intel CPU model number for rugged Panther Lake (Tony Luck) - Misc fixes, updates and cleanups by Arnd Bergmann, Chao Gao, Lukas Bulwahn, Sohil Mehta, Maciej Wieczor-Retman. * tag 'x86-cpu-2026-06-14' of gitolite.kernel.org:pub/scm/linux/kernel/git/tip/tip: (25 commits) x86/cpu: Make CONFIG_X86_CX8 unconditional x86/cpu: Remove unused !CONFIG_X86_TSC code x86/cpuid: Update bitfields to x86-cpuid-db v3.1 tools/x86/kcpuid: Update bitfields to x86-cpuid-db v3.1 x86/cpu: Make CONFIG_X86_TSC unconditional MAINTAINERS: Drop obsolete FPU EMULATOR section x86/cpu: Fix a F00F bug warning and clean up surrounding code x86/cpu: Add Intel CPU model number for rugged Panther Lake x86/cpuid: Introduce a centralized CPUID parser x86/cpu: Introduce a centralized CPUID data model x86/cpuid: Introduce <asm/cpuid/leaf_types.h> x86/cpuid: Rename cpuid_leaf()/cpuid_subleaf() APIs x86/cpu: Do not include the CPUID API header in asm/processor.h Documentation: core-api/cpu_hotplug: Remove stale cpu0_hotplug docs x86/cpu, cpufreq: Remove AMD ELAN support x86/fpu: Remove the math-emu/ FPU emulation library x86/fpu: Remove the 'no387' boot option x86/fpu: Remove MATH_EMULATION and related glue code treewide: Explicitly include the x86 CPUID headers x86/cpu: Remove the CONFIG_X86_INVD_BUG quirk ...
42 hoursMerge tag 'x86-msr-2026-06-14' of ↵Linus Torvalds
gitolite.kernel.org:pub/scm/linux/kernel/git/tip/tip Pull x86/msr updates from Ingo Molnar: - Large series to reorganize the rdmsr/wrmsr APIs to remove 32-bit variants and convert to 64-bit variants (Juergen Gross) - Fix W=1 warning (HyeongJun An) * tag 'x86-msr-2026-06-14' of gitolite.kernel.org:pub/scm/linux/kernel/git/tip/tip: x86/msr: Remove wrmsrl() x86/msr: Switch wrmsrl() users to wrmsrq() x86/msr: Remove rdmsrl() x86/msr: Switch rdmsrl() users to rdmsrq() x86/msr: Remove wrmsr_safe_on_cpu() x86/msr: Switch wrmsr_safe_on_cpu() users to wrmsrq_safe_on_cpu() x86/msr: Remove rdmsr_safe_on_cpu() x86/msr: Switch rdmsr_safe_on_cpu() users to rdmsrq_safe_on_cpu() x86/msr: Don't use rdmsr_safe_on_cpu() in rdmsrq_safe_on_cpu() x86/msr: Remove wrmsr_on_cpu() x86/msr: Switch wrmsr_on_cpu() users to wrmsrq_on_cpu() x86/msr: Remove rdmsr_on_cpu() x86/msr: Switch rdmsr_on_cpu() users to rdmsrq_on_cpu() x86/msr: Remove rdmsrl_on_cpu() x86/msr: Switch rdmsrl_on_cpu() user to rdmsrq_on_cpu() x86/process: Convert rdmsr() to rdmsrq() in arch_post_acpi_subsys_init() to address W=1 warning
4 dayshwmon: tmp401: Read "ti,n-factor" as signedRob Herring (Arm)
The "ti,n-factor" binding and examples allow negative correction values. Reading it as u32 makes the helper type disagree with the documented signed value and hides real schema mismatches. Use the signed helper so the DT access matches the s32 value stored by the driver. Assisted-by: Codex:gpt-5-5 Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20260612215332.1889497-1-robh@kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
5 daysMerge back earlier thermal control material for 7.2Rafael J. Wysocki
6 dayshwmon: (pmbus/lm25066) Fix PMBus coefficients for LM5064/5066/5066iPotin Lai
Swap the high setting and low setting coefficients in the lm25066_coeff table for LM5064, LM5066, and LM5066i. The coefficients were previously mapped incorrectly, resulting in inverted current and power scaling. Additionally, dynamically assign the exponent (R) registers inside the probe's LM25066_DEV_SETUP_CL check. This ensures that the proper exponent is applied (e.g., for LM25056, high setting power exponent is -4, but low setting power exponent is -3). Signed-off-by: Potin Lai <potin.lai.pt@gmail.com> Link: https://lore.kernel.org/r/20260611-lm25066-driver-fix-v3-1-9d7d4b4e253d@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
6 dayshwmon: (gpd-fan) Reject EC PWM value 0 as invalidPei Xiao
The EC firmware is expected to return values in [1, pwm_max]. A read of 0 is illegal and would cause underflow in the conversion formula. Explicitly check for 0 and return -EIO. Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn> Link: https://lore.kernel.org/r/1c2ffa0d832ae3a74f6d4ffa7cc7b7e6cced69e3.1781138459.git.xiaopei01@kylinos.cn Signed-off-by: Guenter Roeck <linux@roeck-us.net>
6 dayshwmon: (dell-smm) Add Dell Latitude 7530 to fan control whitelistArmin Wolf
A user reported that the Dell Latitude 7530 needs to be whitelisted for the special SMM calls necessary for globally enabling/disabling BIOS fan control. Closes: https://github.com/Wer-Wolf/i8kutils/issues/17 Signed-off-by: Armin Wolf <W_Armin@gmx.de> Acked-by: Pali Rohár <pali@kernel.org> Link: https://lore.kernel.org/r/20260610180141.311503-1-W_Armin@gmx.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
6 dayshwmon: temperature: add support for EMC1812Marius Cristea
This is the hwmon driver for Microchip EMC1812/13/14/15/33 Multichannel Low-Voltage Remote Diode Sensor Family. EMC1812 has one external remote temperature monitoring channel. EMC1813 has two external remote temperature monitoring channels. EMC1814 has three external remote temperature monitoring channels, channels 2 and 3 support anti parallel diode. EMC1815 has four external remote temperature monitoring channels and channels 1/2 and 3/4 support anti parallel diode. EMC1833 has two external remote temperature monitoring channels and channels 1 and 2 support anti parallel diode. Resistance Error Correction is supported on channels 1/2 and 3/4. Signed-off-by: Marius Cristea <marius.cristea@microchip.com> Link: https://lore.kernel.org/r/20260610-hw_mon-emc1812-v11-2-cef809af5c19@microchip.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 dayshwmon: (gpd-fan): fix race condition between device removal and sysfs accessPei Xiao
Replace the manual gpd_fan_remove() callback with a devres-managed action using devm_add_action_or_reset(). The original remove hook resets the fan to AUTOMATIC mode, but the hwmon sysfs interface (registered with devm_hwmon_device_register_with_info()) remains active until after the remove callback completes. This creates a race window where a concurrent userspace sysfs access can interleave with the EC I/O sequence, potentially corrupting EC registers. Using devm_add_action_or_reset() registers the reset function as a devres action. Due to the LIFO release order of devres, the hwmon device is unregistered (sysfs removed) before the reset action executes, eliminating the race condition. Fixes: 0ab88e239439 ("hwmon: add GPD devices sensor driver") Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn> Link: https://lore.kernel.org/r/4400828422cf3a88adad4db224d9efccdb1049d2.1781055639.git.xiaopei01@kylinos.cn Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 dayshwmon: (gpd-fan): upgrade log level from warn to err for platform device ↵Pei Xiao
creation failure When platform_create_bundle() fails, the error is fatal and prevents the driver from loading. Use pr_err() instead of pr_warn() to clearly indicate a critical failure. Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn> Link: https://lore.kernel.org/r/aeb2eaa6df90178b18057a8022a0eccde7bbc82c.1781055639.git.xiaopei01@kylinos.cn Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 dayshwmon: (gpd-fan): Initialize EC before registering hwmon devicePei Xiao
Move the gpd_init_ec() call to before devm_hwmon_device_register_with_info in the probe function. With the previous ordering the hwmon device was registered and exposed to userspace before the EC initialization completes, creating a window where sysfs reads could return invalid values. Some buggy firmware won't initialize EC properly on boot. Before its initialization, reading RPM will always return 0, and writing PWM will have no effect. So move gpd_init_ec to before hwmon device register. Fixes: 0ab88e239439 ("hwmon: add GPD devices sensor driver") Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn> Link: https://lore.kernel.org/r/4be3734b135c8013157979ab5e80c7ee51243ddd.1781055639.git.xiaopei01@kylinos.cn Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 dayshwmon: (gpd-fan): drop global driver data and use per-device allocationPei Xiao
replace the global state gpd_driver_priv with per-device private data (struct gpd_fan_data) allocated in probe. This allows the driver to support multiple instances in the future and aligns with kernel best practices. No functional change intended. Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn> Link: https://lore.kernel.org/r/1cd3e13033fdd3d0f9b59322f7c86e350d113b92.1781055639.git.xiaopei01@kylinos.cn Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 dayshwmon: (pmbus/max34440): add support adpm12250Alexis Czezar Torreno
ADPM12250 is a quarter brick DC/DC Power Module. It is a high power non-isolated converter capable of delivering regulated 12V with continuous power level of 2500W. Uses PMBus. Signed-off-by: Alexis Czezar Torreno <alexisczezar.torreno@analog.com> Reviewed-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20260610-dev-adpm12250-v1-1-422760bb80da@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 dayshwmon: (ina238) Add update_interval_us attributeFerdinand Schwenk
The INA238 family supports eight conversion time steps from 50 us to 4120 us (SQ52206: 66 us to 8230 us). At the millisecond granularity of update_interval, the four shortest steps (50, 84, 150, 280 us) all round to the same value and cannot be individually selected. Add support for the generic update_interval_us attribute, which reports and programs the same ADC cycle time as update_interval but in microseconds, giving userspace full access to all conversion time steps. Both attributes reflect the total cycle time including the active averaging count: the reported value is the raw conversion time multiplied by the number of averaged samples, and writes apply the inverse mapping. Signed-off-by: Ferdinand Schwenk <ferdinand.schwenk@advastore.com> Link: https://lore.kernel.org/r/20260609-hwmon-ina238-update-interval-us-v2-v3-3-016b55567950@advastore.com [groeck: Fixed some multi-line alignment issues] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 dayshwmon: Add update_interval_us chip attributeFerdinand Schwenk
Some hardware monitoring chips support update intervals below one millisecond. The existing update_interval attribute uses millisecond granularity, which causes sub-millisecond steps to round to the same value and become inaccessible from userspace. Introduce update_interval_us, a companion chip-level attribute that expresses the same update interval in microseconds. Drivers implementing this attribute should also implement update_interval for compatibility with millisecond-based userspace interfaces. Signed-off-by: Ferdinand Schwenk <ferdinand.schwenk@advastore.com> Link: https://lore.kernel.org/r/20260609-hwmon-ina238-update-interval-us-v2-v3-2-016b55567950@advastore.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 dayshwmon: (ina238) Add support for samples and update_intervalFerdinand Schwenk
Expose INA238 ADC averaging count (AVG) and conversion timing (VBUSCT/VSHCT/VTCT) through chip-level hwmon attributes: chip/samples chip/update_interval Use per-chip conversion-time lookup tables so the same helpers work for INA228/INA237/INA238/INA700/INA780 and SQ52206. Cache ADC_CONFIG in driver data and update it on writes to avoid extra register reads during read-modify-write updates. Report update_interval in milliseconds as required by the hwmon ABI. Compute it from raw ADC cycle time multiplied by the active averaging count, and apply the inverse mapping on writes so programmed conversion time tracks the selected sample count. Clamp user-provided update_interval before unit scaling to prevent overflow in arithmetic conversions. Also combine chip attributes in HWMON_CHANNEL_INFO using a bitwise OR for a single logical chip channel. Signed-off-by: Ferdinand Schwenk <ferdinand.schwenk@advastore.com> Link: https://lore.kernel.org/r/20260609-hwmon-ina238-update-interval-us-v2-v3-1-016b55567950@advastore.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
8 dayshwmon: 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>
8 dayshwmon: (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>
8 dayshwmon: (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>
8 dayshwmon: (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>
8 dayshwmon: (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>
8 dayshwmon: (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>
8 dayshwmon: (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>
8 dayshwmon: 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>
8 dayshwmon: (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>
8 dayshwmon: (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>
8 dayshwmon: (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>
8 dayshwmon: (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>
8 dayshwmon: (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>
8 dayshwmon: (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>
8 dayshwmon: (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>
8 dayshwmon: (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>
8 dayshwmon: (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>
8 dayshwmon: (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>
8 dayshwmon: (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>
8 dayshwmon: (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>
8 dayshwmon: (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>
8 dayshwmon: (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>
8 dayshwmon: (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>
8 dayshwmon: (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>
8 dayshwmon: (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>
8 dayshwmon: (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>
8 dayshwmon: (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>
8 dayshwmon: (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>
8 dayshwmon: (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>
8 dayshwmon: 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>
8 dayshwmon: 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>
8 dayshwmon: (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>
8 dayshwmon: (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>