summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2026-06-17gpu: nova-core: consolidate GSP boot parameters into GspBootContextZhi Wang6-62/+64
The GspHal trait methods boot() and post_boot() accept a long list of individual parameters (dev, bar, chipset, gsp_falcon, sec2_falcon) that are threaded through the entire GSP boot call chain. This makes the signatures unwieldy and difficult to extend as new boot-time context (e.g. vGPU state) is introduced. Introduce a GspBootContext struct that bundles the common boot parameters into a single object, and refactor the GspHal trait to accept &GspBootContext instead of individual arguments. The struct also exposes a dev() helper with proper lifetime annotation so that HAL implementations can extract the device reference without reborrowing constraints. Update both TU102 and GH100 HAL implementations to extract their required parameters from the context struct, and simplify the call sites in Gsp::boot() accordingly. Signed-off-by: Zhi Wang <zhiw@nvidia.com> Link: https://patch.msgid.link/20260604114339.1565660-7-zhiw@nvidia.com [acourbot: pass `GspBootContext` by value to `Gsp::boot`.] [acourbot: deconstruct `GspBootContext` in `Gsp::boot` to simplify diff.] Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
2026-06-17drm/i915/display: Mask RO bits in gen9_write_dc_state()Dibin Moolakadan Subrahmanian2-4/+24
The DC_STATE_EN register has read-only status bits that are set by hardware on some platforms. These bits may cause the read-back verification loop in gen9_write_dc_state() to spuriously retry. Mask the RO bits from the read-back comparison to prevent unnecessary retries. Changes in v2: - Rename patch from "drm/i915/display: Use rmw in gen9_write_dc_state() to preserve non-DC bits" to "drm/i915/display: Mask RO bits in gen9_write_dc_state()" - Mask only RO bits rather than masking all non DC state bits in DC_STATE_EN. As the register has also some clear-on-write flags, like 'Display DC*CO State Status DSI'(Imre Deak) Changes in v3: - Limit ro mask to read-back comparison. Changes in v4: - Add bit definitions (Jani Nikula) BSpec: 49437,69115 Signed-off-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260605155359.4116572-1-dibin.moolakadan.subrahmanian@intel.com
2026-06-17drm/i915/display: Enable DC3CO DC stateDibin Moolakadan Subrahmanian1-1/+3
Enable DC3CO mask in get_allowed_dc_mask(). Signed-off-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Reviewed-by: Animesh Manna <animesh.manna@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260616162154.2630995-17-dibin.moolakadan.subrahmanian@intel.com
2026-06-17drm/i915/display: Guard CMTG function callsDibin Moolakadan Subrahmanian1-4/+2
Check if DC3CO is allowed before calling CMTG functions in intel_atomic_commit_tail() as CMTG is only used by DC3CO DC state. Signed-off-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Reviewed-by: Animesh Manna <animesh.manna@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260616162154.2630995-16-dibin.moolakadan.subrahmanian@intel.com
2026-06-17drm/i915/display: Add DC3CO count and residency in dmc debugfsDibin Moolakadan Subrahmanian2-1/+10
Expose DC3CO count and residency for xe3lp platforms via debugfs. Changes in v2: - Keep dc5_reg register initialization to avoid any invalid access (sashiko) Changes in v3: - Change XE3P_DMC_DC3CO_COUNT address to lower case (Manna Animesh). Signed-off-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Reviewed-by: Animesh Manna <animesh.manna@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260616162154.2630995-15-dibin.moolakadan.subrahmanian@intel.com
2026-06-17drm/i915/display: Add helper to enable DC counterDibin Moolakadan Subrahmanian4-0/+16
Add xe3lpd_enable_dc_count() to enable the DC_COUNT_EN register. Also define DC_STATE_DC3CO_RESIDENCY to read DC3CO residency. Needed to retrieve DC residency for DC3CO. v2: - Add a guard to xe3lpd_enable_dc_count() instead of relying on caller. [Animesh] Signed-off-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Reviewed-by: Animesh Manna <animesh.manna@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260616162154.2630995-14-dibin.moolakadan.subrahmanian@intel.com
2026-06-17drm/i915/display: PSR Add delayed work to exit DC3CODibin Moolakadan Subrahmanian2-1/+62
For DC3CO, idle_frames is programmed to 0, so PSR does not enter deep sleep. Add delayed work to schedule DC3CO exit after an idle duration derived from frame time (minimum equivalent of 6 frames). The work is re-armed from the PSR flush path on relevant frontbuffer activity. Once the display remains idle, DC3CO is disabled, idle frames are reprogrammed to their normal value, and DC6 is enabled to allow deeper power savings. Changes in v2: - Squash "PSR set idle frames while exit from DC3CO" into this patch (Uma Shankar) - Add cancel_delayed_work() in intel_psr_disable_locked() before clearing dc3co_eligible (Uma Shankar) Changes in v3: - Re-arm cancelled DC3CO work in psr resume - Schedule DC3CO work from intel_psr_post_plane_update(). This is to make sure DC3CO work scheduling will happen even without psr flush, which may be a valid scenario. Changes in v4: - Remove unused function parameter enum fb_op_origin origin that is never used in the function body. (Animesh) Signed-off-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Reviewed-by: Animesh Manna <animesh.manna@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260616162154.2630995-13-dibin.moolakadan.subrahmanian@intel.com
2026-06-17drm/i915/display: Enable DC3CO idle protocol in ALPMDibin Moolakadan Subrahmanian2-0/+6
Add PR_ALPM_CTL_USE_DC3CO_IDLE_PROTOCOL bit definition and set it when DC3CO is allowed. Changes in v2: - Squash "Define DC3CO idle protocol bit in PR_ALPM_CTL" into this patch (Uma Shankar) - Use intel_display_power_dc3co_allowed(display) instead of intel_dc3co_allowed(state) Changes in v3: - check only intel_display_power_dc3co_allowed() before wiriting PR_ALPM_CTL_USE_DC3CO_IDLE_PROTOCOL (Jani Nikula) BSpec: 75253 Signed-off-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Reviewed-by: Animesh Manna <animesh.manna@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260616162154.2630995-12-dibin.moolakadan.subrahmanian@intel.com
2026-06-17drm/i915/display: PSR2: Set idle_frames to 0 for DC3CODibin Moolakadan Subrahmanian1-4/+5
Force idle_frames to 0 when DC3CO is eligible. Changes in v2: - Extend existing Wa_16025596647 condition instead of adding a new if block (Uma Shankar) BSpec: 75253 Signed-off-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Reviewed-by: Animesh Manna <animesh.manna@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260616162154.2630995-11-dibin.moolakadan.subrahmanian@intel.com
2026-06-17drm/i915/display: Store DC3CO eligibility in PSR stateDibin Moolakadan Subrahmanian2-0/+8
Store DC3CO eligibility in intel_dp->psr during intel_psr_post_plane_update() so PSR configuration can take DC3CO into account. This will be used to control PSR2 parameters such as idle frames. Changes in v2: - Use intel_display_power_dc3co_allowed(display) instead of intel_dc3co_allowed(state) Changes in v3: - Update psr.dc3co_eligible before intel_psr_enable_locked() call (sashiko) Changes in v4: - rename eligible to allowed (Jani Nikula) Signed-off-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Reviewed-by: Animesh Manna <animesh.manna@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260616162154.2630995-10-dibin.moolakadan.subrahmanian@intel.com
2026-06-17drm/i915/display: Add DC3CO compute and set target state in commit tailDibin Moolakadan Subrahmanian4-5/+181
Compute if dc3co is allowed in intel_atomic_commit_tail() based on pipe/port constraints and runtime triggers and store result in display->power.dc3co. When DC3CO can be enabled, request DC_STATE_EN_UPTO_DC3CO and reduce the DC entry delay. Otherwise, retain the existing delay and set default DC_STATE_EN_UPTO_DC6. Changes in v2: - Move DC3CO compute logic from intel_atomic_check() to intel_atomic_commit_tail as it is not advisable to change persistent state in atomic check (Jani Nikula) - Add psr2 deep sleep check in dc3co compute. - Move allowed computation logic inside dc3co update (Jani Nikula). - Add dc3co support check in dc3co allowed function (Jani Nikula) - Move all dc3co functions to intel_display_power.c and rename functions accordingly (Jani Nikula) - Clean up dc3co/dc6 power async delay in intel_atomic_commit_tail() (Jani Nikula) Changes in v3: - Remove debug print from intel_display_power_dc3co_update() BSpec: 75253 Signed-off-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Reviewed-by: Animesh Manna <animesh.manna@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260616162154.2630995-9-dibin.moolakadan.subrahmanian@intel.com
2026-06-17drm/i915/psr: Add psr2 deep sleep helper APIDibin Moolakadan Subrahmanian2-0/+22
Add intel_psr2_in_deep_sleep() to check whether PSR2 is currently in DEEP_SLEEP state. Will be used in subsequent patches. Signed-off-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Reviewed-by: Animesh Manna <animesh.manna@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260616162154.2630995-8-dibin.moolakadan.subrahmanian@intel.com
2026-06-17drm/i915/display: Add DC3CO support checkDibin Moolakadan Subrahmanian2-0/+11
Add intel_display_power_dc3co_supported() helper to query DC3CO support from allowed_dc_mask. Changes in v2: - Add HAS_DC3CO() check to intel_display_power_dc3co_supported(). Signed-off-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Reviewed-by: Animesh Manna <animesh.manna@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260616162154.2630995-7-dibin.moolakadan.subrahmanian@intel.com
2026-06-17drm/i915/display: Add HAS_DC3CO() macroDibin Moolakadan Subrahmanian1-0/+1
Add HAS_DC3CO() to identify platforms supporting DC3CO. DC3CO is supported from display version 35 onwards. BSpec: 75253 Signed-off-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Reviewed-by: Animesh Manna <animesh.manna@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260616162154.2630995-6-dibin.moolakadan.subrahmanian@intel.com
2026-06-17drm/i915/display: Add DC3CO DC_STATE enable/disable supportDibin Moolakadan Subrahmanian1-1/+26
Add DC3CO handling to the dc_off power well sequencing and disable the DMC wakelock when exiting DC3CO. Changes in v2: - Call assert_can_enable_dc3co() before dc3co enable (Manna Animesh) BSpec: 75253 Signed-off-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Reviewed-by: Animesh Manna <animesh.manna@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260616162154.2630995-5-dibin.moolakadan.subrahmanian@intel.com
2026-06-17drm/i915/display: Use FIELD_PREP() for DC state enable bitsDibin Moolakadan Subrahmanian1-4/+5
Replace open-coded shifts with REG_GENMASK() and REG_FIELD_PREP() for the DC state enable field. Suggested-by: Jani Nikula <jani.nikula@linux.intel.com> Signed-off-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Reviewed-by: Animesh Manna <animesh.manna@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260616162154.2630995-4-dibin.moolakadan.subrahmanian@intel.com
2026-06-17drm/i915/display: Switch DC3CO enable from standalone bit to DC level encodingDibin Moolakadan Subrahmanian4-10/+10
On platforms prior to xe3, DC3CO was controlled via a standalone enable bit. Starting with xe3, DC3CO is encoded as part of the existing DC_STATE_EN_UPTO_DC* field. No functional change, as DC3CO is not enabled on platforms prior to xe3. Changes in v2: - Update commit header (Uma Shankar) Changes in v3: - Update bit mask to reflect DC3CO (Manna Animesh) Signed-off-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Reviewed-by: Animesh Manna <animesh.manna@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260616162154.2630995-3-dibin.moolakadan.subrahmanian@intel.com
2026-06-17drm/i915/display: Remove TGL DC3CO supportDibin Moolakadan Subrahmanian4-205/+0
Remove all Tiger Lake DC3CO-related functions from intel_psr.c and intel_display_power_well.c, as the feature is not enabled and not used. Also remove the TGL/DG1 DC3CO count debugfs entry from intel_dmc.c, as DC3CO is not active on those platforms. A new debugfs entry for Xe3LP will be added in a subsequent patch. Remove the unused dc3co_exitline field from struct intel_psr and struct intel_crtc_state, along with the corresponding EXITLINE register read in intel_psr_get_config(). Changes in v2: - Squash "Remove unused PSR dc3co_exitline field" and "Remove unused dc3co_exitline from crtc_state" into this patch Signed-off-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Reviewed-by: Animesh Manna <animesh.manna@intel.com> Signed-off-by: Animesh Manna <animesh.manna@intel.com> Link: https://patch.msgid.link/20260616162154.2630995-2-dibin.moolakadan.subrahmanian@intel.com
2026-06-17Merge tag 'wq-for-7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wqLinus Torvalds7-10/+11
Pull workqueue updates from Tejun Heo: - Continued progress toward making alloc_workqueue() unbound by default: more callers converted to WQ_PERCPU / system_percpu_wq / system_dfl_wq, and new warnings for queues that use neither WQ_PERCPU nor WQ_UNBOUND or the legacy system_wq / system_unbound_wq. - Misc: drop the now-trivial apply_wqattrs_lock()/unlock() wrappers, forbid the TEST_WORKQUEUE benchmark from being built-in, and fix a spurious pointer level in the worker debug-dump path. * tag 'wq-for-7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: drm/bridge: anx7625: Add WQ_PERCPU add to alloc_workqueue wifi: ath6kl: fix invalid workqueue flags in ath6kl_usb_create() btrfs: Drop WQ_PERCPU from ordered_flags in btrfs_init_workqueues() workqueue: Add warnings and ensure one among WQ_PERCPU or WQ_UNBOUND is present workqueue: Add warnings and fallback if system_{unbound}_wq is used workqueue: drop spurious '*' from print_worker_info() fn declaration workqueue: forbid TEST_WORKQUEUE from being built-in workqueue: drop apply_wqattrs_lock()/unlock() wrappers umh: replace use of system_unbound_wq with system_dfl_wq rapidio: rio: add WQ_PERCPU to alloc_workqueue users media: ddbridge: add WQ_PERCPU to alloc_workqueue users platform: cznic: turris-omnia-mcu: replace use of system_wq with system_percpu_wq media: synopsys: hdmirx: replace use of system_unbound_wq with system_dfl_wq virt: acrn: Add WQ_PERCPU to alloc_workqueue users
2026-06-17Merge tag 'bitmap-for-7.2' of https://github.com/norov/linuxLinus Torvalds10-21/+21
Pull bitmap updates from Yury Norov: "This includes the new FIELD_GET_SIGNED() helper, bitmap_print_to_pagebuf() removal, RISCV/bitrev support, and a couple cleanups. - new handy helper FIELD_GET_SIGNED() (Yury) - arch test_and_set_bit_lock() and clear_bit_unlock() cleanup (Randy) - __bf_shf() simplification (Yury) - bitmap_print_to_pagebuf() removal (Yury) - RISCV/bitrev conditional support (Jindie, Yury)" * tag 'bitmap-for-7.2' of https://github.com/norov/linux: MAINTAINERS: BITOPS: include bitrev.[ch] arch/riscv: Add bitrev.h file to support rev8 and brev8 bitops: Define generic___bitrev8/16/32 for reuse lib/bitrev: Introduce GENERIC_BITREVERSE arch: select HAVE_ARCH_BITREVERSE conditionally on BITREVERSE bitmap: fix find helper documentation bitmap: drop bitmap_print_to_pagebuf() cpumask: switch cpumap_print_to_pagebuf() to using scnprintf() bitfield: wire __bf_shf to __builtin_ctzll bitops: use common function parameter names ptp: switch to using FIELD_GET_SIGNED() rtc: rv3032: switch to using FIELD_GET_SIGNED() wifi: rtw89: switch to using FIELD_GET_SIGNED() iio: mcp9600: switch to using FIELD_GET_SIGNED() iio: pressure: bmp280: switch to using FIELD_GET_SIGNED() iio: magnetometer: yas530: switch to using FIELD_GET_SIGNED() iio: intel_dc_ti_adc: switch to using FIELD_GET_SIGNED() x86/extable: switch to using FIELD_GET_SIGNED() bitfield: add FIELD_GET_SIGNED()
2026-06-17mfd: rz-mtu3: Make reset optionalCosmin Tanislav1-1/+1
The Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs do not have a reset line for the MTU3 block. Prepare for them by making it optional. Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com> Link: https://patch.msgid.link/20260527145606.136536-5-cosmin-gabriel.tanislav.xa@renesas.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17mfd: rz-mtu3: Store &pdev->dev in local variableCosmin Tanislav1-5/+6
&pdev->dev is accessed multiple times during probe. Store it in a local variable and use that to simplify the code. Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com> Link: https://patch.msgid.link/20260527145606.136536-4-cosmin-gabriel.tanislav.xa@renesas.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17mfd: rz-mtu3: Use local variable for resetCosmin Tanislav1-4/+4
Remove struct rz_mtu3_priv::rstc and use a local variable for it as it is not needed outside of rz_mtu3_probe() anymore. Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com> Link: https://patch.msgid.link/20260527145606.136536-3-cosmin-gabriel.tanislav.xa@renesas.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17mfd: rz-mtu3: Use device-managed APIsCosmin Tanislav1-23/+3
Replace devm_reset_control_get_exclusive() and the manual reset_control_deassert()/reset_control_assert() with handling by devm_reset_control_get_exclusive_deasserted(). Replace mfd_add_devices()/mfd_remove_devices() with devm_mfd_add_devices(). Remove the custom cleanup action. Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com> Link: https://patch.msgid.link/20260527145606.136536-2-cosmin-gabriel.tanislav.xa@renesas.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17mfd: tps6586x: Fix OF node refcountBartosz Golaszewski1-1/+1
Platform devices created with platform_device_alloc() call platform_device_release() when the last reference to the device's kobject is dropped. This function calls of_node_put() unconditionally. This works fine for devices created with platform_device_register_full() but users of the split approach (platform_device_alloc() + platform_device_add()) must bump the reference of the of_node they assign manually. Add the missing call to of_node_get(). Cc: stable@vger.kernel.org Fixes: 62f6b0879304 ("tps6586x: Add device tree support") Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Link: https://patch.msgid.link/20260521-pdev-fwnode-ref-v1-1-88c324a1b8d2@oss.qualcomm.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17mfd: twl4030-power: Update checks for specific boards to use the DTEthan Nelson-Moore1-4/+2
The twl4030-power driver contains two checks for ARM machine IDs via machine_is_*() macros. The two boards concerned now support only FDT booting, which does not use machine IDs, and therefore the code should be updated to check the DT compatible property instead. The legacy board files for these machines were removed in commit 1b383f44aabc ("ARM: OMAP2+: Drop board file for 3430sdp") and commit e92fc4f04a34 ("ARM: OMAP2+: Drop legacy board file for LDP"). The presence of these machine ID checks prevents the removal of machine IDs no longer used by the kernel from arch/arm/tools/mach-types, because the machine_is_*() macros are generated from mach-types. To resolve this issue, use of_machine_is_compatible() instead. Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com> Link: https://patch.msgid.link/20260517023723.92731-2-enelsonmoore@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17mfd: qcom_rpm: Add msm8960 QDSS clock resourceAntony Kurniawan Soemardi1-0/+1
The msm8960 RPM resource table is missing the QDSS clock entry (resource ID 209) that is present in the android-msm-mako-3.4 downstream kernel. Add it so that RPM clock initialization succeeds. Tested-by: Rudraksha Gupta <guptarud@gmail.com> Signed-off-by: Antony Kurniawan Soemardi <linux@smankusors.com> Link: https://patch.msgid.link/20260514-msm8960-wifi-v2-3-7cbae45dab5e@smankusors.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17mfd: si476x-i2c: Fix spelling mistakes in commentsMd Shofiqul Islam1-4/+4
Fix spelling mistake in comments: - succes -> success (4 times) Signed-off-by: Md Shofiqul Islam <shofiqtest@gmail.com> Link: https://patch.msgid.link/20260514181954.1442-1-shofiqtest@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17mfd: max77620: Convert poweroff support to sys-off APIDiogo Ivo1-9/+13
Convert max77620_pm_power_off() to the sys-off callback prototype and register it with the sys-off API when the device tree marks the PMIC as a system power controller. This also removes the global max77620_scratch pointer by passing the chip instance through the callback data. This modernizes the driver's poweroff handling and aligns it with the kernel sys-off infrastructure. Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt> Link: https://patch.msgid.link/20260514-smaug-poweroff-v1-2-30f9a4688966@tecnico.ulisboa.pt Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17mfd: cs42l43: Sanity check firmware sizeCharles Keepax1-1/+1
Currently the code checks if a firmware was received, however it does not verify that the firmware size is larger than the firmware header. As the firmware pointer is dereferenced as a pointer to the header structure this could lead to an out of bounds memory access. Add the missing check. Fixes: ace6d1448138 ("mfd: cs42l43: Add support for cs42l43 core driver") Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20260508134804.1787461-1-ckeepax@opensource.cirrus.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17mfd: qcom: Unify user-visible "Qualcomm" nameKrzysztof Kozlowski1-1/+1
Various names for Qualcomm as a company are used in user-visible config options: QCOM, Qualcomm and Qualcomm Technologies. Switch to unified "Qualcomm" so it will be easier for users to identify the options when for example running menuconfig. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Acked-by: Guru Das Srinagesh <linux@gurudas.dev> Link: https://patch.msgid.link/20260427070109.18271-2-krzysztof.kozlowski@oss.qualcomm.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17mfd: cros_ec: Delay dev_set_drvdata() until probe successAndrei Kuchynski1-1/+2
If ec_device_probe() fails, cros_ec_class_release releases memory for the cros_ec_dev structure. However, because the drvdata was already set, sub-drivers like cros_ec_typec can still retrieve the stale pointer via the platform device. This leads to a use-after-free when cros_ec_typec attempts to access &typec->ec->ec->dev on a device that has already been released. Move dev_set_drvdata() to ensure that the pointer is only made available once all initialization steps have succeeded. sysfs: cannot create duplicate filename '/class/chromeos/cros_ec' Call trace: sysfs_do_create_link_sd+0x94/0xdc sysfs_create_link+0x30/0x44 device_add_class_symlinks+0x90/0x13c device_add+0xf0/0x50c ec_device_probe+0x150/0x4f0 platform_probe+0xa0/0xe0 ... BUG: KASAN: invalid-access in __memcpy+0x44/0x230 Write at addr f5ffff809e2d33ac by task kworker/u32:5/125 Pointer tag: [f5], memory tag: [fe] Tainted : [W]=WARN, [O]=OOT_MODULE Hardware name: Google Navi unprovisioned 0x7FFFFFFF/sku0 board/sku3 Workqueue: events_unbound deferred_probe_work_func Call trace: __memcpy+0x44/0x230 cros_ec_check_features+0x60/0xcc [cros_ec_proto] cros_typec_probe+0xe8/0x6e0 [cros_ec_typec] platform_probe+0xa0/0xe0 Cc: stable@vger.kernel.org Fixes: 1c1d152cc5ac ("platform/chrome: cros_ec_dev - utilize new cdev_device_add helper function") Co-developed-by: Sergey Senozhatsky <senozhatsky@chromium.org> Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org> Signed-off-by: Andrei Kuchynski <akuchynski@chromium.org> Reviewed-by: Benson Leung <bleung@chromium.org> Link: https://patch.msgid.link/20260427131721.1165078-1-akuchynski@chromium.org Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17mfd: ezx-pcap: Remove unused driverArnd Bergmann3-499/+0
Support for the Motorola EZX phones based on Intel PXA processors was removed in 2022, but this driver remained present in the tree. As far as I can tell, the support was never quite functional upstream because the board files did not actually instantiate the SPI device for the PCAP. There are still also drivers for the various mfd cells: keys, touchscreen, regulator and rtc, all of which are obviously orphaned as well but can be removed separately as the Kconfig dependency now prevents them from being enabled. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202604301209.f1YXTsIr-lkp@intel.com/ Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Linus Walleij <linusw@kernel.org> Acked-by: Harald Welte <laforge@gnumonks.org> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Link: https://patch.msgid.link/20260430162855.2029285-1-arnd@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17mfd: twl-core: Use i2c_check_functionality as boolean valueThorsten Blum1-1/+1
i2c_check_functionality() returns a boolean status rather than an error code - directly use it as a boolean value. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://patch.msgid.link/20260505114543.159381-2-thorsten.blum@linux.dev Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17mfd: menf21bmc: Inline i2c_check_functionality checkThorsten Blum1-5/+3
Inline the i2c_check_functionality() check, since the function returns a boolean status rather than an error code. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://patch.msgid.link/20260428165800.590496-3-thorsten.blum@linux.dev Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17mfd: max77759: Improve static struct formatting and commentaryAmit Sunil Dhamne1-32/+16
Improve code style. This includes the following: - Formatting the max77759_chgr_irqs entries to fit in a single line instead of breaking them into multiple lines to improve readability. - Refactoring comments such that they're full sentences and have punctuation marks for a couple of macro definitions to adhere to the documentation style. - Explicitly initializing `MAX77759_CHGR_MODE_OFF`. Signed-off-by: Amit Sunil Dhamne <amitsd@google.com> Link: https://patch.msgid.link/20260504-fix-mfd-max77759-driver-v1-1-4d4a31a1d214@google.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17mfd: wm8994: Remove dead legacy-gpio codeArnd Bergmann1-90/+4
The old-style gpio handling in wm8994 came from a commit 7c8844481a1c ("mfd: wm8994: Emulate level triggered interrupts if required") in linux-3.11, but nothing in the kernel ever set the 'irq_gpio' member in the wm8994_pdata structure, so this was always dead code. Remove it now to reduce the dependency on the legacy gpio interfaces. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Linus Walleij <linusw@kernel.org> Link: https://patch.msgid.link/20260427143437.3059210-1-arnd@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17mfd: cs5535: Add, assign and expose the software node for the GPIO cellBartosz Golaszewski1-0/+9
There are board files in-tree that want to request GPIOs from this chip. They currently rely on the GPIO core's mechanism of matching software nodes' labels against GPIO controller names. We want to remove this behavior from the kernel and to this end, we need to associate the referenced GPIO controller with its target software node. Create a dedicated GPIO software node for cs5535, assign it to the GPIO cell and expose its address in a new header. We only expose a single software node instance but that's alright: all existing hardware only contains a single cs5535 companion and the geode board file for which we expose this is legacy anyway. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Link: https://patch.msgid.link/20260429-cs5535-swnode-v1-1-2bc5e17ddcf9@oss.qualcomm.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17mfd: Consistently define pci_device_ids using named initializersUwe Kleine-König (The Capable Hub)4-638/+638
The various struct pci_device_id arrays were initialized mostly by one of the PCI_DEVICE macros and then list expressions. The latter isn't easily readable if you're not into PCI. Using named initializers is more explicit and thus easier to parse. The secret plan is to make struct pci_device_id::driver_data an anonymous union (similar to https://lore.kernel.org/all/cover.1776579304.git.u.kleine-koenig@baylibre.com/) and that requires named initializers. But it's also a nice cleanup on its own. This change doesn't introduce changes to the compiled pci_device_id arrays. Tested on x86 and arm64. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/20260429170652.4178050-2-u.kleine-koenig@baylibre.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17mfd: rsmu: Add 8a34002 supportMatthew Bystrin2-0/+4
Add compatible string, i2c_devcie_id and spi_devcie_id to support 8a34002. Signed-off-by: Matthew Bystrin <dev.mbstr@gmail.com> Link: https://patch.msgid.link/20260429072047.1111427-3-dev.mbstr@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17mfd: rsmu: Fix page register setupMatthew Bystrin2-9/+2
Fix writes to page register in 8A3400x family (Clock Matrix). All calls to rsmu_write_page_register() (both in i2c and spi) have resulted in early return, because all addresses in include/linux/mfd/idt8a340_reg.h are less than RSMU_CM_SCSR_BASE. There were 2 separate patch series which have to be merged in one time: mfd and ptp. The latter have been merged, the former[1] have not. Link: https://lore.kernel.org/netdev/LV3P220MB1202F8E2FCCFBA2519B4966EA0192@LV3P220MB1202.NAMP220.PROD.OUTLOOK.COM/ Fixes: 67d6c76fc815 ("mfd: rsmu: Support 32-bit address space") Signed-off-by: Matthew Bystrin <dev.mbstr@gmail.com> Link: https://patch.msgid.link/20260429072047.1111427-2-dev.mbstr@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17mfd: cros_ec: Don't add cros_ec_ucsi if it is defined in OF or ACPIJameson Thies1-5/+18
On devices with a UCSI PPM in the EC, check for cros_ec_ucsi to be defined in the OF device tree or an ACPI node. If it is defined by either OF or ACPI, it does not need to be added as a subdevice of cros_ec_dev mfd. cros_ec_ucsi will load from the OF or ACPI node. Signed-off-by: Jameson Thies <jthies@google.com> Reviewed-by: Benson Leung <bleung@chromium.org> Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Link: https://patch.msgid.link/20260403222253.1888991-2-jthies@google.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17mfd: sm501: Fix reference leak on failed device registrationGuangshuo Li1-1/+3
When platform_device_register() fails in sm501_register_device(), the embedded struct device in pdev has already been initialized by device_initialize(), but the failure path only reports the error and returns without dropping the device reference for the current platform device: sm501_register_device() -> platform_device_register(pdev) -> device_initialize(&pdev->dev) -> setup_pdev_dma_masks(pdev) -> platform_device_add(pdev) This leads to a reference leak when platform_device_register() fails. Fix this by calling platform_device_put() before returning the error. The issue was identified by a static analysis tool I developed and confirmed by manual review. Fixes: b6d6454fdb66f ("[PATCH] mfd: SM501 core driver") Cc: stable@vger.kernel.org Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com> Link: https://patch.msgid.link/20260415162627.3558789-1-lgs201920130244@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17mfd: bq257xx: Add BQ25792 supportAlexey Charkov1-3/+51
Add register definitions and a new 'type' enum to be passed via MFD private data to support the BQ25792, which is a newer variant of the BQ257xx family. BQ25792 shares similar logic of operation with the already supported BQ25703A but has a completely different register map and different electrical constraints. Signed-off-by: Alexey Charkov <alchark@flipper.net> Tested-by: Chris Morgan <macromorgan@hotmail.com> Link: https://patch.msgid.link/20260331-bq25792-v6-9-0278fba33eb9@flipper.net Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17mfd: simple-mfd-i2c: Add a reboot cell for the SpacemiT P1 chipAurelien Jarno1-0/+1
Add a "spacemit-p1-reboot" cell for the SpacemiT P1 chip. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Troy Mitchell <troy.mitchell@linux.spacemit.com> Tested-by: Vincent Legoll <legoll@online.fr> # OrangePi-RV2 Link: https://patch.msgid.link/20251102230352.914421-3-aurelien@aurel32.net Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17mfd: sprd-sc27xx: Switch to devm_mfd_add_devices()Otto Pflüger1-9/+53
To allow instantiating subdevices such as the regulator and poweroff devices that do not have corresponding device tree nodes with a "compatible" property, use devm_mfd_add_devices() with MFD cells instead of devm_of_platform_populate(). Since different PMICs in the SC27xx series contain different components, use separate MFD cell tables for each PMIC model. Define cells for all components that have upstream drivers at this point. Signed-off-by: Otto Pflüger <otto.pflueger@abscue.de> Link: https://patch.msgid.link/20260329-sc27xx-mfd-cells-v3-3-9158dee41f74@abscue.de Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17mfd: tps65219: Make poweroff handler conditional on system-power-controllerAkashdeep Kaur1-6/+8
Currently, the TPS65219 driver unconditionally registers a poweroff handler. This causes issues on systems where a different component (such as TF-A firmware) should handle system poweroff instead. Make the poweroff handler registration conditional based on the "system-power-controller" device tree property. This follows the standard kernel pattern where only the designated power controller registers for system poweroff operations. On systems where the property is absent, the PMIC will not register a poweroff handler, allowing other poweroff mechanisms to function. Signed-off-by: Akashdeep Kaur <a-kaur@ti.com> Link: https://patch.msgid.link/20260401112257.1248437-3-a-kaur@ti.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17leds: tps6131x: Increase overvoltage protection threshold to 6VMatthias Fend1-1/+1
Currently, there may be cases where the overvoltage detection is triggered even with a valid and generally functioning hardware setup. This occurs, for example, when the input voltage exceeds the currently used overvoltage threshold of 4.65V (typical). Since input voltages up to 5V are supported, the threshold should be adjusted accordingly. While the target output voltage setting has no effect on the LED operation used here, it indirectly selects the threshold for overvoltage detection. Set this to a value of 4.95V to select a threshold of 6V (typical). Signed-off-by: Matthias Fend <matthias.fend@emfend.at> Link: https://patch.msgid.link/20260527-leds-tps6131x-ovp-v1-1-1ac70d03c9eb@emfend.at Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17mfd: tps65910: Add error handling for dummy I2C transfer in probeWenyuan Li1-1/+15
In tps65910_i2c_probe(), a dummy I2C transfer is performed to work around silicon erratum SWCZ010. However, the return value of i2c_master_send() is not checked. If this dummy transfer fails, the driver continues execution without detecting the error. This may lead to subsequent I2C operations also failing, but the driver would incorrectly report success. Add proper return value checking for the dummy I2C transfer. If the transfer fails, log the error and return an appropriate error code to the caller. Signed-off-by: Wenyuan Li <2063309626@qq.com> Link: https://patch.msgid.link/tencent_01102156392EC89EDF2CA22A7C8B4ABB2509@qq.com Signed-off-by: Lee Jones <lee@kernel.org>
2026-06-17leds: Fix CONFIG_OF dependency for LEDS_LP5860_COREArnd Bergmann1-0/+1
Building LEDS_LP5860_SPI without CONFIG_OF leads to a build time warning: WARNING: unmet direct dependencies detected for LEDS_LP5860_CORE Depends on [n]: NEW_LEDS [=y] && LEDS_CLASS_MULTICOLOR [=y] && LEDS_CLASS [=y] && OF [=n] Selected by [y]: - LEDS_LP5860_SPI [=y] && NEW_LEDS [=y] && LEDS_CLASS_MULTICOLOR [=y] && SPI [=y] Address this by adding the same dependency here as well. Fixes: 3daf2c4ef82b ("leds: Add support for TI LP5860 LED driver chip") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://patch.msgid.link/20260526103738.3389272-1-arnd@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>