summaryrefslogtreecommitdiffstats
path: root/drivers
AgeCommit message (Collapse)AuthorLines
2026-03-31staging: rtl8723bs: refactor rtw_joinbss_event_prehandle to reduce indentationJose A. Perez de Azpillaga-65/+70
The rtw_joinbss_event_prehandle function has excessive indentation due to deeply nested if-statements. Refactor the function using early returns and guard clauses for the failure paths. This flattens the code and significantly improves readability. Signed-off-by: Jose A. Perez de Azpillaga <azpijr@gmail.com> Reviewed-by: Luka Gejak <luka.gejak@linux.dev> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/20260321182713.665872-3-azpijr@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-03-31staging: rtl8723bs: remove dead REJOIN codeJose A. Perez de Azpillaga-26/+2
The REJOIN macro is not defined anywhere in the kernel tree. Remove this dead code to simplify the function. Signed-off-by: Jose A. Perez de Azpillaga <azpijr@gmail.com> Reviewed-by: Luka Gejak <luka.gejak@linux.dev> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/20260321182713.665872-2-azpijr@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-03-31staging: rtl8723bs: use guard clause for stainfo checkLin YuChen-49/+47
Continue the refactor of rtw_aes_decrypt() by introducing a guard clause for the stainfo check. This allows the subsequent multicast and unicast decryption logic to be moved one indentation level to the left, further improving code readability. Signed-off-by: Lin YuChen <starpt.official@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/20260319120737.29692-3-starpt.official@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-03-31staging: rtl8723bs: use guard clause for AES checkLin YuChen-52/+52
Refactor the AES encryption check by using a guard clause to reduce the indentation level of the subsequent logic. Signed-off-by: Lin YuChen <starpt.official@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/20260319120737.29692-2-starpt.official@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-03-31staging: rtl8723bs: split multiple assignment in rtw_mgmt_xmitframe_coalesceMarco Antonio Solis Segura-2/+3
Cleanup the multiple assignment of tmp_buf and BIP_AAD to fix the checkpatch.pl CHECK: "Multiple assignments should be avoided". Additionally, reorder the assignments to ensure tmp_buf is assigned only after BIP_AAD has been validated as non-NULL. Signed-off-by: Marco Antonio Solis Segura <mshdevv@gmail.com> Link: https://patch.msgid.link/20260319062626.605200-1-mshdevv@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-03-31ata: libahci_platform: use flex array for platform PHYsRosen Penev-19/+17
Modify struct ahci_host_priv to use a flexible array member for an adapter port PHYs and use struct_size to combine the allocation of this array together with the adapter private data structure. __counted_by() annotation is added for the phys field to support runtime analysis. Signed-off-by: Rosen Penev <rosenp@gmail.com> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Signed-off-by: Niklas Cassel <cassel@kernel.org>
2026-03-31staging: rtl8723bs: Remove dead codeBera Yüzlü-34/+0
Clean up the dm_odm_t structure by removing commented-out members and related legacy comments. Signed-off-by: Bera Yüzlü <b9788213@gmail.com> Reviewed-by: Ethan Tidmore <ethantidmore06@gmail.com> Link: https://patch.msgid.link/20260318195005.23962-1-b9788213@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-03-31r8152: add helper functions for PHY OCP registersChih Kai Hsu-471/+226
Add the following bitwise operation functions for PHY OCP registers to simplify the code. - ocp_reg_w0w1() - ocp_reg_clr_bits() - ocp_reg_set_bits() - sram_write_w0w1() - sram_clr_bits() - sram_set_bits() - r8152_mdio_clr_bit() - r8152_mdio_set_bit() - r8152_mdio_test_and_clr_bit() In addition, remove variable set but not used from r8153_init(), r8153b_init() and r8153c_init(). Signed-off-by: Chih Kai Hsu <hsu.chih.kai@realtek.com> Reviewed-by: Hayes Wang <hayeswang@realtek.com> Link: https://patch.msgid.link/20260326073925.32976-456-nic_swsd@realtek.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-03-31r8152: add helper functions for PLA/USB OCP registersChih Kai Hsu-695/+408
Add the following bitwise operation functions for PLA/USB OCP registers to simplify the code. - ocp_dword_w0w1() - ocp_word_w0w1() - ocp_byte_w0w1() - ocp_dword_clr_bits() - ocp_dword_set_bits() - ocp_word_clr_bits() - ocp_word_set_bits() - ocp_word_test_and_clr_bits() - ocp_byte_clr_bits() - ocp_byte_set_bits() Signed-off-by: Chih Kai Hsu <hsu.chih.kai@realtek.com> Reviewed-by: Hayes Wang <hayeswang@realtek.com> Link: https://patch.msgid.link/20260326073925.32976-455-nic_swsd@realtek.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-03-31r8152: fix incorrect register write to USB_UPHY_XTALChih Kai Hsu-1/+1
The old code used ocp_write_byte() to clear the OOBS_POLLING bit (BIT(8)) in the USB_UPHY_XTAL register, but this doesn't correctly clear a bit in the upper byte of the 16-bit register. Fix this by using ocp_write_word() instead. Fixes: 195aae321c82 ("r8152: support new chips") Signed-off-by: Chih Kai Hsu <hsu.chih.kai@realtek.com> Reviewed-by: Hayes Wang <hayeswang@realtek.com> Link: https://patch.msgid.link/20260326073925.32976-454-nic_swsd@realtek.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-03-31irqchip/riscv-aplic: Restrict genpd notifier to device tree onlyJessica Liu-2/+2
On ACPI systems, the aplic's pm_domain is set to acpi_general_pm_domain, which provides its own power management callbacks (e.g., runtime_suspend via acpi_subsys_runtime_suspend). aplic_pm_add() unconditionally calls dev_pm_genpd_add_notifier() when dev->pm_domain is non‑NULL, leading to a comparison between runtime_suspend and genpd_runtime_suspend. This results in the following errors when ACPI is enabled: riscv-aplic RSCV0002:00: failed to create APLIC context riscv-aplic RSCV0002:00: error -ENODEV: failed to setup APLIC in MSI mode Fix this by checking for dev->of_node before adding or removing the genpd notifier, ensuring it is only used for device tree based systems. Fixes: 95a8ddde3660 ("irqchip/riscv-aplic: Preserve APLIC states across suspend/resume") Signed-off-by: Jessica Liu <liu.xuemei1@zte.com.cn> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Link: https://patch.msgid.link/20260331093029749vRpdH-0qoEqjS0Wnn9M4x@zte.com.cn
2026-03-31power: sequencing: pcie-m2: Create serdev device for WCN7850 bluetoothManivannan Sadhasivam-16/+240
For supporting bluetooth over the non-discoverable UART interface of WCN7850, create the serdev device after enumerating the PCIe interface. This is mandatory since the device ID is only known after the PCIe enumeration and the ID is used for creating the serdev device. Since by default there is no OF or ACPI node for the created serdev, create a dynamic OF 'bluetooth' node with the 'compatible' property and attach it to the serdev device. This will allow the serdev device to bind to the existing bluetooth driver. Tested-by: Hans de Goede <johannes.goede@oss.qualcomm.com> # ThinkPad T14s gen6 (arm64) Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com> Link: https://patch.msgid.link/20260326-pci-m2-e-v7-8-43324a7866e6@oss.qualcomm.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-03-31power: sequencing: pcie-m2: Add support for PCIe M.2 Key E connectorsManivannan Sadhasivam-6/+101
Add support for handling the power sequence of the PCIe M.2 Key E connectors. These connectors are used to attach the Wireless Connectivity devices to the host machine including combinations of WiFi, BT, NFC using interfaces such as PCIe/SDIO for WiFi, USB/UART for BT and I2C for NFC. Currently, this driver supports only the PCIe interface for WiFi and UART interface for BT. The driver also only supports driving the 3.3v/1.8v power supplies and W_DISABLE{1/2}# GPIOs. The optional signals of the Key E connectors are not currently supported. Tested-by: Hans de Goede <johannes.goede@oss.qualcomm.com> # ThinkPad T14s gen6 (arm64) Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com> Link: https://patch.msgid.link/20260326-pci-m2-e-v7-7-43324a7866e6@oss.qualcomm.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-03-31serdev: Do not return -ENODEV from of_serdev_register_devices() if external ↵Manivannan Sadhasivam-1/+8
connector is used If an external connector like M.2 is connected to the serdev controller in DT, then the serdev devices may be created dynamically by the connector driver. So do not return -ENODEV from of_serdev_register_devices() if the static nodes are not found and the graph node is used. Tested-by: Hans de Goede <johannes.goede@oss.qualcomm.com> # ThinkPad T14s gen6 (arm64) Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20260326-pci-m2-e-v7-3-43324a7866e6@oss.qualcomm.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-03-31serdev: Add an API to find the serdev controller associated with the ↵Manivannan Sadhasivam-0/+19
devicetree node Add of_find_serdev_controller_by_node() API to find the serdev controller device associated with the devicetree node. Tested-by: Hans de Goede <johannes.goede@oss.qualcomm.com> # ThinkPad T14s gen6 (arm64) Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20260326-pci-m2-e-v7-2-43324a7866e6@oss.qualcomm.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-03-31RDMA/hns: Remove the duplicate calls to ib_copy_validate_udata_in()Jason Gunthorpe-19/+16
A udata should be read only once per ioctl, not multiple times. Multiple reads make it unclear what the content is since userspace can change it between the reads. Lift the ib_copy_validate_udata_in() out of alloc_srq_buf()/alloc_srq_db() and into hns_roce_create_srq(). Found by AI. Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
2026-03-31RDMA: Remove redundant = {} for udata req structsJason Gunthorpe-19/+21
Now that all of the udata request structs are loaded with the helpers the callers should not pre-zero them. The helpers all guarantee that the entire struct is filled with something. Reviewed-by: Long Li <longli@microsoft.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
2026-03-31RDMA/irdma: Add missing comp_mask check in alloc_ucontextJason Gunthorpe-1/+3
irdma has a comp_mask field that was never checked for validity, check it. Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Jacob Moroni <jmoroni@google.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
2026-03-31RDMA/hns: Add missing comp_mask check in create_qpJason Gunthorpe-1/+3
hns has a comp_mask field that was never checked for validity, check it. Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
2026-03-31RDMA/mlx5: Pull comp_mask validation into ib_copy_validate_udata_in_cm()Jason Gunthorpe-9/+8
Directly check the supported comp_mask bitmap using ib_copy_validate_udata_in_cm() and remove the open coding. Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
2026-03-31RDMA: Use ib_copy_validate_udata_in_cm() for zero comp_maskJason Gunthorpe-17/+13
All of these cases require a 0 comp_mask. Consolidate these into using ib_copy_validate_udata_in_cm() and remove the open coded comp_mask test. Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
2026-03-31RDMA/hns: Use ib_copy_validate_udata_in()Jason Gunthorpe-45/+8
Follow the last struct member from the commit when the struct was added to the kernel. Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
2026-03-31RDMA/mlx4: Use ib_copy_validate_udata_in() for QPJason Gunthorpe-22/+3
Move the validation of the udata to the same function that copies it. Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
2026-03-31RDMA/mlx4: Use ib_copy_validate_udata_in()Jason Gunthorpe-13/+10
Follow the last member of each struct at the point MLX4_IB_UVERBS_ABI_VERSION was set to 4. Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
2026-03-31RDMA/mlx5: Use ib_copy_validate_udata_in() for MWJason Gunthorpe-9/+6
The userspace side on MW made a mistake and never actually used the udata driver structure that was defined so it always passes 0 length. Keep the kernel structure but this conversion has to permit 0 length as well. Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
2026-03-31RDMA/mlx5: Use ib_copy_validate_udata_in() for SRQJason Gunthorpe-12/+3
flags is the last member for mlx5_ib_create_srq, the uidx is a later extension. Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
2026-03-31RDMA/pvrdma: Use ib_copy_validate_udata_in() for srqJason Gunthorpe-3/+2
struct pvrdma_create_srq was introduced when the driver was first merged but was never used. At that point it had only buf_addr. Later when SRQ was introduced the struct was expanded. So unlike the other cases that grab the first struct member based on git blame this uses the entire struct. Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
2026-03-31RDMA: Use ib_copy_validate_udata_in() for implicit full structsJason Gunthorpe-52/+45
All of these cases have git blames that say the entire current struct was introduced at once, so the last member is the right choice. Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
2026-03-31RDMA: Consolidate patterns with sizeof() to ib_copy_validate_udata_in()Jason Gunthorpe-47/+17
Similar to the prior patch, these patterns are open coding an offsetofend() using sizeof(), which targets the last member of the current struct. Reviewed-by: Long Li <longli@microsoft.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Bernard Metzler <bernard.metzler@linux.dev> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
2026-03-31RDMA: Consolidate patterns with offsetof() to ib_copy_validate_udata_in()Jason Gunthorpe-14/+5
Similar to the prior patch, these patterns are open coding an offsetofend(). The use of offsetof() targets the prior field as the last field in the struct. Reviewed-by: Long Li <longli@microsoft.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
2026-03-31RDMA: Consolidate patterns with offsetofend() to ib_copy_validate_udata_in()Jason Gunthorpe-120/+26
Go treewide and consolidate all existing patterns using: * offsetofend() and variations * ib_is_udata_cleared() * ib_copy_from_udata() into a direct call to the new ib_copy_validate_udata_in(). Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
2026-03-31Merge tag 'drm-intel-next-2026-03-30' of ↵Dave Airlie-670/+943
https://gitlab.freedesktop.org/drm/i915/kernel into drm-next drm/i915 feature pull #2 for v7.1: Refactoring and cleanups: - Refactor LT PHY PLL handling to use the DPLL framework (Mika) - Implement display register polling and waits in display code (Ville) - Move PCH clock gating in display PCH file (Luca) - Add shared stepping info header for i915 and display (Jani) - Clean up GVT I2C command decoding (Jonathan) - NV12 plane unlinking cleanups (Ville) - Clean up NV12 DDB/watermark handling for pre-ICL platforms (Ville) Fixes: - An assortment of DSI fixes (Ville) - Handle PORT_NONE in assert_port_valid() (Jonathan) - Fix link failure without FBDEV emulation (Arnd Bergmann) - Quirk disable panel replay on certain Dell XPS models (Jouni) - Check if VESA DPCD AUX backlight is possible (Suraj) Other: - Mailmap update for Christoph (Christoph) Signed-off-by: Dave Airlie <airlied@redhat.com> # Conflicts: # drivers/gpu/drm/i915/display/intel_plane.c From: Jani Nikula <jani.nikula@intel.com> Link: https://patch.msgid.link/ac9dfdb745d5a67c519ea150a6f36f8f74b8760e@intel.com
2026-03-31drm/i915/dp: Use crtc_state->enhanced_framing properly on ivb/hsw CPU eDPVille Syrjälä-1/+1
Looks like I missed the drm_dp_enhanced_frame_cap() in the ivb/hsw CPU eDP code when I introduced crtc_state->enhanced_framing. Fix it up so that the state we program to the hardware is guaranteed to match what we computed earlier. Cc: stable@vger.kernel.org Fixes: 3072a24c778a ("drm/i915: Introduce crtc_state->enhanced_framing") Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/20260325135849.12603-3-ville.syrjala@linux.intel.com Reviewed-by: Michał Grzelak <michal.grzelak@intel.com> (cherry picked from commit 799fe8dc2af52f35c78c4ac97f8e34994dfd8760) Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2026-03-31drm/i915/cdclk: Do the full CDCLK dance for min_voltage_level changesVille Syrjälä-0/+54
Apparently I forgot about the pipe min_voltage_level when I decoupled the CDCLK calculations from modesets. Even if the CDCLK frequency doesn't need changing we may still need to bump the voltage level to accommodate an increase in the port clock frequency. Currently, even if there is a full modeset, we won't notice the need to go through the full CDCLK calculations/programming, unless the set of enabled/active pipes changes, or the pipe/dbuf min CDCLK changes. Duplicate the same logic we use the pipe's min CDCLK frequency to also deal with its min voltage level. Note that the 'allow_voltage_level_decrease' stuff isn't really useful here since the min voltage level can only change during a full modeset. But I think sticking to the same approach in the three similar parts (pipe min cdclk, pipe min voltage level, dbuf min cdclk) is a good idea. Cc: stable@vger.kernel.org Tested-by: Mikhail Rudenko <mike.rudenko@gmail.com> Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15826 Fixes: ba91b9eecb47 ("drm/i915/cdclk: Decouple cdclk from state->modeset") Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/20260325135849.12603-2-ville.syrjala@linux.intel.com Reviewed-by: Michał Grzelak <michal.grzelak@intel.com> (cherry picked from commit 0f21a14987ebae3c05ad1184ea872e7b7a7b8695) Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2026-03-30hwmon: (ina2xx) drop unused platform dataBartosz Golaszewski-21/+4
Nobody defines struct ina2xx_platform_data. Remove platform data support from the drivers which still have it (it's effectively dead code) and remove the header. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Acked-by: Jonathan Cameron <jonathan.cameron@huawei.com> Link: https://lore.kernel.org/r/20260326-drop-ina2xx-pdata-v1-1-c159437bb2df@oss.qualcomm.com [groeck: Fixed continuation line alignment] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: Add label support for 64-bit energy attributesRong Zhang-0/+1
Since commit 0bcd01f757bc ("hwmon: Introduce 64-bit energy attribute support"), devices can report 64-bit energy values by selecting the sensor type "energy64". However, such sensors can't report their labels since is_string_attr() was not updated to match it. Add label support for 64-bit energy attributes by updating is_string_attr() to match hwmon_energy64 in addition to hwmon_energy. Signed-off-by: Rong Zhang <i@rong.moe> Link: https://lore.kernel.org/r/20260327-b4-hwmon-witrn-v1-1-8d2f1896c045@rong.moe Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (pmbus_core) Use guard() for mutex protectionGuenter Roeck-170/+107
Simplify the code by using guard() and scoped_guard() instead of mutex_lock()/mutex_unlock() sequences. This patch changes semantics for debugfs accesses. Previously, those used mutex_lock_interruptible() and not mutex_lock(). This change is intentional and should have little if any impact since locks should not be held for a significant amount of time and debugfs accesses are less critical than sysfs accesses (which never used interruptable locks). Reviewed-by: Sanman Pradhan <psanman@juniper.net> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (pmbus) Add support for guarded PMBus lockGuenter Roeck-0/+13
Add support for guard(pmbus_lock)() and scoped_guard(pmbus_lock)() to be able to simplify the PMBus code. Also introduce pmbus_lock() as pre-requisite for supporting guard(). Reviewed-by: Sanman Pradhan <psanman@juniper.net> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (pmbus/isl68137) Add support for Renesas RAA228942 and RAA228943Dawei Liu-0/+2
Add I2C device IDs for Renesas RAA228942 and RAA228943. At the Linux PMBus hwmon interface level currently supported by this driver, these devices are compatible with the existing 2-rail non-TC controllers, so devicetree will use fallback compatibles and no dedicated OF match entries are needed. Signed-off-by: Dawei Liu <dawei.liu.jy@renesas.com> Link: https://lore.kernel.org/r/20260325090208.857-3-dawei.liu.jy@renesas.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: lm75: Add support for labelFlaviu Nistor-1/+19
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/20260322162616.102229-1-flaviu.nistor@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (it87) Add support for IT8689EMarkus Hoffmann-3/+62
Add support for the ITE IT8689E Super I/O chip. The IT8689E supports newer autopwm, 12mV ADC, 16-bit fans, six fans, six PWM channels, PWM frequency 2, six temperature inputs, AVCC3, temperature offset, and fan on/off control. Give it8689 its own GPIO configuration block in it87_find() rather than sharing the it8620/it8628 block. The shared block reads IT87_SIO_PINX2_REG and either marks IN3 as internal AVCC or skips IN9. Because it8689 declares FEAT_AVCC3, IN9 is already marked as always-internal before the GPIO block is reached; applying the PINX2 check would either create duplicate AVCC labels on IN3 and IN9 or incorrectly skip IN9. Also update Documentation/hwmon/it87.rst and drivers/hwmon/Kconfig to document the newly supported chip. Signed-off-by: Markus Hoffmann <markus@thehoffs.at> Link: https://lore.kernel.org/r/20260322103301.18112-1-markus@thehoffs.at Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (nct6775) Add ASUS X870/W480 to WMI monitoring listDenis Pauk-0/+23
Boards such as * G15CE, * PRIME X870-P WIFI, * PRIME X870-P, * Pro WS W480-ACE, * ProArt X870E-CREATOR WIFI, * ROG CROSSHAIR X870E APEX, * ROG CROSSHAIR X870E DARK HERO, * ROG CROSSHAIR X870E EXTREME, * ROG CROSSHAIR X870E GLACIAL, * ROG CROSSHAIR X870E HERO BTF, * ROG CROSSHAIR X870E HERO, * ROG STRIX X870-A GAMING WIFI, * ROG STRIX X870-F GAMING WIFI, * ROG STRIX X870-I GAMING WIFI, * ROG STRIX X870E-E GAMING WIFI, * ROG STRIX X870E-E GAMING WIFI7 R2, * TUF GAMING X870-PLUS WIFI, * TUF GAMING X870-PRO WIFI7 W NEO, * TUF GAMING X870E-PLUS WIFI7, * W480/SYS, * X870 AYW GAMING WIFI W, * X870 MAX GAMING WIFI7 W, * X870 MAX GAMING WIFI7 have got a nct6775 chip, but by default there's no use of it because of resource conflict with WMI method. Add the boards to the WMI monitoring list. Link: https://bugzilla.kernel.org/show_bug.cgi?id=204807 Signed-off-by: Denis Pauk <pauk.denis@gmail.com> Tested-by: Tomáš Bžatek <bugs@bzatek.net> Tested-by: Theunis Scheepers <ptscheepers@gmail.com> Link: https://lore.kernel.org/r/20260322131848.6261-1-pauk.denis@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (pmbus/max31785) check for partial i2c_transfer in read_long_dataSanman Pradhan-3/+3
i2c_transfer() returns the number of messages successfully transferred, not only a negative errno on failure. When called with two messages (write command byte followed by a read of the 4-byte response), a return value of 1 means the command write succeeded but the read did not complete. In that case, rspbuf remains uninitialized and must not be interpreted as valid data. Treat any return value other than ARRAY_SIZE(msg) as an error, and return -EIO for partial completion. Also return 0 on success instead of the message count, since the caller only needs to distinguish success from failure. Signed-off-by: Sanman Pradhan <psanman@juniper.net> Link: https://lore.kernel.org/r/20260321181052.27129-4-sanman.pradhan@hpe.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (pmbus/max31785) use access_delay for PMBus-mediated accessesSanman Pradhan-131/+60
The MAX31785 driver currently uses driver-local wrappers around PMBus core accesses to enforce a 250us inter-access delay needed to work around occasional NACKs from the device. This duplicates the PMBus core delay mechanism already provided by pmbus_driver_info.access_delay and adds unnecessary complexity. Replace the PMBus wrapper approach with access_delay for normal PMBus-mediated accesses, while keeping the minimal local delay handling needed for raw pre-probe SMBus operations. For the raw i2c_transfer() long-read path, use pmbus_wait() and pmbus_update_ts() to keep the PMBus core timing state consistent with the raw transfer. Also: - allow PMBUS_FAN_CONFIG_12 physical-page accesses to fall back to the PMBus core, while remapping only virtual pages - use pmbus_update_fan() directly for fan configuration updates - use the delayed raw read helper for MFR_REVISION during probe - add a final max31785_wait() before pmbus_do_probe() to bridge the timing gap between pre-probe accesses and PMBus core registration - rename 'virtual' to 'vpage', 'driver_data' to 'data', and drop the unused to_max31785_data() macro Signed-off-by: Sanman Pradhan <psanman@juniper.net> Link: https://lore.kernel.org/r/20260321181052.27129-3-sanman.pradhan@hpe.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (pmbus) export pmbus_wait and pmbus_update_tsSanman Pradhan-4/+11
Export pmbus_wait() and pmbus_update_ts() so that PMBus device drivers which perform raw I2C transfers outside the core helpers can keep the PMBus core delay bookkeeping in sync. Move PMBUS_OP_WRITE and PMBUS_OP_PAGE_CHANGE from pmbus_core.c to pmbus.h so device drivers can pass the correct operation type flags to pmbus_update_ts(). This is needed by the max31785 driver, which performs raw i2c_transfer() calls for its 4-byte extended fan speed reads that cannot use the standard PMBus word read path. Signed-off-by: Sanman Pradhan <psanman@juniper.net> Link: https://lore.kernel.org/r/20260321181052.27129-2-sanman.pradhan@hpe.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (pmbus/isl68137) Remove unused enum chipsDawei Liu-46/+0
The enum chips is not used anywhere in the driver. Device matching relies on the variants enum instead. Remove it to clean up the code. Signed-off-by: Dawei Liu <dawei.liu.jy@renesas.com> Link: https://lore.kernel.org/r/20260318021921.75-2-dawei.liu.jy@renesas.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (aspeed-g6-pwm-tach): remove redundant driver remove callbackBilly Tsai-8/+0
Drops the remove callback as it only asserts reset and the probe already registers a devres action (devm_add_action_or_reset()) to call aspeed_pwm_tach_reset_assert(). Fixes: 7e1449cd15d1 ("hwmon: (aspeed-g6-pwm-tacho): Support for ASPEED g6 PWM/Fan tach") Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com> Link: https://lore.kernel.org/r/20260309-pwm_fixes-v2-1-ca9768e70470@aspeedtech.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (pmbus) Add Delta Q54SN120A1 Q54SW120A7 chipColin Huang-3/+15
Add the DELTA chips Q54SN120A1, Q54SW120A7 in q54sj108a2, 1/4 Brick DC/DC Regulated Power Module with PMBus support Signed-off-by: Colin Huang <u8813345@gmail.com> Link: https://lore.kernel.org/r/20260316-add-q54sn120a1-q54q54sw120a7-v2-2-60e6182cc4a7@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (ads7871) Propagate SPI errors in voltage_showTabrez Ahmed-2/+10
The voltage_show() function previously ignored negative error codes returned by the underlying SPI read/write functions. Because negative numbers have their most significant bits set in two's complement, a failed SPI read returning -EIO (-5) would incorrectly evaluate to true when masked with MUX_CNV_BM (0x80). This would cause the driver to enter the polling loop even when the SPI bus failed, eventually returning a misleading -ETIMEDOUT error to userspace instead of the actual hardware error. Furthermore, the return values of the initial SPI write and the final 16-bit SPI read were completely ignored. Add proper error checking after every SPI operation to ensure hardware failures are immediately propagated back to userspace. Suggested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Tabrez Ahmed <tabreztalks@gmail.com> Link: https://lore.kernel.org/r/20260308124714.84715-1-tabreztalks@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-03-30hwmon: (pmbus/max31785) fix argument type for i2c_smbus_write_byte_data wrapperSanman Pradhan-1/+1
The local wrapper max31785_i2c_write_byte_data() declares its data parameter as u16 but passes it directly to i2c_smbus_write_byte_data() which takes u8. Fix the type to match the underlying API. No functional change; all current callers pass values that fit in u8. Signed-off-by: Sanman Pradhan <psanman@juniper.net> Link: https://lore.kernel.org/r/20260307224517.38316-2-sanman.p211993@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>