aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
AgeCommit message (Collapse)AuthorFilesLines
3 daysMerge tag 'hwmon-for-v6.19-take-2' of ↵Linus Torvalds3-12/+17
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes Guenter Roeck: - Documentation: Fix link to g762 devicetree binding - emc2305: Fix devicetree refcount leak and double put - dell-smm: Fix channel-index off-by-one error - w83791d: Convert macros to functions to avoid TOCTOU * tag 'hwmon-for-v6.19-take-2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: docs: hwmon: fix link to g762 devicetree binding hwmon: (emc2305) fix device node refcount leak in error path hwmon: (emc2305) fix double put in emc2305_probe_childs_from_dt hwmon: (dell-smm) Fix off-by-one error in dell_smm_is_visible() hwmon: (w83791d) Convert macros to functions to avoid TOCTOU
4 daysMerge tag 'i3c/for-6.19' of ↵Linus Torvalds1-4/+4
git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux Pull i3c updates from Alexandre Belloni: "HDR support has finally been added. mipi-i3c-hci has been reworked and Intel Nova Lake-S support has been added. Subsystem: - Add HDR transfer support Drivers: - dw: fix bus hang on Agilex5 - mipi-i3c-hci: Intel Nova Lake-S support, IOMMU support - svc: HDR support" * tag 'i3c/for-6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux: (28 commits) regmap: i3c: switch to use i3c_xfer from i3c_priv_xfer net: mctp i3c: switch to use i3c_xfer from i3c_priv_xfer hwmon: (lm75): switch to use i3c_xfer from i3c_priv_xfer i3c: document i3c_xfers i3c: fix I3C_SDR bit number i3c: master: svc: Add basic HDR mode support i3c: master: svc: Replace bool rnw with union for HDR support i3c: Switch to use new i3c_xfer from i3c_priv_xfer i3c: Add HDR API support i3c: master: add WQ_PERCPU to alloc_workqueue users i3c: master: Remove i3c_device_free_ibi from i3c_device_remove i3c: mipi-i3c-hci-pci: Set d3cold_delay to 0 for Intel controllers i3c: mipi-i3c-hci-pci: Add LTR support for Intel controllers i3c: mipi-i3c-hci-pci: Add exit callback i3c: mipi-i3c-hci-pci: Change callback parameter i3c: mipi-i3c-hci-pci: Allocate a structure for mipi_i3c_hci_pci device information i3c: mipi-i3c-hci-pci: Factor out intel_reset() i3c: mipi-i3c-hci-pci: Factor out private registers ioremapping i3c: mipi-i3c-hci-pci: Constify driver data i3c: mipi-i3c-hci-pci: Use readl_poll_timeout() ...
4 dayshwmon: (emc2305) fix device node refcount leak in error pathPei Xiao1-1/+3
The for_each_child_of_node() macro automatically manages device node reference counts during normal iteration. However, when breaking out of the loop early with return, the current iteration's node is not automatically released, leading to a reference count leak. Fix this by adding of_node_put(child) before returning from the loop when emc2305_set_single_tz() fails. This issue could lead to memory leaks over multiple probe cycles. Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn> Link: https://lore.kernel.org/r/tencent_5CDC08544C901D5ECA270573D5AEE3117108@qq.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
4 dayshwmon: (emc2305) fix double put in emc2305_probe_childs_from_dtPei Xiao1-3/+1
./drivers/hwmon/emc2305.c:597:4-15: ERROR: probable double put Device node iterators put the previous value of the index variable, so an explicit put causes a double put. Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn> Link: https://lore.kernel.org/r/tencent_CD373F952BE48697C949E39CB5EB77841D06@qq.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
4 dayshwmon: (dell-smm) Fix off-by-one error in dell_smm_is_visible()Armin Wolf1-2/+2
The documentation states that on machines supporting only global fan mode control, the pwmX_enable attributes should only be created for the first fan channel (pwm1_enable, aka channel 0). Fix the off-by-one error caused by the fact that fan channels have a zero-based index. Cc: stable@vger.kernel.org Fixes: 1c1658058c99 ("hwmon: (dell-smm) Add support for automatic fan mode") Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20251203202109.331528-1-W_Armin@gmx.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
4 dayshwmon: (w83791d) Convert macros to functions to avoid TOCTOUGui-Dong Han1-6/+11
The macro FAN_FROM_REG evaluates its arguments multiple times. When used in lockless contexts involving shared driver data, this leads to Time-of-Check to Time-of-Use (TOCTOU) race conditions, potentially causing divide-by-zero errors. Convert the macro to a static function. This guarantees that arguments are evaluated only once (pass-by-value), preventing the race conditions. Additionally, in store_fan_div, move the calculation of the minimum limit inside the update lock. This ensures that the read-modify-write sequence operates on consistent data. Adhere to the principle of minimal changes by only converting macros that evaluate arguments multiple times and are used in lockless contexts. Link: https://lore.kernel.org/all/CALbr=LYJ_ehtp53HXEVkSpYoub+XYSTU8Rg=o1xxMJ8=5z8B-g@mail.gmail.com/ Fixes: 9873964d6eb2 ("[PATCH] HWMON: w83791d: New hardware monitoring driver for the Winbond W83791D") Cc: stable@vger.kernel.org Signed-off-by: Gui-Dong Han <hanguidong02@gmail.com> Link: https://lore.kernel.org/r/20251202180105.12842-1-hanguidong02@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7 daysMerge tag 'hwmon-for-v6.19' of ↵Linus Torvalds81-1112/+2953
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: "New drivers: - Apple Silicon SMC - TSC1641 I2C power monitor - MPS MP9945 - MAX17616 - MP2925 and MP2929 Added support for new devices to existing drivers: - dell-smm: Add Dell G5 5505 to fan control whitelist - aspeed-g6-pwm-tach: Support for AST2700 - asus-ec-sensors: Support for ROG STRIX X470-I GAMING, ROG STRIX X870-F GAMING WIFI, ROG STRIX X870E-H GAMING WIFI7, and Pro WS TRX50-SAGE WIFI - k10temp: Support for AMD Steam Deck APU ID - pmbus/isl68137: Support for raa229141 - aht10: Support for dht20 - adt7410: Support for ADT7422 - peci: Support for Intel Emerald Rapids - nct6775: Support for ASUS ROG STRIX X870E-H GAMING WIFI7 - pmbus/max34440: Support for ADPM12200 - ntc-thermistor: Support for Murata ncp18wm474 Infrastructure updates: - Utilize subsystem locking in various drivers - ltc4282, ltc2947: Use the new energy64 attribute Bug fixes: - Various drivers: Fixes to avoid TOCTOU, mostly in macro functions evaluating parameters multiple times, as well as missing locks - max6697: Fix regmap leak on probe failure - sy7636a: Fix regulator_enable resource leak on error path - asus-ec-sensors: Correct Pro WS TRX50-SAGE WIFI entry Other changes and improvements: - w83781d, lm78: Drop REALLY_SLOW_IO - Fix broken datasheet links in various drivers And various other minor fixes and improvements" * tag 'hwmon-for-v6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (110 commits) hwmon: (dell-smm) Add Dell G5 5505 to fan control whitelist hwmon: (max16065) Use local variable to avoid TOCTOU hwmon: (w83l786ng) Convert macros to functions to avoid TOCTOU hwmon: (max6697) fix regmap leak on probe failure hwmon/w83781d: Drop REALLY_SLOW_IO setting hwmon/lm78: Drop REALLY_SLOW_IO setting hwmon: sy7636a: Fix regulator_enable resource leak on error path hwmon: (adm1026) Convert macros to functions to avoid TOCTOU hwmon: (adm1029) Add locking to avoid TOCTOU hwmon: (lm87) Convert macros to functions to avoid TOCTOU hwmon: (asus-ec-sensors) correct Pro WS TRX50-SAGE WIFI entry hwmon: (vt8231) Convert macros to functions to avoid TOCTOU hwmon: (emc2103) Add locking to avoid TOCTOU hwmon: (aspeed-g6-pwm-tach): Add AST2700 compatible string dt-bindings: hwmon: Add AST2700 compatible hwmon: (asus-ec-sensors) add ROG STRIX X470-I GAMING hwmon: (vt1211) Convert macros to functions to avoid TOCTOU hwmon: (k10temp) Add AMD Steam Deck APU ID hwmon: Add Apple Silicon SMC hwmon driver Documentation/hwmon: Fix broken datasheet links for zl6100 ...
9 dayshwmon: (lm75): switch to use i3c_xfer from i3c_priv_xferFrank Li1-4/+4
Switch to use i3c_xfer instead of i3c_priv_xfer because framework will update to support HDR mode. i3c_priv_xfer is now an alias of i3c_xfer. Replace i3c_device_do_priv_xfers() with i3c_device_do_xfers(..., I3C_SDR) to align with the new API. Prepare for removal of i3c_priv_xfer and i3c_device_do_priv_xfers(). Signed-off-by: Frank Li <Frank.Li@nxp.com> Acked-by: Guenter Roeck <linux@roeck-us.net> Link: https://patch.msgid.link/20251028-lm75-v1-1-9bf88989c49c@nxp.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
10 dayshwmon: (dell-smm) Add Dell G5 5505 to fan control whitelistGabriel Marcano1-0/+9
Allow manual PWM control on Dell G5 5505 (and SE). Signed-off-by: Gabriel Marcano <gabemarcano@yahoo.com> Link: https://lore.kernel.org/r/20251128191650.6191-1-gabemarcano@yahoo.com Acked-by: Pali Rohár <pali@kernel.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
13 dayshwmon: (max16065) Use local variable to avoid TOCTOUGui-Dong Han1-3/+4
In max16065_current_show, data->curr_sense is read twice: once for the error check and again for the calculation. Since i2c_smbus_read_byte_data returns negative error codes on failure, if the data changes to an error code between the check and the use, ADC_TO_CURR results in an incorrect calculation. Read data->curr_sense into a local variable to ensure consistency. Note that data->curr_gain is constant and safe to access directly. This aligns max16065_current_show with max16065_input_show, which already uses a local variable for the same reason. Link: https://lore.kernel.org/all/CALbr=LYJ_ehtp53HXEVkSpYoub+XYSTU8Rg=o1xxMJ8=5z8B-g@mail.gmail.com/ Fixes: f5bae2642e3d ("hwmon: Driver for MAX16065 System Manager and compatibles") Cc: stable@vger.kernel.org Signed-off-by: Gui-Dong Han <hanguidong02@gmail.com> Link: https://lore.kernel.org/r/20251128124709.3876-1-hanguidong02@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
13 dayshwmon: (w83l786ng) Convert macros to functions to avoid TOCTOUGui-Dong Han1-8/+18
The macros FAN_FROM_REG and TEMP_FROM_REG evaluate their arguments multiple times. When used in lockless contexts involving shared driver data, this causes Time-of-Check to Time-of-Use (TOCTOU) race conditions. Convert the macros to static functions. This guarantees that arguments are evaluated only once (pass-by-value), preventing the race conditions. Adhere to the principle of minimal changes by only converting macros that evaluate arguments multiple times and are used in lockless contexts. Link: https://lore.kernel.org/all/CALbr=LYJ_ehtp53HXEVkSpYoub+XYSTU8Rg=o1xxMJ8=5z8B-g@mail.gmail.com/ Fixes: 85f03bccd6e0 ("hwmon: Add support for Winbond W83L786NG/NR") Cc: stable@vger.kernel.org Signed-off-by: Gui-Dong Han <hanguidong02@gmail.com> Link: https://lore.kernel.org/r/20251128123816.3670-1-hanguidong02@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-11-27hwmon: (max6697) fix regmap leak on probe failureJohan Hovold1-1/+1
The i2c regmap allocated during probe is never freed. Switch to using the device managed allocator so that the regmap is released on probe failures (e.g. probe deferral) and on driver unbind. Fixes: 3a2a8cc3fe24 ("hwmon: (max6697) Convert to use regmap") Cc: stable@vger.kernel.org # 6.12 Cc: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://lore.kernel.org/r/20251127134351.1585-1-johan@kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-11-26hwmon/w83781d: Drop REALLY_SLOW_IO settingJuergen Gross1-2/+3
In w83781d_isa_found() there is REALLY_SLOW_IO defined around some port accesses, probably in order to wait between multiple accesses. Unfortunately this isn't making any difference compared to not having this define since more than a decade, as REALLY_SLOW_IO needs to be defined while "#include <asm/io.h>" is called to have an effect. As there seem not to be any outstanding issues in spite of this having no effect, just drop the "#define" and add a remark to the related comment. Signed-off-by: Juergen Gross <jgross@suse.com> Link: https://lore.kernel.org/r/20251126162018.5676-4-jgross@suse.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-11-26hwmon/lm78: Drop REALLY_SLOW_IO settingJuergen Gross1-2/+3
In lm78_isa_found() there is REALLY_SLOW_IO defined around some port accesses, probably in order to wait between multiple accesses. Unfortunately this isn't making any difference compared to not having this define since more than a decade, as REALLY_SLOW_IO needs to be defined while "#include <asm/io.h>" is called to have an effect. As there seem not to be any outstanding issues in spite of this having no effect, just drop the "#define" and add a remark to the related comment. Signed-off-by: Juergen Gross <jgross@suse.com> Link: https://lore.kernel.org/r/20251126162018.5676-3-jgross@suse.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-11-26hwmon: sy7636a: Fix regulator_enable resource leak on error pathHaotian Zhang1-6/+1
In sy7636a_sensor_probe(), regulator_enable() is called but if devm_hwmon_device_register_with_info() fails, the function returns without calling regulator_disable(), leaving the regulator enabled and leaking the reference count. Switch to devm_regulator_get_enable() to automatically manage the regulator resource. Fixes: de34a4053250 ("hwmon: sy7636a: Add temperature driver for sy7636a") Suggested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn> Link: https://lore.kernel.org/r/20251126162602.2086-1-vulab@iscas.ac.cn Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-11-26hwmon: (adm1026) Convert macros to functions to avoid TOCTOUGui-Dong Han1-4/+12
The macro FAN_FROM_REG evaluates its arguments multiple times. When used in lockless contexts involving shared driver data, this causes Time-of-Check to Time-of-Use (TOCTOU) race conditions. Convert the macro to a static function. This guarantees that arguments are evaluated only once (pass-by-value), preventing the race conditions. Adhere to the principle of minimal changes by only converting macros that evaluate arguments multiple times and are used in lockless contexts. Link: https://lore.kernel.org/all/CALbr=LYJ_ehtp53HXEVkSpYoub+XYSTU8Rg=o1xxMJ8=5z8B-g@mail.gmail.com/ Signed-off-by: Gui-Dong Han <hanguidong02@gmail.com> Link: https://lore.kernel.org/r/20251126113828.10003-1-hanguidong02@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-11-26hwmon: (adm1029) Add locking to avoid TOCTOUGui-Dong Han1-0/+3
The function fan_show checks shared data for zero or invalid values before using it as a divisor. These accesses are currently lockless. If the data changes to zero between the check and the division, it causes a divide-by-zero error. Explicitly acquire the update lock around these checks and calculations to ensure the data remains stable, preventing Time-of-Check to Time-of-Use (TOCTOU) race conditions. Link: https://lore.kernel.org/all/CALbr=LYJ_ehtp53HXEVkSpYoub+XYSTU8Rg=o1xxMJ8=5z8B-g@mail.gmail.com/ Signed-off-by: Gui-Dong Han <hanguidong02@gmail.com> Link: https://lore.kernel.org/r/20251126114047.10039-1-hanguidong02@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-11-26hwmon: (lm87) Convert macros to functions to avoid TOCTOUGui-Dong Han1-5/+11
The macro FAN_FROM_REG evaluates its arguments multiple times. When used in lockless contexts involving shared driver data, this causes Time-of-Check to Time-of-Use (TOCTOU) race conditions. Convert the macro to a static function. This guarantees that arguments are evaluated only once (pass-by-value), preventing the race conditions. Adhere to the principle of minimal changes by only converting macros that evaluate arguments multiple times and are used in lockless contexts. Link: https://lore.kernel.org/all/CALbr=LYJ_ehtp53HXEVkSpYoub+XYSTU8Rg=o1xxMJ8=5z8B-g@mail.gmail.com/ Signed-off-by: Gui-Dong Han <hanguidong02@gmail.com> Link: https://lore.kernel.org/r/20251126113542.9968-1-hanguidong02@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-11-24hwmon: (asus-ec-sensors) correct Pro WS TRX50-SAGE WIFI entry小太1-7/+19
Add missing temperature and fan sensors to Pro WS TRX50-SAGE WIFI Also: - Format VRM names to match the BIOS - Fix swapped VRM_E and VRM_W entries Signed-off-by: 小太 <nospam@kota.moe> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20251125040140.277756-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-11-24hwmon: (vt8231) Convert macros to functions to avoid TOCTOUGui-Dong Han1-6/+12
The macro FAN_FROM_REG evaluates its arguments multiple times. When used with shared driver data, this leads to Time-of-Check to Time-of-Use (TOCTOU) race conditions, potentially causing divide-by-zero errors. Convert the macro to a static function to ensure arguments are evaluated only once. Additionally, in fan_div_store, move the reading of the old register value and the calculation of the minimum limit inside the update lock. This ensures that the read-modify-write sequence operates on consistent data, preventing race conditions during fan divider updates. Link: https://lore.kernel.org/all/CALbr=LYJ_ehtp53HXEVkSpYoub+XYSTU8Rg=o1xxMJ8=5z8B-g@mail.gmail.com/ Signed-off-by: Gui-Dong Han <hanguidong02@gmail.com> Link: https://lore.kernel.org/r/20251124165900.4713-1-hanguidong02@gmail.com [groeck: Dropped unnecessary line split] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-11-24hwmon: (emc2103) Add locking to avoid TOCTOUGui-Dong Han1-0/+4
The functions fan1_input_show and fan1_target_show check shared data for zero before using it as a divisor. These accesses are currently lockless. If the data changes to zero between the check and the division, it causes a divide-by-zero error. Explicitly acquire the update lock around these checks and calculations to ensure the data remains stable, preventing Time-of-Check to Time-of-Use (TOCTOU) race conditions. Link: https://lore.kernel.org/all/CALbr=LYJ_ehtp53HXEVkSpYoub+XYSTU8Rg=o1xxMJ8=5z8B-g@mail.gmail.com/ Signed-off-by: Gui-Dong Han <hanguidong02@gmail.com> Link: https://lore.kernel.org/r/20251124165508.4667-1-hanguidong02@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-11-21hwmon: (aspeed-g6-pwm-tach): Add AST2700 compatible stringBilly Tsai1-0/+3
Extends device tree support to include the AST2700 chip variant by adding its compatible string to the device match table. The AST2700 PWM/TACH hardware is compatible with the existing driver implementation used for AST2600. Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com> Link: https://lore.kernel.org/r/20251120-upstream_pwm_tach-v3-2-eaa2f9b300a2@aspeedtech.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-11-21hwmon: (asus-ec-sensors) add ROG STRIX X470-I GAMINGRené Rebe1-0/+10
Add support for ROG STRIX X470-I GAMING Signed-off-by: René Rebe <rene@exactco.de> Reviewed-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20251120.140009.210830394703243387.rene@exactco.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-11-21hwmon: (vt1211) Convert macros to functions to avoid TOCTOUGui-Dong Han1-18/+35
The macros IN_FROM_REG, TEMP_FROM_REG, and RPM_FROM_REG evaluate their arguments multiple times. These macros are used in lockless show functions involving shared driver data, leading to Time-of-Check to Time-of-Use race conditions. For example, RPM_FROM_REG checks if a value is 0 or 255, and then uses it in a division. If the value is modified by another thread to 0 after the check but before the division, it causes a divide-by-zero error. Convert these macros to static functions. This guarantees that arguments are evaluated only once (pass-by-value), fixing the race conditions. Adhere to the principle of minimal changes by only converting the specific macros involved in these lockless contexts. Link: https://lore.kernel.org/all/CALbr=LYJ_ehtp53HXEVkSpYoub+XYSTU8Rg=o1xxMJ8=5z8B-g@mail.gmail.com/ Signed-off-by: Gui-Dong Han <hanguidong02@gmail.com> Link: https://lore.kernel.org/r/20251120041331.1917570-1-hanguidong02@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-11-18hwmon: (k10temp) Add AMD Steam Deck APU IDRené Rebe1-0/+7
Add AMD Custom APU 0405 PCI ID as used in the Valve Steam Deck to k10temp. Signed-off-by: René Rebe <rene@exactco.de> Link: https://lore.kernel.org/r/20251117.195048.691713748773231900.rene@exactco.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-11-18hwmon: Add Apple Silicon SMC hwmon driverJames Calligeros3-0/+864
The System Management Controller on Apple Silicon devices is responsible for integrating and exposing the data reported by the vast array of hardware monitoring sensors present on these devices. It is also responsible for fan control, and allows users to manually set fan speeds if they so desire. Add a hwmon driver to expose current, power, temperature, and voltage monitoring sensors, as well as fan speed monitoring and control via the SMC on Apple Silicon devices. The SMC firmware has no consistency between devices, even when they share an SoC. The FourCC keys used to access sensors are almost random. An M1 Mac mini will have different FourCCs for its CPU core temperature sensors to an M1 MacBook Pro, for example. For this reason, the valid sensors for a given device are specified in a child of the SMC Devicetree node. The driver uses this information to determine which sensors to make available at runtime. Reviewed-by: Neal Gompa <neal@gompa.dev> Acked-by: Guenter Roeck <linux@roeck-us.net> Co-developed-by: Janne Grunau <j@jannau.net> Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: James Calligeros <jcalligeros99@gmail.com> Link: https://lore.kernel.org/r/20251112-macsmc-subdevs-v5-6-728e4b91fe81@gmail.com [groeck: Added Documentation to index] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-11-13hwmon: (corsair-cpro) Replace magic values with constantsMarius Zachmann1-2/+2
Replace two magic values in ccp_device with existing constants. Signed-off-by: Marius Zachmann <mail@mariuszachmann.de> Link: https://lore.kernel.org/r/20251113100024.11103-3-mail@mariuszachmann.de [groeck: Updated subject to include subsystem/driver] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-11-13hwmon: (corsair-cpro) Read temperature as a signed valueMarius Zachmann1-2/+2
Convert temperature to s16 to correctly read negative temperatures. Signed-off-by: Marius Zachmann <mail@mariuszachmann.de> Link: https://lore.kernel.org/r/20251113100024.11103-2-mail@mariuszachmann.de [groeck: Updated subject, coding style] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-11-13hwmon: (tmp421) Remove duplicate return in switch-caseBruno Thomsen1-1/+0
Use single read permission return in switch-case that handles attributes in tmp421_is_visible(). Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com> Link: https://lore.kernel.org/r/20251111144406.7489-2-bruno.thomsen@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-11-13hwmon: (tmp421) Check error when loading label from dtBruno Thomsen1-1/+5
Add error checking when loading temperature channel label defined in device tree. Handling of error from of_property_read_string() is inspired by lm90 driver and therefor contain same error string. Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com> Link: https://lore.kernel.org/r/20251111144406.7489-1-bruno.thomsen@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-11-12hwmon/pmbus: (isl68137) Add support for raa229141Jeff Lin1-0/+14
The RAA229141A is a digital dual output multiphase (X+Y ≤ 12) PWM controller designed to be compliant with Intel VR13, VR13.HC, VR14 and VR14.Cloud specifications, targeting VCORE and auxiliary rails. The RAA229141A supports the Intel SVID interface along with PMBus V1.3 specifications, making it ideal for controlling the microprocessor core and system rails in Intel VR13, VR13.HC, VR14 and VR14.Cloud platforms. Signed-off-by: Jeff Lin <jefflin994697@gmail.com> Link: https://lore.kernel.org/r/20251106104519.2014853-1-jefflin994697@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-11-12hwmon: Add TSC1641 I2C power monitor driverIgor Reznichenko3-0/+761
Add a driver for the ST Microelectronics TSC1641 16-bit high-precision power monitor. The driver supports reading bus voltage, current, power, and temperature. Sysfs attributes are exposed for shunt resistor and update interval. The driver integrates with the hwmon subsystem and supports optional ALERT pin polarity configuration. Signed-off-by: Igor Reznichenko <igor@reznichenko.net> Link: https://lore.kernel.org/r/20251105201406.1210856-3-igor@reznichenko.net Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-11-12hwmon: (gpd-fan) initialize EC on driver load for Win 4Cryolitia PukNgae1-27/+25
The original implement will re-init the EC when it reports a zero value, and it's a workaround for the black box buggy firmware. Now a contributer test and report that, the bug is that, the firmware won't initialize the EC on boot, so the EC ramains in unusable status. And it won't need to re-init it during runtime. The original implement is not perfect, any write command will be ignored until we first read it. Just re-init it unconditionally when the driver load could work. Fixes: 0ab88e239439 ("hwmon: add GPD devices sensor driver") Co-developed-by: kylon <3252255+kylon@users.noreply.github.com> Signed-off-by: kylon <3252255+kylon@users.noreply.github.com> Link: https://github.com/Cryolitia/gpd-fan-driver/pull/20 Signed-off-by: Cryolitia PukNgae <cryolitia@uniontech.com> Link: https://lore.kernel.org/r/20251030-win4-v1-1-c374dcb86985@uniontech.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-11-12hwmon: (gpd-fan) Fix compilation error in non-ACPI buildsGopi Krishna Menon1-1/+1
Building gpd-fan driver without CONFIG_ACPI results in the following build errors: drivers/hwmon/gpd-fan.c: In function ‘gpd_ecram_read’: drivers/hwmon/gpd-fan.c:228:9: error: implicit declaration of function ‘outb’ [-Werror=implicit-function-declaration] 228 | outb(0x2E, addr_port); | ^~~~ drivers/hwmon/gpd-fan.c:241:16: error: implicit declaration of function ‘inb’ [-Werror=implicit-function-declaration] 241 | *val = inb(data_port); The definitions for inb() and outb() come from <linux/io.h> (specifically through <asm/io.h>), which is implicitly included via <acpi_io.h>. When CONFIG_ACPI is not set, <acpi_io.h> is not included resulting in <linux/io.h> to be omitted as well. Since the driver does not depend on ACPI, remove <linux/acpi.h> and add <linux/io.h> directly to fix the compilation errors. Signed-off-by: Gopi Krishna Menon <krishnagopi487@gmail.com> Link: https://lore.kernel.org/r/20251024202042.752160-1-krishnagopi487@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-11-02hwmon: (aht10) Add support for dht20Akhilesh Patil2-6/+19
Add support for dht20 temperature and humidity sensor from Aosong. Modify aht10 driver to handle different init command for dht20 sensor by adding init_cmd entry in the driver data. dht20 sensor is compatible with aht10 hwmon driver with this change. Tested on TI am62x SK board with dht20 sensor connected at i2c-2 port. Signed-off-by: Akhilesh Patil <akhilesh@ee.iitb.ac.in> Link: https://lore.kernel.org/r/2025112-94320-906858@bhairav-test.ee.iitb.ac.in Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-11-02hwmon: (asus-ec-sensors) add ROG STRIX X870-F GAMING WIFIEugene Shalygin1-0/+9
Add support for the ROG STRIX X870-F GAMING WIFI board. Testing done by the board owner [1]. [1] https://github.com/zeule/asus-ec-sensors/issues/83 Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20251102114038.283396-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-19hwmon: (sht3x) Fix error handlingGuenter Roeck1-10/+17
Handling of errors when reading status, temperature, and humidity returns the error number as negative attribute value. Fix it up by returning the error as return value. Fixes: a0ac418c6007c ("hwmon: (sht3x) convert some of sysfs interface to hwmon") Cc: JuenKit Yip <JuenKit_Yip@hotmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-19hwmon: (cgbc-hwmon) Add missing NULL check after devm_kzalloc()Li Qiang1-0/+3
The driver allocates memory for sensor data using devm_kzalloc(), but did not check if the allocation succeeded. In case of memory allocation failure, dereferencing the NULL pointer would lead to a kernel crash. Add a NULL pointer check and return -ENOMEM to handle allocation failure properly. Signed-off-by: Li Qiang <liqiang01@kylinos.cn> Fixes: 08ebc9def79fc ("hwmon: Add Congatec Board Controller monitoring driver") Reviewed-by: Thomas Richard <thomas.richard@bootlin.com> Link: https://lore.kernel.org/r/20251017063414.1557447-1-liqiang01@kylinos.cn Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-19hwmon: (pmbus/isl68137) Fix child node reference leak on early returnErick Karanja1-2/+1
In the case of an early return, the reference to the child node needs to be released. Use for_each_child_of_node_scoped to fix the issue. Fixes: 3996187f80a0e ("hwmon: (pmbus/isl68137) add support for voltage divider on Vout") Signed-off-by: Erick Karanja <karanja99erick@gmail.com> Link: https://lore.kernel.org/r/20251012181249.359401-1-karanja99erick@gmail.com [groeck: Updated subject/description] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-19hwmon: (gpd-fan) Fix error handling in gpd_fan_probe()Harshit Mogalapalli1-3/+3
devm_request_region() returns a NULL pointer on error, not an ERR_PTR(). Handle it accordingly. Also fix error return from the call to devm_hwmon_device_register_with_info(). Fixes: 0ab88e239439 ("hwmon: add GPD devices sensor driver") Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> Reviewed-by: Cryolitia PukNgae <cryolitia@uniontech.com> Link: https://lore.kernel.org/r/20251010204447.94343-1-harshit.m.mogalapalli@oracle.com [groeck: Updated subject to improve readability] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-19hwmon: (gpd-fan) Fix return value when platform_get_resource() failsHarshit Mogalapalli1-2/+2
When platform_get_resource() fails it returns NULL and not an error pointer, accordingly change the error handling. Fixes: 0ab88e239439 ("hwmon: add GPD devices sensor driver") Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> Link: https://lore.kernel.org/r/20251010204359.94300-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-19hwmon: (pmbus/max34440) Update adpm12160 coeff due to latest FWAlexis Czezar Torreno1-6/+6
adpm12160 is a dc-dc power module. The firmware was updated and the coeeficients in the pmbus_driver_info needs to be updated. Since the part has not yet released with older FW, this permanent change to reflect the latest should be ok. Signed-off-by: Alexis Czezar Torreno <alexisczezar.torreno@analog.com> Link: https://lore.kernel.org/r/20251001-hwmon-next-v1-1-f8ca6a648203@analog.com Fixes: 629cf8f6c23a ("hwmon: (pmbus/max34440) Add support for ADPM12160") Cc: stable@vger.kernel.org # v6.16+ Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-17hwmon: (corsair-psu) Rely on subsystem lockingGuenter Roeck1-10/+1
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-17hwmon: (corsair-psu) Rely on subsystem lockingGuenter Roeck1-11/+2
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-17hwmon: (chipcap2) Drop unnecessary include filesGuenter Roeck1-7/+0
The driver does not perform any locking, does not execute or use any sleep related functionality, and does not allocate memory. Drop the unnecessary include files. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-17hwmon: (asus_rog_ryujin) Rely on subsystem lockingGuenter Roeck1-39/+9
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-17hwmon: (i5500_temp) Drop unnecessary include filesGuenter Roeck1-3/+0
The driver does not perform any locking, does not execute or use any sleep related functionality, and does not allocate memory. Drop the unnecessary include files. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-17hwmon: (gpd-fan) Rely on subsystem lockingGuenter Roeck1-43/+13
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-17hwmon: (aquacomputer_d5next) Rely on subsystem lockingGuenter Roeck1-31/+6
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-17hwmon: (ltc4282) Rely on subsystem lockingGuenter Roeck1-28/+4
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Nuno Sá <nuno.sa@analog.com>
2025-10-17hwmon: (lochnagar-hwmon) Rely on subsystem lockingGuenter Roeck1-15/+3
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-17hwmon: (sfctemp) Rely on subsystem lockingGuenter Roeck1-28/+8
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-17hwmon: (adt7x10) Rely on subsystem lockingGuenter Roeck1-22/+5
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Nuno Sá <nuno.sa@analog.com>
2025-10-17hwmon: (peci) Rely on subsystem lockingGuenter Roeck3-69/+23
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-17hwmon: (ltc2947-core) Rely on subsystem lockingGuenter Roeck1-27/+5
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Nuno Sá <nuno.sa@analog.com>
2025-10-17hwmon: (adt7411) Rely on subsystem lockingGuenter Roeck1-43/+16
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Nuno Sá <nuno.sa@analog.com>
2025-10-17hwmon: (aht10) Rely on subsystem lockingGuenter Roeck1-21/+3
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-17hwmon: (lm95241) Rely on subsystem lockingGuenter Roeck1-16/+0
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-17hwmon: (ina238) Rely on subsystem lockingGuenter Roeck1-21/+5
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-17hwmon: (ftsteutates) Rely on subsystem lockingGuenter Roeck1-59/+25
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-17hwmon: (powr1220) Rely on subsystem lockingGuenter Roeck1-13/+4
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-17hwmon: (mr75203) Drop unnecessary include fileGuenter Roeck1-1/+0
The driver does not perform any locking and thus does not need to include mutex.h. Drop the unnecessary include file. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-17hwmon: (k10temp) Rely on subsystem lockingGuenter Roeck1-5/+0
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-17hwmon: (ina3221) Rely on subsystem lockingGuenter Roeck1-19/+0
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-17hwmon: (sht4x) Rely on subsystem lockingGuenter Roeck1-29/+11
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-17hwmon: (ina2xx) Rely on subsystem lockingGuenter Roeck1-18/+10
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-17hwmon: (sbtsi_temp) Rely on subsystem lockingGuenter Roeck1-15/+2
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-17hwmon: (hs3001) Rely on subsystem lockingGuenter Roeck1-9/+1
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-17hwmon: (lm92) Rely on subsystem lockingGuenter Roeck1-9/+2
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-17hwmon: (lm95234) Rely on subsystem lockingGuenter Roeck1-10/+2
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-17hwmon: (max127) Rely on subsystem lockingGuenter Roeck1-20/+3
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-16hwmon: (adt7410): Support adt7422 chipNuno Sá2-3/+5
Add support for the ADT7422 high accuracy digital temperature sensor. It's identical to the other chips supported in the driver so we just need to add it to the ID tables. Co-developed-by: Cosmin Tanislav <demonsingur@gmail.com> Signed-off-by: Cosmin Tanislav <demonsingur@gmail.com> Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20251015-dev-add-adt7422-v1-3-7cf72d3253ad@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-16hwmon: (adt7410): Add OF match tableNuno Sá1-0/+9
Add a struct of_device_id match table to the driver. While at it, make sure to properly include mod_devicetable.h which is also needed for struct i2c_device_id. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20251015-dev-add-adt7422-v1-2-7cf72d3253ad@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (scmi) Enable sensors to assure they can be readMarek Vasut1-0/+9
The SCMI specification states that SENSOR_CONFIG_SET is used to enable/disable the sensors. The sensors can be disabled by default, which is the case at least on NXP i.MX95. Explicitly trigger the SENSOR_CONFIG_SET to enable the sensors, otherwise sensor read may fail and won't return valid data. Signed-off-by: Marek Vasut <marek.vasut@mailbox.org> Link: https://lore.kernel.org/r/20251015114953.148706-1-marek.vasut@mailbox.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (max31790) Rely on subsystem lockingGuenter Roeck1-37/+11
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (max6620) Rely on subsystem lockingGuenter Roeck1-31/+12
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (nct7363) Drop unnecessary include filesGuenter Roeck1-2/+0
The driver does not perform any locking and does not create sysfs attributes. Drop the unnecessary include files. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (nct7904) Rely on subsystem lockingGuenter Roeck1-39/+24
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (max31827) Rely on subsystem lockingGuenter Roeck1-46/+14
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (max6639) Rely on subsystem lockingGuenter Roeck1-19/+4
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. While at it, drop unnecessary include of hwmon-sysfs.c. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (tmp102) Drop unnecessary include filesGuenter Roeck1-2/+0
The driver does not perform any locking and does not create sysfs attributes. Drop the unnecessary include files. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (tmp103) Drop unnecessary include filesGuenter Roeck1-3/+0
The driver does not perform any locking, does not sleep or check the time, and does not create sysfs attributes. Drop the unnecessary include files. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (lm95245) Rely on subsystem lockingGuenter Roeck1-14/+2
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (ltc4245) Rely on subsystem lockingGuenter Roeck1-8/+0
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. While at it, drop the unnecessary include of hwmon-sysfs.h. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (max6697) Rely on subsystem lockingGuenter Roeck1-8/+1
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (drivetemp) Rely on subsystem lockingGuenter Roeck1-5/+0
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (tmp108) Drop mutex.h includeGuenter Roeck1-1/+0
The driver does not perform any locking, so including mutex.h is not necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (tmp401) Rely on subsystem lockingGuenter Roeck1-8/+0
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (tmp421) Rely on subsystem lockingGuenter Roeck1-17/+4
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (tmp464) Rely on subsystem lockingGuenter Roeck1-12/+1
Attribute access is now serialized in the hardware monitoring core, so locking in the driver is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (emc1403) Rely on subsystem lockingGuenter Roeck1-36/+10
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (adm9240) Rely on subsystem lockingGuenter Roeck1-15/+2
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (lm90) Rely on subsystem lockingGuenter Roeck1-21/+4
Attribute access is now serialized in the hardware monitoring core, so locking n the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (jc42) Rely on subsystem lockingGuenter Roeck1-11/+0
Attribute access is now serialized in the hardware monitoring core, so locking in the driver code is no longer necessary. Drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (pmbus) add driver for MPS MP9945Cosmo Chou3-0/+253
Add support for mp9945 device from Monolithic Power Systems, Inc. (MPS) vendor. This is a single phase digital step down converter. Signed-off-by: Cosmo Chou <chou.cosmo@gmail.com> Link: https://lore.kernel.org/r/20251009205458.396368-2-chou.cosmo@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (ltc4282) Use the energy64 attribute type to report the energyGuenter Roeck1-31/+13
Use the energy64 attribute type instead of a locally defined sysfs attribute to report the accumulated energy. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20251012211625.533791-2-linux@roeck-us.net Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (ltc2947) Use the energy64 attribute type to report the energyGuenter Roeck1-34/+26
Use the energy64 attribute type instead of a locally defined sysfs attribute to report the accumulated energy. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20251012211625.533791-1-linux@roeck-us.net Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (peci/cputemp) add Intel Emerald Rapids supportIvan Mikhaylov1-0/+18
Add support to read DTS for reading Intel Emerald Rapids platform. Signed-off-by: Ivan Mikhaylov <fr0st61te@gmail.com> Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de> Link: https://lore.kernel.org/r/20251006215321.5036-4-fr0st61te@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (peci/dimmtemp) add Intel Emerald Rapids platform supportIvan Mikhaylov1-0/+19
Extend the functionality of hwmon (peci/dimmtemp) for Emerald Rapids platform. The patch has been tested on a 5S system with 16 DIMMs installed. Verified read of DIMM temperature thresholds & temperature. Using Sapphire's callbacks about getting thresholds because it's same platform/socket. Signed-off-by: Ivan Mikhaylov <fr0st61te@gmail.com> Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de> Link: https://lore.kernel.org/r/20251006215321.5036-3-fr0st61te@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (asus-ec-sensors) add ROG STRIX X870E-H GAMING WIFI7Maximilian Luz1-0/+10
The board has a similar sensor configuration as the ROG STRIX X870E-E GAMING WIFI, with an additional temperature sensor header. Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20251003081002.1013313-3-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (asus-ec-sensors) add Pro WS TRX50-SAGE WIFIPaul Heneghan1-0/+22
Added support for Pro WS TRX50-SAGE WIFI motherboard. Signed-off-by: Paul Heneghan <paul@networks-extra.com> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20251003081002.1013313-2-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (pmbus/max34440): add support adpm12200Alexis Czezar Torreno2-3/+42
ADPM12200 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 2000W. Uses PMBus. Signed-off-by: Alexis Czezar Torreno <alexisczezar.torreno@analog.com> Link: https://lore.kernel.org/r/20251001-hwmon-next-v1-2-f8ca6a648203@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (nct6775) Add ASUS ROG STRIX X870E-H GAMING WIFI7Maximilian Luz1-0/+1
The ASUS ROG STRIX X870E-H GAMING WIFI7 has a NCT6799D compatible chip, which is also accessed via ACPI. Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com> Link: https://lore.kernel.org/r/20251002184958.359744-1-luzmaximilian@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (ntc-thermistor) Add Murata ncp18wm474Emil Dahl Juhl1-0/+43
Add support for the Murata NCP18WM474 NTC. Compensation table has been constructed by linear interpolation between well defined points[1] on the resistance vs. temperature graph in the datasheet[2]. The readouts of the graph has been done to the best of my abilities, but the compensation table will be subject to inaccuracies nonetheless. [1] -40, -25, 0, 25, 50, 75, 100, 125 degrees [2] https://www.murata.com/en-eu/api/pdfdownloadapi?cate=&partno=NCP18WM474E03RB Signed-off-by: Emil Dahl Juhl <juhl.emildahl@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://lore.kernel.org/r/20251001-ntc-thermistor-ncp18wm474-v1-1-2c64b9b509ff@pengutronix.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-15hwmon: (pmbus/max17616) add driver for max17616Kim Seer Paller3-0/+83
Add support for MAX17616/MAX17616A current-limiter with overvoltage/surge, undervoltage, reverse polarity, loss of ground protection with PMBus interface. The PMBus interface allows monitoring of input/output voltages, output current and temperature. Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com> Link: https://lore.kernel.org/r/20250930-upstream-max17616-v1-2-1525a85f126c@analog.com [groeck: Fixed htmldocs 'WARNING: Title underline too short' as reported by Kriish Sharma <kriish.sharma2006@gmail.com>] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-12hwmon: Add MP2925 and MP2929 driverWensheng Wang3-0/+326
Add support for MPS VR mp2925 and mp2929 controller. This driver exposes telemetry and limit value readings and writtings. Signed-off-by: Wensheng Wang <wenswang@yeah.net> Link: https://lore.kernel.org/r/20250928092845.1394718-2-wenswang@yeah.net Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-10-01Merge tag 'gpio-updates-for-v6.18-rc1' of ↵Linus Torvalds3-0/+960
git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio updates from Bartosz Golaszewski: "There are two new drivers and support for more models in existing ones. The generic GPIO API has been reworked and all users converted which allowed us to move the fields specific to the generic GPIO implementation out of the high-level struct gpio_chip into its own structure that wraps the gpio_chip. Other than that, there's nothing too exciting. Mostly minor tweaks and fixes all over the place, some refactoring and some small new features in helper modules. GPIO core: - add support for sparse pin ranges to the glue between GPIO and pinctrl - use a common prefix across all GPIO descriptor flags for improved namespacing New drivers: - add new GPIO driver for the Nuvoton NCT6694 - add new GPIO driver for MAX7360 Driver improvements: - add support for Tegra 256 to the gpio-tegra186 driver - add support for Loongson-2K0300 to the gpio-loongson-64bit driver - refactor the gpio-aggregator module to expose its GPIO forwarder API to other in-kernel users (to enable merging of a new pinctrl driver that uses it) - convert all remaining drivers to using the modernized generic GPIO chip API and remove the old interface - stop displaying global GPIO numbers in debugfs output of controller drivers - extend the gpio-regmap helper with a new config option and improve its support for GPIO interrupts - remove redundant fast_io parameter from regmap configs in GPIO drivers that already use MMIO regmaps which imply it - add support for a new model in gpio-mmio: ixp4xx expansion bus - order includes alphabetically in a few drivers for better readability - use generic device properties where applicable - use devm_mutex_init() where applicable - extend build coverage of drivers by enabling more to be compiled with COMPILE_TEST enabled - allow building gpio-stmpe as a module - use dev_err_probe() where it makes sense in drivers Late driver fixes: - fix setting GPIO direction to output in gpio-mpfs Documentation: - document the usage of software nodes with GPIO chips Device-tree bindings: - Add DT bindings documents for new hardware: Tegra256, MAX7360 - Document a new model in Loongson bindings: LS2K0300 - Document a new model using the generic GPIO binding: IXP4xx - Convert the DT binding for fsl,mxs-pinctrl to YAML - fix the schema ID in the "trivial" GPIO schema - describe GPIO hogs in the generic GPIO binding" * tag 'gpio-updates-for-v6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (122 commits) gpio: mpfs: fix setting gpio direction to output gpio: generic: move GPIO_GENERIC_ flags to the correct header gpio: generic: rename BGPIOF_ flags to GPIO_GENERIC_ gpio: nomadik: fix the debugfs helper stub MAINTAINERS: Add entry on MAX7360 driver input: misc: Add support for MAX7360 rotary input: keyboard: Add support for MAX7360 keypad gpio: max7360: Add MAX7360 gpio support gpio: regmap: Allow to provide init_valid_mask callback gpio: regmap: Allow to allocate regmap-irq device pwm: max7360: Add MAX7360 PWM support pinctrl: Add MAX7360 pinctrl driver mfd: Add max7360 support dt-bindings: mfd: gpio: Add MAX7360 rtc: Add Nuvoton NCT6694 RTC support hwmon: Add Nuvoton NCT6694 HWMON support watchdog: Add Nuvoton NCT6694 WDT support can: Add Nuvoton NCT6694 CANFD support i2c: Add Nuvoton NCT6694 I2C support gpio: Add Nuvoton NCT6694 GPIO support ...
2025-09-25hwmon: (mlxreg-fan) Add support for new flavour of capability registerVadim Pasternak1-3/+15
FAN platform data is common across the various systems, while fan driver should be able to apply only the fan instances relevant to specific system. For example, platform data might contain descriptions for fan1, fan2, ..., fan{n}, while some systems equipped with all 'n' fans, others with less. Also, on some systems fan drawer can be equipped with several tachometers and on others only with one. For detection of the real number of equipped drawers and tachometers special capability registers are used. These registers used to indicate presence of drawers and tachometers through the bitmap. For some new big modular systems this register will provide presence data by counter. Use slot parameter to distinct whether capability register contains bitmask or counter. Signed-off-by: Vadim Pasternak <vadimp@nvidia.com> Link: https://lore.kernel.org/r/20250113084859.27064-3-vadimp@nvidia.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-25hwmon: (mlxreg-fan) Separate methods of fan setting coming from different ↵Vadim Pasternak1-8/+16
subsystems Distinct between fan speed setting request coming for hwmon and thermal subsystems. There are fields 'last_hwmon_state' and 'last_thermal_state' in the structure 'mlxreg_fan_pwm', which respectively store the cooling state set by the 'hwmon' and 'thermal' subsystem. The purpose is to make arbitration of fan speed setting. For example, if fan speed required to be not lower than some limit, such setting is to be performed through 'hwmon' subsystem, thus 'thermal' subsystem will not set fan below this limit. Currently, the 'last_thermal_state' is also be updated by 'hwmon' causing cooling state to never be set to a lower value. Eliminate update of 'last_thermal_state', when request is coming from 'hwmon' subsystem. Fixes: da74944d3a46 ("hwmon: (mlxreg-fan) Use pwm attribute for setting fan speed low limit") Signed-off-by: Vadim Pasternak <vadimp@nvidia.com> Link: https://lore.kernel.org/r/20250113084859.27064-2-vadimp@nvidia.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-25hwmon: (cros_ec) register fans into thermal framework cooling devicesSung-Chi Li1-0/+83
Register fans connected under EC as thermal cooling devices as well, so these fans can then work with the thermal framework. During the driver probing phase, we will also try to register each fan as a thermal cooling device based on previous probe result (whether the there are fans connected on that channel, and whether EC supports fan control). The basic get max state, get current state, and set current state methods are then implemented as well. Signed-off-by: Sung-Chi Li <lschyi@chromium.org> Acked-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20250911-cros_ec_fan-v6-3-a1446cc098af@google.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-25hwmon: (cros_ec) add PWM control over fansSung-Chi Li1-0/+230
Newer EC firmware supports controlling fans through host commands, so adding corresponding implementations for controlling these fans in the driver for other kernel services and userspace to control them. The driver will first probe the supported host command versions (get and set of fan PWM values, get and set of fan control mode) to see if the connected EC fulfills the requirements of controlling the fan, then exposes corresponding sysfs nodes for userspace to control the fan with corresponding read and write implementations. As EC will automatically change the fan mode to auto when the device is suspended, the power management hooks are added as well to keep the fan control mode and fan PWM value consistent during suspend and resume. As we need to access the hwmon device in the power management hook, update the driver by storing the hwmon device in the driver data as well. Signed-off-by: Sung-Chi Li <lschyi@chromium.org> Acked-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20250911-cros_ec_fan-v6-2-a1446cc098af@google.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-25hwmon: add SMARC-sAM67 supportMichael Walle3-0/+172
Add a new driver for the Kontron SMARC-sAM67 board management controller. It has two voltage sensors and one temperature sensor. Signed-off-by: Michael Walle <mwalle@kernel.org> Link: https://lore.kernel.org/r/20250912120745.2295115-7-mwalle@kernel.org [groeck: Added sa67 to index.rst] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-25hwmon: (asus-ec-sensors) add TUF GAMING X670E PLUS WIFIMohamad Kamal1-0/+2
Add support for TUF GAMING X670E PLUS WIFI Signed-off-by: Mohamad Kamal <mohamad.kamal.85@gmail.com> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20250914084019.1108941-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-24hwmon: (dell-smm) Add support for Dell OptiPlex 7040Armin Wolf1-0/+7
The Dell OptiPlex 7040 supports the legacy SMM interface for reading sensors and performing fan control. Whitelist this machine so that this driver loads automatically. Closes: https://github.com/Wer-Wolf/i8kutils/issues/15 Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20250917181036.10972-5-W_Armin@gmx.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-24hwmon: (dell-smm) Add support for automatic fan modeArmin Wolf1-13/+61
Many machines treat fan state 3 as some sort of automatic mode, which is superior to the separate SMM calls for switching to automatic fan mode for two reasons: - the fan control mode can be controlled for each fan separately - the current fan control mode can be retrieved from the BIOS On some machines however, this special fan state does not exist. Fan state 3 acts like a regular fan state on such machines or does not exist at all. Such machines usually use separate SMM calls for enabling/disabling automatic fan control. Add support for it. If the machine supports separate SMM calls for changing the fan control mode, then the other interface is ignored. Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20250917181036.10972-4-W_Armin@gmx.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-24hwmon: (gpd-fan) complete Kconfig dependenciesCryolitia PukNgae1-1/+1
DMI and HAS_IOPORT is also needed Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202509200214.i2QX7iwD-lkp@intel.com/ Signed-off-by: Cryolitia PukNgae <cryolitia@uniontech.com> Link: https://lore.kernel.org/r/20250924-hwmon2-v1-1-fc529865a325@uniontech.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-24hwmon: (asus-ec-sensors) increase timeout for locking ACPI mutexBen Copeland1-1/+1
Some motherboards require more time to acquire the ACPI mutex, causing "Failed to acquire mutex" messages to appear in the kernel log. Increase the timeout from 500ms to 800ms to accommodate these cases. Signed-off-by: Ben Copeland <ben.copeland@linaro.org> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20250923192935.11339-3-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-24hwmon: (asus-ec-sensors) add ROG STRIX X870E-E GAMING WIFIBen Copeland1-0/+10
Add support for ROG STRIX X870E-E GAMING WIFI This board uses the same sensor configuration as the ProArt X870E-CREATOR WIFI motherboard. Signed-off-by: Ben Copeland <ben.copeland@linaro.org> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20250923192935.11339-2-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-24hwmon: (dell-smm) Move clamping of fan speed out of i8k_set_fan()Armin Wolf1-1/+3
Currently i8k_set_fan() clamps the fan speed before performing the SMM call to ensure that the speed is not negative and not greater than i8k_fan_max. This however is mostly unnecessary as the hwmon and thermal interfaces alread ensure this. Only the legacy ioctl interface does not ensure that the fan speed passed to i8k_set_fan() does meet the above criteria. Move the clamping out of i8k_set_fan() and into the legacy ioctl handler to prepare for future changes. Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20250917181036.10972-3-W_Armin@gmx.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-24hwmon: (dell-smm) Remove Dell Precision 490 custom config dataArmin Wolf1-14/+0
It turns out the second fan on the Dell Precision 490 does not really support I8K_FAN_TURBO. Setting the fan state to 3 enables automatic fan control, just like on the other two fans. The reason why this was misinterpreted as turbo mode was that the second fan normally spins faster in automatic mode than in the previous fan states. Yet when in state 3, the fan speed reacts to heat exposure, exposing the automatic mode setting. Link: https://github.com/lm-sensors/lm-sensors/pull/383 Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20250917181036.10972-2-W_Armin@gmx.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-24hwmon: (asus-ec-sensors) add ROG STRIX X670E-E GAMING WIFIShane Fagan1-0/+9
Add support for ROG STRIX X670E-E GAMING WIFI Signed-off-by: Shane Fagan <mail@shanefagan.com> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20250914074125.135656-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-24hwmon: (gpd-fan) Fix range check for pwm inputCryolitia PukNgae1-1/+1
Fixed the maximum value in the PWM input range check, allowing the input to be set to 255. Fixes: 0ab88e239439 ("hwmon: add GPD devices sensor driver") Reported-by: Chenx Dust <chenx_dust@outlook.com> Link: https://github.com/Cryolitia/gpd-fan-driver/pull/18 Co-developed-by: Chenx Dust <chenx_dust@outlook.com> Signed-off-by: Chenx Dust <chenx_dust@outlook.com> Signed-off-by: Cryolitia PukNgae <cryolitia@uniontech.com> Link: https://lore.kernel.org/r/20250919-hwmon-v1-1-2b69c8b9c062@uniontech.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-24hwmon: (pmbus/mp5990) add support for MP5998Cosmo Chou1-8/+59
Add support for the MPS MP5998 hot-swap controller. Like MP5990, MP5998 uses EFUSE_CFG (0xC4) bit 9 to indicate linear/direct data format. Signed-off-by: Cosmo Chou <chou.cosmo@gmail.com> Link: https://lore.kernel.org/r/20250916095026.800164-2-chou.cosmo@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-18Merge tag 'ib-mfd-gpio-hwmon-i2c-can-rtc-watchdog-v6.18' of ↵Bartosz Golaszewski3-0/+960
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into gpio/for-next Pull changes from the immutable branch between MFD, GPIO, HWMON, I2C, CAN, RTC and Watchdog trees containing GPIO support for Nuvoton NCT6694.
2025-09-16hwmon: Add Nuvoton NCT6694 HWMON supportMing Yu3-0/+960
This driver supports Hardware monitor functionality for NCT6694 MFD device based on USB interface. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Ming Yu <a0282524688@gmail.com> Link: https://lore.kernel.org/r/20250912091952.1169369-7-a0282524688@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2025-09-09hwmon: sy7636a: add aliasAndreas Kemnade1-0/+1
Add module alias to have it autoloaded. Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Link: https://lore.kernel.org/r/20250909080249.30656-1-andreas@kemnade.info Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-09hwmon: (sht21) Add devicetree supportKurt Borja1-1/+12
Add DT support for sht2x chips. Signed-off-by: Kurt Borja <kuurtb@gmail.com> Link: https://lore.kernel.org/r/20250908-sht2x-v4-4-bc15f68af7de@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-08hwmon: add GPD devices sensor driverCryolitia PukNgae3-0/+726
Sensors driver for GPD Handhelds that expose fan reading and control via hwmon sysfs. Shenzhen GPD Technology Co., Ltd. manufactures a series of handheld devices. This driver implements these functions through x86 port-mapped IO. Tested-by: Marcin Strągowski <marcin@stragowski.com> Tested-by: someone5678 <someone5678.dev@gmail.com> Tested-by: Justin Weiss <justin@justinweiss.com> Tested-by: Antheas Kapenekakis <lkml@antheas.dev> Tested-by: command_block <mtf@ik.me> Tested-by: derjohn <himself@derjohn.de> Tested-by: Crashdummyy <crashdummy1337@proton.me> Signed-off-by: Cryolitia PukNgae <cryolitia@uniontech.com> Link: https://lore.kernel.org/r/20250908-gpd_fan-v9-1-7b4506c03953@uniontech.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-08hwmon: (sht21) Add support for SHT20, SHT25 chipsKurt Borja2-2/+4
All sht2x chips share the same communication protocol so add support for them. Signed-off-by: Kurt Borja <kuurtb@gmail.com> Link: https://lore.kernel.org/r/20250908-sht2x-v4-2-bc15f68af7de@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-08hwmon: Serialize accesses in hwmon coreGuenter Roeck1-7/+35
Implement locking in the hardware monitoring core for drivers using the _with_info() API functions. Most hardware monitoring drivers need to support locking to protect against parallel accesses from userspace. With older API functions, such locking had to be implemented in the driver code since sysfs attributes were created by the driver. However, the _with_info() API creates sysfs attributes in the hardware monitoring core. This makes it easy to move the locking primitives into that code. This has the benefit of simplifying driver code while at the same time reducing the risk of incomplete of bad locking implementations in hardware monitoring drivers. While this means that all accesses are forced to be synchronized, this has little if any practical impact since accesses are expected to be low frequency and are typically synchronized from userspace anyway since only a single process is accessing the data. On top of that, many drivers use regmap, which also has its own locking scheme and already serializes accesses. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-08hwmon: add MP29502 driverWensheng Wang3-0/+680
Add support for MPS VR controller mp29502. This driver exposes telemetry and limits value readings and writtings. Signed-off-by: Wensheng Wang <wenswang@yeah.net> Link: https://lore.kernel.org/r/20250805102020.749850-3-wenswang@yeah.net [groeck: Fixed document formatting] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: add MP2869,MP29608,MP29612 and MP29816 series driverWensheng Wang3-0/+669
Add support for MPS VR mp2869/mp2869a,mp29608/mp29608a,mp29612/mp29612a and mp29816/mp29816a/mp29816b/mp29816c controller. This driver exposes telemetry and limit value readings and writtings. Signed-off-by: Wensheng Wang <wenswang@yeah.net> Link: https://lore.kernel.org/r/20250805102020.749850-2-wenswang@yeah.net Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (nzxt-smart2) Use devm_mutex_init()Christophe JAILLET1-7/+1
Use devm_mutex_init() instead of hand-writing it. This saves some LoC, improves readability and saves some space in the generated .o file. Before: ====== text data bss dec hex filename 25878 11329 128 37335 91d7 drivers/hwmon/nzxt-smart2.o After: ===== text data bss dec hex filename 25551 11257 128 36936 9048 drivers/hwmon/nzxt-smart2.o Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/f51fac0871ec7dbe4e28447ee4f774d028a53426.1757240403.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (asus-ec-sensors) add ROG STRIX X870-I GAMING WIFIMaciej Zonski1-0/+9
Add support for ROG STRIX X870-I GAMING WIFI Signed-off-by: Maciej Zonski <me@zonni.pl> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20250906161748.219567-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (ina238) Add support for INA700Guenter Roeck2-4/+19
INA700 is register compatible to INA780 but has different current, power, and energy LSB values. While the chip does not directly report the shunt voltage, report it anyway by calculating its value from the current register. Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz> # INA780 Cc: Christian Kahr <christian.kahr@sie.at> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (ina238) Add support for INA780Guenter Roeck2-4/+19
INA780 is similar to the other chips in the series, but does not support the shunt voltage register. Shunt voltage limit registers have been renamed to current limit registers, but are otherwise identical. While the chip does not directly report the shunt voltage, report it anyway by calculating its value from the current register. Cc: Chris Packham <chris.packham@alliedtelesis.co.nz> Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz> # INA780 Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (ina238) Only configure calibration and shunt registers if neededGuenter Roeck1-40/+42
Prepare for supporting chips with internal shunt resistor by only setting calibration and shunt resistor registers if no current LSB is configured. Do not display a log message during probe if a chip does not have shunt and gain registers since those would otherwise display 0, and a message just indicating that the driver was loaded would be just noise. Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz> # INA780 Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (ina238) Support active-high alert polarityGuenter Roeck1-2/+6
All chips supported by this driver support configurable active-high alert priority. This is already documented in the devicetree description. Add support for it to the driver. Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz> # INA780 Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (ina238) Use the energy64 attribute type to report the energyGuenter Roeck1-19/+15
Use the energy64 attribute type instead of locally defined sysfs attributes to report the accumulated energy. No functional change intended. Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz> # INA780 Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (ina238) Order chip information alphabeticallyGuenter Roeck1-12/+12
Order chip type enum and chip configuration data alphabetically to simplify adding support for additional chips. No functional change. Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz> # INA780 Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (ina238) Add support for current limitsGuenter Roeck1-22/+83
Since the shunt voltage register and the current register now report the same values, use the shunt voltage limit registers to report and adjust current limits, using the same LSB as the LSB used for the actual current register. Handle current register accuracy differences in separate function to improve code readability. Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz> # INA780 Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (ina238) Stop using the shunt voltage registerGuenter Roeck1-1/+1
Since the value of the current register and the value of the shunt register now match each other, it is no longer necessary to read the shunt voltage register in the first place. Read the current register instead and use it to calculate the shunt voltage. Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz> # INA780 Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (ina238) Improve current dynamic rangeGuenter Roeck1-32/+19
The best possible dynamic range for current measurements is achieved if the shunt register value matches the current register value. Adjust the calibration register as well as fixed and default shunt resistor values accordingly to achieve this range. Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz> # INA780 Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (ina238) Simplify voltage register accessesGuenter Roeck1-108/+53
Calculate voltage LSB values in the probe function and use throughout the code. Use a single function to read all voltages, independently of the register width. Use the pre-calculated LSB values to convert register values to voltages and do not rely on runtime chip specific code. Use ROUND_CLOSEST functions instead of divide operations to reduce rounding errors. Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz> # INA780 Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (ina238) Pre-calculate current, power, and energy LSBGuenter Roeck1-20/+27
Current, power, and energy LSB do not change during runtime, so we can pre-calculate the respective values. The power LSB can be derived from the current LSB using the equation in the datasheets. Similar, the energy LSB can be derived from the power LSB. Also add support for chips with built-in shunt resistor by providing a chip specific configuration parameter for the current LSB. The relationship of current -> power -> energy LSB values in those chips is the same as in chips with external shunt resistor, so configuration parameters for power and energy LSB are not needed. Use ROUND_CLOSEST functions instead of divide operations to reduce rounding errors. Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz> # INA780 Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (ina238) Rework and simplify temperature calculationsGuenter Roeck1-28/+24
The temperature register is 16 bit wide for all chips. The decimal point is at the same location (bit 7 = 1 degree C). That means we can use the resolution to calculate temperatures. Do that to simplify the code. There is only a single writeable temperature attribute, and it is very unlikely that the chips supported by this driver will ever require another one. That means checking for that attribute in the write function is unnecessary. Drop the check. Rename the write function from ina238_write_temp() to ina238_write_temp_max() to reflect that a single attribute is written. Also extend the accepted temperature value range to the range supported by the chip registers. Limiting the accepted value range to the temperature range supported by the chip would make it impossible to read an out-of-range limit from the chip and to write the same value back into it. This is undesirable, especially since the maximum temperature register does contain the maximum register value after a chip reset, not the temperature limit supported by the chip. Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz> # INA780 Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (ina238) Drop pointless power attribute check on attribute writesGuenter Roeck1-5/+2
There is only a single writeable power attribute, and it is very unlikely that the chips supported by this driver will ever require another one. That means checking for that attribute during runtime is unnecessary. Drop the check. Rename the write function from ina238_write_power() to ina238_write_power_max() to reflect that a single attribute is written. No functional change intended. Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz> # INA780 Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (ina238) Update documentation and Kconfig entryGuenter Roeck1-4/+5
Update driver documentation and Kconfig entry to list all chips supported by the driver. Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz> # INA780 Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (ina238) Drop platform data supportGuenter Roeck1-6/+2
There are no in-tree users of ina2xx platform data. Drop support for it. The driver already supports device properties which can be used as alternative if needed. Also remove reference to the non-existing shunt_resistor sysfs attribute from the driver documentation. Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz> # INA780 Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: Introduce 64-bit energy attribute supportGuenter Roeck1-4/+10
Many chips require 64-bit variables to display the accumulated energy, even more so since the energy units are micro-Joule. Add new sensor type "energy64" to support reporting the chip energy as 64-bit values. Changing the entire hardware monitoring API is not feasible, and it is only really necessary to support reading 64-bit values for the "energyX_input" attribute. For this reason, keep the API as-is and use type casts on both ends to pass 64-bit pointers when reading the accumulated energy. On the write side (which is only useful for the energyX_enable attribute), keep passing the written value as long. Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz> # INA780 Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (pwm-fan) Implement after shutdown fan settingsMarek Vasut1-3/+15
Add fan-shutdown-percent property, used to describe fan RPM in percent set during shutdown. This is used to keep the fan running at fixed RPM after the kernel shut down, which is useful on hardware that does keep heating itself even after the kernel did shut down, for example from some sort of management core. The current behavior of pwm-fan is to unconditionally stop the fan on shutdown, which is not always the safe and correct thing to do, so let the hardware description include the expected behavior. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/20250904202157.170600-2-marek.vasut+renesas@mailbox.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (asus-ec-sensors) add PRIME Z270-AEugene Shalygin1-0/+27
Add support for the PRIME Z270-A board. Tested-by: Jan Philipp Groß <janphilippgross@mailbox.org> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20250903191736.14451-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (asus-ec-sensors) sort declarationsMichael Tandy1-85/+85
Sort all the declarations in the source file. Contributors are asked to insert new entries keeping alphabetical order, but the existing ones were not completely sorted. Signed-off-by: Michael Tandy <git@mjt.me.uk> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20250903184753.5876-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (asus-ec-sensors) add ROG STRIX Z690-E GAMING WIFITom Ingleby1-0/+8
Add support for the ASUS ROG STRIX Z690-E GAMING WIFI Signed-off-by: Tom Ingleby <tom@ewsting.com> Link: https://lore.kernel.org/r/20250903031800.4173-1-tom@ewsting.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: tmp102: Add support for labelFlaviu Nistor1-1/+21
Add support for label sysfs attribute similar to other hwmon devices. This is particularly useful for systems with multiple sensors on the same board, where identifying individual sensors is much easier since labels can be defined via device tree. Signed-off-by: Flaviu Nistor <flaviu.nistor@gmail.com> Link: https://lore.kernel.org/r/20250825180248.1943607-2-flaviu.nistor@gmail.com [groeck: Fixed continuation line alignment] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (asus-ec-sensors) refine config descriptionEugene Shalygin1-3/+4
Remove outdated mention of the supported mmotherboard families and add a hint which sensor readings are available via the module. Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20250830131224.748481-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07(asus-ec-sensors) add Pro WS WRX90E-SAGE SEMichael Tandy1-0/+42
Add support for Pro WS WRX90E-SAGE SE Signed-off-by: Michael Tandy <git@mjt.me.uk> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20250830120121.738223-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (nct6775) Use int type to store negative error codesQianfeng Rong1-1/+2
Change the 'ret' variable from u32 to int in nct6775_asuswmi_read() to store negative error codes or zero; Storing the negative error codes in unsigned type, doesn't cause an issue at runtime but can be confusing. Additionally, assigning negative error codes to unsigned type may trigger a GCC warning when the -Wsign-conversion flag is enabled. No effect on runtime. Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com> Link: https://lore.kernel.org/r/20250830095105.3271-1-rongqianfeng@vivo.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (coretemp) Replace x86_model checks with VFM onesDave Hansen1-40/+36
Intel CPUs have been using Family 6 for a while. The Family-model checks in the coretemp driver implicitly assume Family 6. With the upcoming Family 18 and 19 models, some of these checks fall apart. While reading the temperature target MSR, cpu_has_tjmax() performs model checks only to determine if a device warning should be printed. Instead of expanding the checks, get rid of the function and print the warning once unconditionally if the MSR read fails. The checks aren't worth preventing a single line warning to dmesg. Update the rest of the x86_model checks with VFM ones to make them more robust. This automatically covers the upcoming Family 18 and 19 as well as any future extended families. Add a code comment to reflect that none of the CPUs in Family 5 or Family 15 set X86_FEATURE_DTHERM. The VFM checks do not impact these CPUs since the driver does not load on them. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Signed-off-by: Sohil Mehta <sohil.mehta@intel.com> Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com> Link: https://lore.kernel.org/r/20250828201729.1145420-1-sohil.mehta@intel.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (pmbus/isl68137) add support for Renesas RAA228244 and RAA228246Grant Peltier1-0/+6
The RAA228244 and RAA228246 are both recently released digital dual-output multiphase PWM controllers. Signed-off-by: Grant Peltier <grantpeltier93@gmail.com> Link: https://lore.kernel.org/r/70bb08e291bd57722b1b0edf732cd0017714ef07.1756331945.git.grantpeltier93@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (sbtsi_temp) AMD CPU extended temperature range supportChuande Chen1-15/+31
Many AMD CPUs can support this feature now. We would get a wrong CPU DIE temperature if don't consider this. In low-temperature environments, the CPU die temperature can drop below zero. So many platforms would like to make extended temperature range as their default configuration. Default temperature range (0C to 255.875C). Extended temperature range (-49C to +206.875C). Ref Doc: AMD V3000 PPR (Doc ID #56558). Signed-off-by: Chuande Chen <chuachen@cisco.com> Link: https://lore.kernel.org/r/20250814053940.96764-1-chenchuande@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (lenovo-ec-sensors) Update P8 supprtDavid Ober1-4/+30
This fixes differences for the P8 system that was initially set to the same thermal values as the P7, also adds in the PSU sensor for all of the supported systems Signed-off-by: David Ober <dober@lenovo.com> Signed-off-by: David Ober <dober6023@gmail.com> Link: https://lore.kernel.org/r/20250807103228.10465-1-dober6023@gmail.com [groeck: Update subject] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (sch56xx-common) don't print superfluous errorsWolfram Sang1-3/+1
The watchdog core will handle error messages already. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/20250813190728.3682-2-wsa+renesas@sang-engineering.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (k10temp) Add device ID for Strix HaloRong Zhang1-0/+1
The device ID of Strix Halo Data Fabric Function 3 has been in the tree since commit 0e640f0a47d8 ("x86/amd_nb: Add new PCI IDs for AMD family 0x1a"), but is somehow missing from k10temp_id_table. Add it so that it works out of the box. Tested on Beelink GTR9 Pro Mini PC. Signed-off-by: Rong Zhang <i@rong.moe> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20250823180443.85512-1-i@rong.moe Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (ltc4282) remove the use of dev_err_probe()Liao Yuanhong1-2/+1
Logging messages that show some type of "out of memory" error are generally unnecessary as there is a generic message and a stack dump done by the memory subsystem. These messages generally increase kernel size without much added value[1]. The dev_err_probe() doesn't do anything when error is '-ENOMEM'. Therefore, remove the useless call to dev_err_probe(), and just return the value instead. [1]: https://lore.kernel.org/lkml/1402419340.30479.18.camel@joe-AO725/ Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com> Link: https://lore.kernel.org/r/20250820131509.502007-1-liaoyuanhong@vivo.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (pmbus/adm1275) add sq24905c supportChiShih Tsai2-4/+10
Add support for sq24905c which is similar to adm1275 and other chips of the series. Signed-off-by: ChiShih Tsai <tomtsai764@gmail.com> Link: https://lore.kernel.org/r/20250806223724.1207-3-tomtsai764@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (asus-ec-sensors) Narrow lock for X870E-CREATOR WIFIEugene Shalygin1-1/+1
Use mutex from the SIO device rather than the global lock. Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Fixes: 3e538b52157b ("hwmon: (asus-ec-sensors) add ProArt X870E-CREATOR WIFI") Link: https://lore.kernel.org/r/20250805203157.18446-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (asus-ec-sensors) Add Z790-I GAMING WIFIJamie Vickery1-0/+11
Add support for the ROG STRIX Z790-I GAMING WIFI board Signed-off-by: Jamie Vickery <j.a.d.mcmillan@gmail.com> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20250802130912.175543-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (asus-ec-sensors) Add X670E-I GAMING WIFIRunar Grønås1-0/+9
Add support for ROG STRIX X670E-I GAMING WIFI Signed-off-by: Runar Grønås <noizez@me.com> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20250801195020.11106-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (lm75) Add NXP P3T1750 supportLakshay Piplani1-0/+13
Add support for lm75 compatible NXP P3T1750 temperature sensor. Signed-off-by: Lakshay Piplani <lakshay.piplani@nxp.com> Link: https://lore.kernel.org/r/20250728041913.3754236-2-lakshay.piplani@nxp.com [groeck: Fixed alphabetic order for new chip entries] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (asus-ec-sensors) Add ROG STRIX Z790E GAMING WIFI IINicholas Flintham1-1/+24
Add support for the ROG STRIX Z790E GAMING WIFI II board. Signed-off-by: Nicholas Flintham <nick@flinny.org> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20250728205133.15487-4-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (asus-ec-sensors) Add B650E-IDylan Tackoor1-0/+9
Add support for ROG STRIX B650E-I GAMING WIFI. Signed-off-by: Dylan Tackoor <mynameisdylantackoor@gmail.com> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20250728205133.15487-3-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (asus-ec-sensors) Add STRIX B850-I GAMING WIFILucas Yunkyu Lee1-0/+9
Add support for the STRIX B850-I GAMING WIFI Signed-off-by: Lucas Yunkyu Lee <lucas@yklcs.com> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20250728205133.15487-2-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-07hwmon: (k10temp) Add thermal support for AMD Family 1Ah-based modelsAvadhut Naik1-0/+9
Add thermal info support for newer AMD Family 1Ah-based models. Signed-off-by: Avadhut Naik <avadhut.naik@amd.com> Link: https://lore.kernel.org/r/20250729001644.257645-1-avadhut.naik@amd.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-01hwmon: (ina238) Correctly clamp power limitsGuenter Roeck1-2/+3
ina238_write_power() was attempting to clamp the user input but was throwing away the result. Ensure that we clamp the value to the appropriate range before it is converted into a register value. Fixes: 0d9f596b1fe34 ("hwmon: (ina238) Modify the calculation formula to adapt to different chips") Cc: Wenliang Yan <wenliang202407@163.com> Cc: Chris Packham <chris.packham@alliedtelesis.co.nz> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-09-01hwmon: (ina238) Correctly clamp shunt voltage limitGuenter Roeck1-1/+1
When clamping a register value, the result needs to be masked against the register size. This was missing, resulting in errors when trying to write negative limits. Fix by masking the clamping result against the register size. Fixes: eacb52f010a80 ("hwmon: Driver for Texas Instruments INA238") Cc: Nathan Rossi <nathan.rossi@digi.com> Cc: Chris Packham <chris.packham@alliedtelesis.co.nz> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-08-29hwmon: (ina238) Correctly clamp temperatureChris Packham1-1/+1
ina238_write_temp() was attempting to clamp the user input but was throwing away the result. Ensure that we clamp the value to the appropriate range before it is converted into a register value. Fixes: 0d9f596b1fe3 ("hwmon: (ina238) Modify the calculation formula to adapt to different chips") Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Link: https://lore.kernel.org/r/20250829030512.1179998-3-chris.packham@alliedtelesis.co.nz Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-08-29hwmon: mlxreg-fan: Prevent fans from getting stuck at 0 RPMVadim Pasternak1-3/+2
The fans controlled by the driver can get stuck at 0 RPM if they are configured below a 20% duty cycle. The driver tries to avoid this by enforcing a minimum duty cycle of 20%, but this is done after the fans are registered with the thermal subsystem. This is too late as the thermal subsystem can set their current state before the driver is able to enforce the minimum duty cycle. Fix by setting the minimum duty cycle before registering the fans with the thermal subsystem. Fixes: d7efb2ebc7b3 ("hwmon: (mlxreg-fan) Extend driver to support multiply cooling devices") Reported-by: Nikolay Aleksandrov <razor@blackwall.org> Tested-by: Nikolay Aleksandrov <razor@blackwall.org> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Vadim Pasternak <vadimp@nvidia.com> Link: https://lore.kernel.org/r/20250730201715.1111133-1-vadimp@nvidia.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-08-07treewide: rename GPIO set callbacks back to their original namesBartosz Golaszewski2-3/+3
The conversion of all GPIO drivers to using the .set_rv() and .set_multiple_rv() callbacks from struct gpio_chip (which - unlike their predecessors - return an integer and allow the controller drivers to indicate failures to users) is now complete and the legacy ones have been removed. Rename the new callbacks back to their original names in one sweeping change. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-07-31Merge tag 'clk-for-linus' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "This is the usual collection of primarily clk driver updates. The big part of the diff is all the new Qualcomm clk drivers added for a few SoCs they're working on. The other two vendors with significant work this cycle are Renesas and Amlogic. Renesas adds a bunch of clks to existing drivers and supports some new SoCs while Amlogic is starting a significant refactoring to simplify their code. The core framework gained a pair of helpers to get the 'struct device' or 'struct device_node' associated with a 'struct clk_hw'. Some associated KUnit tests were added for these simple helpers as well. Beyond that core change there are lots of little fixes throughout the clk drivers for the stuff we see every day, wrong clk driver data that affects tree topology or supported frequencies, etc. They're not found until the clks are actually used by some consumer device driver. New Drivers: - Global, display, gpu, video, camera, tcsr, and rpmh clock controller for the Qualcomm Milos SoC - Camera, display, GPU, and video clock controllers for Qualcomm QCS615 - Video clock controller driver for Qualcomm SM6350 - Camera clock controller driver for Qualcomm SC8180X - I3C clocks and resets on Renesas RZ/G3E - Expanded Serial Peripheral Interface (xSPI) clocks and resets on Renesas RZ/V2H(P) and RZ/V2N - SPI (RSPI) clocks and resets on Renesas RZ/V2H(P) - SDHI and I2C clocks on Renesas RZ/T2H and RZ/N2H - Ethernet clocks and resets on Renesas RZ/G3E - Initial support for the Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs - Ethernet clocks and resets on Renesas RZ/V2H and RZ/V2N - Timer, I2C, watchdog, GPU, and USB2.0 clocks and resets on Renesas RZ/V2N Updates: - Support atomic PWMs in the PWM clk driver - clk_hw_get_dev() and clk_hw_get_of_node() helpers - Replace round_rate() with determine_rate() in various clk drivers - Convert clk DT bindings to DT schema format for DT validation - Various clk driver cleanups and refactorings from static analysis tools and possibly real humans - A lot of little fixes here and there to things like clk tree topology, missing frequencies, flagging clks as critical, etc" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (216 commits) clk: clocking-wizard: Fix the round rate handling for versal clk: Fix typos clk: spacemit: ccu_pll: fix error return value in recalc_rate callback clk: tegra: periph: Make tegra_clk_periph_ops static clk: tegra: periph: Fix error handling and resolve unsigned compare warning clk: imx: scu: convert from round_rate() to determine_rate() clk: imx: pllv4: convert from round_rate() to determine_rate() clk: imx: pllv3: convert from round_rate() to determine_rate() clk: imx: pllv2: convert from round_rate() to determine_rate() clk: imx: pll14xx: convert from round_rate() to determine_rate() clk: imx: pfd: convert from round_rate() to determine_rate() clk: imx: frac-pll: convert from round_rate() to determine_rate() clk: imx: fracn-gppll: convert from round_rate() to determine_rate() clk: imx: fixup-div: convert from round_rate() to determine_rate() clk: imx: cpu: convert from round_rate() to determine_rate() clk: imx: busy: convert from round_rate() to determine_rate() clk: imx: composite-93: remove round_rate() in favor of determine_rate() clk: imx: composite-8m: remove round_rate() in favor of determine_rate() clk: qcom: Remove redundant pm_runtime_mark_last_busy() calls clk: imx: Remove redundant pm_runtime_mark_last_busy() calls ...
2025-07-31Merge tag 'hwmon-for-v6.17' of ↵Linus Torvalds15-96/+606
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: "Updated chip support in existing drivers: - ina238: Support for INA228 - pmbus/tps53679: Support for TPS53685 - pmbus/adp1050: Support for adp1051, adp1055 and ltp8800 - corsair-psu: Support for HX1200i Series 2025 - pmbus/isl68137: Support for RAA229621 - asus-ec-sensors: Support for ProArt X870E-CREATOR WIFI and Other notable changes: - adt7475: Support for #pwm-cells = <3> - amc6821: Cooling device support - emc2305: Support for PWM frequency, polarity and output - Add missing compatible entries to various devicetree bindings And various other minor fixes and improvements" * tag 'hwmon-for-v6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (34 commits) dt-bindings: hwmon: Replace bouncing Alexandru Tachici emails hwmon: (ina238) Add support for INA228 dt-bindings: Add INA228 to ina2xx devicetree bindings hwmon: (ina238) Fix inconsistent whitespace dt-bindings: hwmon: adt7475: Allow and recommend #pwm-cells = <3> hwmon: (adt7475) Implement support for #pwm-cells = <3> hwmon: (pmbus/tps53679) Add support for TPS53685 dt-bindings: trivial: Add tps53685 support hwmon: (pmbus/adp1050) Add regulator support for ltp8800 hwmon: (pmbus/adp1050) Add support for adp1051, adp1055 and ltp8800 dt-bindings: hwmon: pmbus/adp1050: Add adp1051, adp1055 and ltp8800 hwmon: (max31827) use sysfs_emit() in temp1_resolution_show() hwmon: (ltc4282) convert from round_rate() to determine_rate() hwmon: (corsair-psu) add support for HX1200i Series 2025 dt-bindings: hwmon: pmbus: ti,ucd90320: Add missing compatibles dt-bindings: hwmon: maxim,max20730: Add maxim,max20710 compatible dt-bindings: hwmon: lltc,ltc2978: Add lltc,ltc713 compatible dt-bindings: hwmon: ti,lm87: Add adi,adm1024 compatible dt-bindings: hwmon: national,lm90: Add missing Dallas max6654 and onsemi nct72, nct214, and nct218 hwmon: (w83627ehf) make the read-only arrays 'bit' static const ...
2025-07-28Merge tag 'pwm/for-6.17-rc1' of ↵Linus Torvalds3-0/+189
git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux Pull pwm updates from Uwe Kleine-König: "Apart from the usual mix of new drivers (pwm-argon-fan-hat), adding support for variants to existing drivers, minor improvements to both drivers and docs, device tree documenation updates, the noteworthy changes are: - A hwmon companion driver to pwm-mc33xs2410 living in drivers/hwmon and acked by Guenter Roeck - chardev support for PWM devices. This leverages atomic PWM updates to userspace and at the same time simplifies and accelerates PWM configuration changes" * tag 'pwm/for-6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux: (35 commits) pwm: raspberrypi-poe: Fix spelling mistake "Firwmware" -> "Firmware" hwmon: add support for MC33XS2410 hardware monitoring pwm: mc33xs2410: add hwmon support pwm: img: Remove redundant pm_runtime_mark_last_busy() calls pwm: Expose PWM_WFHWSIZE in public header dt-bindings: pwm: Convert lpc32xx-pwm.txt to yaml format docs: pwm: Adapt Locking paragraph to reality pwm: twl-led: Drop driver local locking pwm: sun4i: Drop driver local locking pwm: sti: Drop driver local locking pwm: microchip-core: Drop driver local locking pwm: lpc18xx-sct: Drop driver local locking pwm: fsl-ftm: Drop driver local locking pwm: clps711x: Drop driver local locking pwm: atmel: Drop driver local locking pwm: argon-fan-hat: Add Argon40 Fan HAT support dt-bindings: pwm: argon40,fan-hat: Document Argon40 Fan HAT dt-bindings: vendor-prefixes: Document Argon40 pwm: pwm-mediatek: Add support for PWM IP V3.0.2 in MT6991/MT8196 pwm: pwm-mediatek: Pass PWM_CK_26M_SEL from platform data ...
2025-07-27hwmon: (ina238) Add support for INA228Jonas Rebmann1-5/+101
Add support for the Texas Instruments INA228 Ultra-Precise Power/Energy/Charge Monitor. The INA228 is very similar to the INA238 but offers four bits of extra precision in the temperature, voltage and current measurement fields. It also supports energy and charge monitoring, the latter of which is not supported through this patch. While it seems in the datasheet that some constants such as LSB values differ between the 228 and the 238, they differ only for those registers where four bits of precision have been added and they differ by a factor of 16 (VBUS, VSHUNT, DIETEMP, CURRENT). Therefore, the INA238 constants are still applicable with regard to the bit of the same significance. Signed-off-by: Jonas Rebmann <jre@pengutronix.de> Link: https://lore.kernel.org/r/20250718-ina228-v2-3-227feb62f709@pengutronix.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-07-27hwmon: (ina238) Fix inconsistent whitespaceJonas Rebmann1-14/+14
Some purely cosmetic changes in ina238.c: - When aligning definitions, do so consistently with tab stop of 8. - Use spaces instead of tabs around operators. - Align wrapped lines. Signed-off-by: Jonas Rebmann <jre@pengutronix.de> Link: https://lore.kernel.org/r/20250718-ina228-v2-1-227feb62f709@pengutronix.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-07-24hwmon: add support for MC33XS2410 hardware monitoringDimitri Fedrau3-0/+189
The device is able to monitor temperature, voltage and current of each of the four outputs. Add basic support for monitoring the temperature of the four outputs and the die temperature. Signed-off-by: Dimitri Fedrau <dimitri.fedrau@liebherr.com> Acked-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20250723-mc33xs2410-hwmon-v5-2-f62aab71cd59@liebherr.com Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
2025-07-20hwmon: (adt7475) Implement support for #pwm-cells = <3>Uwe Kleine-König1-3/+17
The adt7475 driver and binding are outliers requiring 4 pwm-cells. The typical value is 3, there are a few devices that use a lesser value for historical reasons, no other uses a value bigger than 3. Implement support for 3 cells to make the adt7475 binding match the usual PWM binding. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://lore.kernel.org/r/b5cc994cbe74095e39468fd694c721d7c879db78.1750361514.git.u.kleine-koenig@baylibre.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-07-20hwmon: (pmbus/tps53679) Add support for TPS53685Chiang Brian1-6/+31
The TPS53685 is a fully AMD SVI3 compliant step down controller with trans-inductor voltage regulator(TLVR) topology support, dual channels, built-in non-volatile memory (NVM), PMBus interface, and full compatible with TI NexFET smart power stages. Add support for it to the tps53679 driver. Signed-off-by: Chiang Brian <chiang.brian@inventec.com> Link: https://lore.kernel.org/r/20250619064223.3165523-3-chiang.brian@inventec.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-07-20hwmon: (pmbus/adp1050) Add regulator support for ltp8800Cedric Encarnacion2-0/+19
Add regulator support for the single-channel LTP8800-1A/-2/-4A 150A/135A/200A DC/DC µModule Regulator. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Cedric Encarnacion <cedricjustine.encarnacion@analog.com> Link: https://lore.kernel.org/r/20250709-adp1051-v5-3-539254692252@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-07-20hwmon: (pmbus/adp1050) Add support for adp1051, adp1055 and ltp8800Cedric Encarnacion1-3/+59
Introduce hardware monitoring support for the following devices: ADP1051: 6 PWM for I/O Voltage, I/O Current, Temperature ADP1055: 6 PWM for I/O Voltage, I/O Current, Power, Temperature LTP8800-1A/-2/-4A: 150A/135A/200A DC/DC µModule Regulator The ADP1051 and ADP1055 are similar digital controllers for high efficiency DC-DC power conversion while the LTP8800 is a family of step-down μModule regulators that provides microprocessor core voltage from 54V power distribution architecture. All of the above components features telemetry monitoring of input/output voltage, input current, output power, and temperature over PMBus. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Co-developed-by: Alexis Czezar Torreno <alexisczezar.torreno@analog.com> Signed-off-by: Alexis Czezar Torreno <alexisczezar.torreno@analog.com> Signed-off-by: Cedric Encarnacion <cedricjustine.encarnacion@analog.com> Link: https://lore.kernel.org/r/20250709-adp1051-v5-2-539254692252@analog.com [groeck: Dropped unnecessaary spaces after type casts] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-07-20hwmon: (max31827) use sysfs_emit() in temp1_resolution_show()Khaled Elnaggar1-1/+1
Replace scnprintf() with sysfs_emit() in temp1_resolution_show(), as recommended in Documentation/filesystems/sysfs.rst: show() callbacks should use sysfs_emit() or sysfs_emit_at() to format values returned to userspace. Signed-off-by: Khaled Elnaggar <khaledelnaggarlinux@gmail.com> Link: https://lore.kernel.org/r/20250712131447.326995-1-khaledelnaggarlinux@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-07-20hwmon: (ltc4282) convert from round_rate() to determine_rate()Brian Masney1-5/+7
The round_rate() clk ops is deprecated, so migrate this driver from round_rate() to determine_rate() using the Coccinelle semantic patch appended to the "under-the-cut" portion of the patch. Signed-off-by: Brian Masney <bmasney@redhat.com> Link: https://lore.kernel.org/r/20250710-hwmon-round-rate-v1-1-64fbe4bf3d05@redhat.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-07-20hwmon: (corsair-psu) add support for HX1200i Series 2025Shantanu Tushar1-0/+1
Add the USB ID of the Corsair HXi Series 2025 HX1200i PSU (CP-9020307). Update the documentation to mention this. Signed-off-by: Shantanu Tushar <shantanu@kde.org> Reviewed-by: Wilken Gottwalt <wilken.gottwalt@posteo.net> Link: https://lore.kernel.org/r/20250630201444.210420-1-shantanu@kde.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-07-20hwmon: (w83627ehf) make the read-only arrays 'bit' static constColin Ian King1-3/+6
Don't populate the read-only arrays 'bit' on the stack at run time, instead make them static const. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20250714155505.1234012-1-colin.i.king@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-07-20hwmon: (emc2305) Set initial PWM minimum value during probe based on thermal ↵Florin Leotescu1-2/+8
state Prevent the PWM value from being set to minimum when thermal zone temperature exceeds any trip point during driver probe. Otherwise, the PWM fan speed will remains at minimum speed and not respond to temperature changes. Signed-off-by: Florin Leotescu <florin.leotescu@nxp.com> Link: https://lore.kernel.org/r/20250603113125.3175103-5-florin.leotescu@oss.nxp.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-07-20hwmon: (emc2305) Enable PWM polarity and output configurationFlorin Leotescu1-0/+14
Enable configuration of PWM polarity and PWM output config based Device Tree properties. Signed-off-by: Florin Leotescu <florin.leotescu@nxp.com> Link: https://lore.kernel.org/r/20250603113125.3175103-4-florin.leotescu@oss.nxp.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-07-20hwmon: (emc2305) Configure PWM channels based on DT propertiesFlorin Leotescu1-22/+129
Add support for configuring each PWM channel using Device Tree (DT) properties by parsing the 'pwms' phandle arguments. Signed-off-by: Florin Leotescu <florin.leotescu@nxp.com> Link: https://lore.kernel.org/r/20250603113125.3175103-3-florin.leotescu@oss.nxp.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-07-20hwmon: (emc2305) Add support for PWM frequency, polarity and outputFlorin Leotescu1-0/+6
Add three new attributes to the driver data structures to support configuration of PWM frequency, PWM polarity and PWM output config. Signed-off-by: Florin Leotescu <florin.leotescu@nxp.com> Link: https://lore.kernel.org/r/20250603113125.3175103-2-florin.leotescu@oss.nxp.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-07-20hwmon: (amc6821) Add cooling device supportJoão Paulo Gonçalves1-6/+107
Add support for using the AMC6821 as a cooling device. The AMC6821 registers with the thermal framework only if the `cooling-levels` property is present in the fan device tree child node. If this property is present, the driver assumes the fan will operate in open-loop, and the kernel will control it directly. In this case, the driver will change the AMC6821 mode to manual (software DCY) and set the initial PWM duty cycle to the maximum fan cooling state level as defined in the DT. It is worth mentioning that the cooling device is registered on the child fan node, not on the fan controller node. Existing behavior is unchanged, so the AMC6821 can still be used without the thermal framework (hwmon only). Signed-off-by: João Paulo Gonçalves <joao.goncalves@toradex.com> Link: https://lore.kernel.org/r/20250613-b4-amc6821-cooling-device-support-v4-3-a8fc063c55de@toradex.com [groeck: Reduced line length when registering thermal device] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-07-20hwmon: (amc6821) Move reading fan data from OF to a functionJoão Paulo Gonçalves1-8/+16
Move fan property reading from OF to a separate function. This keeps OF data handling separate from the code logic and makes it easier to add features like cooling device support that use the same fan node. Signed-off-by: João Paulo Gonçalves <joao.goncalves@toradex.com> Link: https://lore.kernel.org/r/20250613-b4-amc6821-cooling-device-support-v4-2-a8fc063c55de@toradex.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2025-07-20hwmon: (ibmaem) match return type of wait_for_completion_timeoutQiushi Wu1-19/+8
Return type of wait_for_completion_timeout is unsigned long not int. Check its return value inline instead of introducing a throw-away variable. Reviewed-by: Mimi Zohar <zohar@linux.ibm.com> Signed-off-by: Qiushi Wu <qiushi@linux.ibm.com> Link: https://lore.kernel.org/r/20250613182413.1426367-1-qiushi@linux.ibm.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>