summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2025-11-03drm/xe/display: Runtime pm wrappers for display parent interfaceJouni Högander
Implement runtime pm wrappers for xe driver and add them into display parent interface. v3: - drop useless include - drop xe_display_rpm_{get, put}_raw v2: - move xe_display_rpm_interface code into xe_display_rpm.c - rename xe_rpm as xe_display_rpm Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Jouni Högander <jouni.hogander@intel.com> Link: https://patch.msgid.link/20251030202836.1815680-5-jouni.hogander@intel.com
2025-11-03drm/i915/display: Runtime pm wrappers for display parent interfaceJouni Högander
Implement runtime pm wrappers for i915 driver and add them into display parent interface. v2: - move i915 display rpm interface implementation to intel_runtime_pm.c - rename intel_display as i915_display Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Jouni Högander <jouni.hogander@intel.com> Link: https://patch.msgid.link/20251030202836.1815680-4-jouni.hogander@intel.com
2025-11-03drm/{i915, xe}/display: pass parent interface to display probeJani Nikula
Let's gradually start calling i915 and xe parent, or core, drivers from display via function pointers passed at display probe. Going forward, the struct intel_display_parent_interface is expected to include const pointers to sub-structs by functionality, for example: struct intel_display_rpm { struct ref_tracker *(*get)(struct drm_device *drm); /* ... */ }; struct intel_display_parent_interface { /* ... */ const struct intel_display_rpm *rpm; }; This is a baby step towards not building display as part of both i915 and xe drivers, but rather making it an independent driver interfacing with the two. v3: useless include additions dropped v2: unrelated include removal dropped Cc: Jouni Högander <jouni.hogander@intel.com> Cc: Lucas De Marchi <lucas.demarchi@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Jouni Högander <jouni.hogander@intel.com> Link: https://patch.msgid.link/20251030202836.1815680-2-jouni.hogander@intel.com
2025-11-03media: rkvdec: Disable QoS for HEVC and VP9 on RK3328Alex Bee
The RK3328 VDEC has a HW quirk that require QoS to be disabled when HEVC or VP9 is decoded, otherwise the decoded picture may become corrupted. Add a RK3328 variant with a quirk flag to disable QoS when before decoding is started. Signed-off-by: Alex Bee <knaerzche@gmail.com> Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Tested-by: Diederik de Haas <didi.debian@cknow.org> # Rock64, RockPro64, Quartz64-B, NanoPi R5S Tested-by: Detlev Casanova <detlev.casanova@collabora.com> # RK3399 Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03media: rkvdec: Add RK3288 variantAlex Bee
Add a RK3288 variant, a version of the Rockchip VDEC IP that only support HEVC decoding. Signed-off-by: Alex Bee <knaerzche@gmail.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Tested-by: Diederik de Haas <didi.debian@cknow.org> # Rock64, RockPro64, Quartz64-B, NanoPi R5S Tested-by: Detlev Casanova <detlev.casanova@collabora.com> # RK3399 Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03media: rkvdec: Implement capability filteringJonas Karlman
Add filtering of coded formats and controls depending on a variant capabilities. Signed-off-by: Alex Bee <knaerzche@gmail.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Tested-by: Diederik de Haas <didi.debian@cknow.org> # Rock64, RockPro64, Quartz64-B, NanoPi R5S Tested-by: Detlev Casanova <detlev.casanova@collabora.com> # RK3399 Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03media: rkvdec: Add variants supportAlex Bee
Different versions of the Rockchip VDEC IP exists and one way they can differ is what decoding formats are supported. Add a variant implementation in order to support flagging different capabilities. Signed-off-by: Alex Bee <knaerzche@gmail.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Tested-by: Diederik de Haas <didi.debian@cknow.org> # Rock64, RockPro64, Quartz64-B, NanoPi R5S Tested-by: Detlev Casanova <detlev.casanova@collabora.com> # RK3399 Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-03media: rkvdec: Add HEVC backendJonas Karlman
The Rockchip VDEC supports the HEVC codec with the Main and Main10 Profile up to Level 5.1 High tier: 4096x2304@60 fps. Add the backend for HEVC format to the decoder. Signed-off-by: Alex Bee <knaerzche@gmail.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Tested-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Tested-by: Diederik de Haas <didi.debian@cknow.org> # Rock64, RockPro64, Quartz64-B, NanoPi R5S Tested-by: Detlev Casanova <detlev.casanova@collabora.com> # RK3399 Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-11-02drm/xe: Inline gt_reset in the workerLucas De Marchi
gt_reset() doesn't make sense by itself: it can only be called as part of the worker. Inline it there to avoid it being called from elsewhere and clarify the gt_reset() vs do_gt_reset() paths. Note that the error return from gt_reset() was just being ignored. Also add a comment to the xe_pm_runtime_put() to make sure the get()/put() pair is clear. Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patch.msgid.link/20251031222244.37735-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2025-11-02Merge patch series "target: RW/num_cmds stats improvements"Martin K. Petersen
Mike Christie <michael.christie@oracle.com> says: The following patches were made over Linus tree. They fix/improve the stats used in the main IO path. The first patch fixes an issue where I made some stats u32 when they should have stayed u64. The rest of the patches improve the handling of RW/num_cmds stats to reduce code duplication and improve performance. Link: https://patch.msgid.link/20250917221338.14813-1-michael.christie@oracle.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-11-02scsi: target: Move LUN stats to per-CPUMike Christie
The atomic use in the main I/O path is causing perf issues when using higher performance backend devices and multiple queues (more than 10 when using vhost-scsi) like with this fio workload: [global] bs=4K iodepth=128 direct=1 ioengine=libaio group_reporting time_based runtime=120 name=standard-iops rw=randread numjobs=16 cpus_allowed=0-15 To fix this issue, move the LUN stats to per CPU. Note: I forgot to include this patch with the delayed/ordered per CPU tracking and per device/device entry per CPU stats. With this patch you get the full 33% improvements when using fast backends, multiple queues and multiple IO submiters. Signed-off-by: Mike Christie <michael.christie@oracle.com> Reviewed-by: Dmitry Bogdanov <d.bogdanov@yadro.com> Link: https://patch.msgid.link/20250917221338.14813-4-michael.christie@oracle.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-11-02scsi: target: Create and use macro helpers for per-CPU statsMike Christie
Create some macros to reduce code duplication for when we handle per-CPU stats. Convert the existing LUN and auth cases. Note: This is similar to percpu_counters but they only support s64 since they are also used for non-stat counters where you need to handle/prevent rollover more gracefully. Our use is just for stats where the spec defines u64 use plus we already have some files exporting u64 values so it's not possible to directly use percpu_counters. Signed-off-by: Mike Christie <michael.christie@oracle.com> Reviewed-by: Dmitry Bogdanov <d.bogdanov@yadro.com> Link: https://patch.msgid.link/20250917221338.14813-3-michael.christie@oracle.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-11-02scsi: target: Fix LUN/device R/W and total command statsMike Christie
In commit 9cf2317b795d ("scsi: target: Move I/O path stats to per CPU") I saw we sometimes use %u and also misread the spec. As a result I thought all the stats were supposed to be 32-bit only. However, for the majority of cases we support currently, the spec specifies u64 bit stats. This patch converts the stats changed in the commit above to u64. Fixes: 9cf2317b795d ("scsi: target: Move I/O path stats to per CPU") Signed-off-by: Mike Christie <michael.christie@oracle.com> Reviewed-by: Dmitry Bogdanov <d.bogdanov@yadro.com> Link: https://patch.msgid.link/20250917221338.14813-2-michael.christie@oracle.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-11-02scsi: core: Improve sdev_store_timeout()Bart Van Assche
Check whether or not the conversion of the argument to an integer succeeded. Reject invalid timeout values. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://patch.msgid.link/20251031221844.2921694-1-bvanassche@acm.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-11-02scsi: core: Remove unused code from scsi_sysfs.cBart Van Assche
Remove unused code since we do not keep unused code in the Linux kernel. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://patch.msgid.link/20251031220857.2917954-1-bvanassche@acm.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-11-02scsi: target: Simplify target_lu_gp_members_show()Bart Van Assche
Remove the stack buffer 'buf'. This patch does not modify the output produced by target_lu_gp_members_show(). An example of the output that is produced with this patch applied: $ cat /sys/kernel/config/target/core/alua/lu_gps/default_lu_gp/members fileio_0/vdev0 fileio_1/vdev1 iblock_0/vdev2 $ od -c /sys/kernel/config/target/core/alua/lu_gps/default_lu_gp/members 0000000 f i l e i o _ 0 / v d e v 0 \n f 0000020 i l e i o _ 1 / v d e v 1 \n i b 0000040 l o c k _ 0 / v d e v 2 \n 0000055 Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://patch.msgid.link/20251027184639.3501254-3-bvanassche@acm.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-11-02scsi: target: Do not write NUL characters into ASCII configfs outputBart Van Assche
NUL characters are not allowed in ASCII configfs output. Hence this patch. Fixes: c66ac9db8d4a ("[SCSI] target: Add LIO target core v4.0.0-rc6") Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://patch.msgid.link/20251027184639.3501254-2-bvanassche@acm.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-11-02Merge patch series "scsi: target: Add WRITE_ATOMIC_16 support"Martin K. Petersen
John Garry <john.g.garry@oracle.com> says: This is a reposting of Mike's atomic writes support for the SCSI target. Again, we are now only supporting target_core_iblock. It's implemented similar to UNMAP where we do not do any emulation and instead pass the operation to the block layer. Link: https://patch.msgid.link/20251020103820.2917593-1-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-11-02scsi: target: Add atomic support to target_core_iblockMike Christie
Make target_core_iblock use the LIO helper function to translate its block_device atomic settings to LIO settings. If we then get a write that LIO has indicated is atomic via the SCF_ATOMIC flag, we use the REQ_ATOMIC flag to tell the block layer to perform an atomic write. Signed-off-by: Mike Christie <michael.christie@oracle.com> Signed-off-by: John Garry <john.g.garry@oracle.com> Reviewed-by: John Garry <john.g.garry@oracle.com> Link: https://patch.msgid.link/20251020103820.2917593-8-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-11-02scsi: target: Add WRITE_ATOMIC_16 support to RSOCMike Christie
Report if the device supports WRITE_ATOMIC_16 in the REPORT_SUPPORTED_OPERATION_CODES command. Signed-off-by: Mike Christie <michael.christie@oracle.com> Signed-off-by: John Garry <john.g.garry@oracle.com> Link: https://patch.msgid.link/20251020103820.2917593-7-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-11-02scsi: target: Report atomic values in INQUIRYMike Christie
Report the atomic values in the Block Limits VPD page. Signed-off-by: Mike Christie <michael.christie@oracle.com> jpg: handle not having atomic_supported attribute Signed-off-by: John Garry <john.g.garry@oracle.com> Link: https://patch.msgid.link/20251020103820.2917593-6-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-11-02scsi: target: Add WRITE_ATOMIC_16 handlerMike Christie
Add the core LIO code to process the WRITE_ATOMIC_16 command. Signed-off-by: Mike Christie <michael.christie@oracle.com> jpg: fix return code from sbc_check_atomic, reformat Signed-off-by: John Garry <john.g.garry@oracle.com> Link: https://patch.msgid.link/20251020103820.2917593-5-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-11-02scsi: target: Add helper to set up atomic values from block_deviceMike Christie
Add a helper function that sets up the atomic value based on a block_device similar to what we do for unmap. Signed-off-by: Mike Christie <michael.christie@oracle.com> jpg: Set atomic alignment, drop atomic_supported reference Signed-off-by: John Garry <john.g.garry@oracle.com> Link: https://patch.msgid.link/20251020103820.2917593-4-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-11-02scsi: target: Add atomic se_device fieldsMike Christie
Add atomic fields to the se_device and export them in configfs. Initially only target_core_iblock will be supported and we will inherit all the settings from the block layer. Signed-off-by: Mike Christie <michael.christie@oracle.com> jpg: Stop being allowed to configure atomic write alignment, Signed-off-by: John Garry <john.g.garry@oracle.com> Link: https://patch.msgid.link/20251020103820.2917593-3-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-11-02scsi: target: Rename target_configure_unmap_from_queue()Mike Christie
Rename target_configure_unmap_from_queue() to target_configure_unmap_from_bdev() since it now takes a bdev. Signed-off-by: Mike Christie <michael.christie@oracle.com> Signed-off-by: John Garry <john.g.garry@oracle.com> Reviewed-by: John Garry <john.g.garry@oracle.com> Link: https://patch.msgid.link/20251020103820.2917593-2-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-11-03mei: fix error flow in probeAlexander Usyskin
Dismantle class device last in probe error flow to avoid accessing freed memory like: [ 87.926774] WARNING: CPU: 9 PID: 518 at kernel/workqueue.c:4234 __flush_work+0x340/0x390 ... [ 87.926912] Workqueue: async async_run_entry_fn [ 87.926918] RIP: e030:__flush_work+0x340/0x390 [ 87.926923] Code: 26 9d 05 00 65 48 8b 15 26 3c ca 02 48 85 db 48 8b 04 24 48 89 54 24 58 0f 85 de fe ff ff e9 f6 fd ff ff 0f 0b e9 77 ff ff ff <0f> 0b e9 70 ff ff ff 0f 0b e9 19 ff ff ff e8 7d 8b 0e 01 48 89 de [ 87.926931] RSP: e02b:ffffc900412ebc00 EFLAGS: 00010246 [ 87.926936] RAX: 0000000000000000 RBX: ffff888103e55090 RCX: 0000000000000000 [ 87.926941] RDX: 000fffffffe00000 RSI: 0000000000000001 RDI: ffffc900412ebc60 [ 87.926945] RBP: ffff888103e55090 R08: ffffffffc1266ec8 R09: ffff8881109076e8 [ 87.926949] R10: 0000000080040003 R11: 0000000000000000 R12: ffff888103e54000 [ 87.926953] R13: ffffc900412ebc18 R14: 0000000000000001 R15: 0000000000000000 [ 87.926962] FS: 0000000000000000(0000) GS:ffff888233238000(0000) knlGS:0000000000000000 [ 87.926967] CS: e030 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 87.926971] CR2: 00007e7923b32708 CR3: 00000001088df000 CR4: 0000000000050660 [ 87.926977] Call Trace: [ 87.926981] <TASK> [ 87.926987] ? __call_rcu_common.constprop.0+0x11e/0x310 [ 87.926993] cancel_work_sync+0x5e/0x80 [ 87.926999] mei_cancel_work+0x19/0x40 [mei] [ 87.927051] mei_me_probe+0x273/0x2b0 [mei_me] [ 87.927060] local_pci_probe+0x45/0x90 [ 87.927066] pci_call_probe+0x5b/0x180 [ 87.927070] pci_device_probe+0x95/0x140 [ 87.927074] ? driver_sysfs_add+0x57/0xc0 [ 87.927079] really_probe+0xde/0x340 [ 87.927083] ? pm_runtime_barrier+0x54/0x90 [ 87.927087] __driver_probe_device+0x78/0x110 [ 87.927092] driver_probe_device+0x1f/0xa0 [ 87.927095] __driver_attach_async_helper+0x5e/0xe0 [ 87.927100] async_run_entry_fn+0x34/0x130 [ 87.927104] process_one_work+0x18d/0x340 [ 87.927108] worker_thread+0x256/0x3a0 [ 87.927111] ? __pfx_worker_thread+0x10/0x10 [ 87.927115] kthread+0xfc/0x240 [ 87.927120] ? __pfx_kthread+0x10/0x10 [ 87.927124] ? __pfx_kthread+0x10/0x10 [ 87.927127] ret_from_fork+0xf5/0x110 [ 87.927132] ? __pfx_kthread+0x10/0x10 [ 87.927136] ret_from_fork_asm+0x1a/0x30 [ 87.927141] </TASK> Tested-by: Guenter Roeck <groeck@google.com> Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Closes: https://lore.kernel.org/lkml/aQbYAXPADqfiXUYO@mail-itl/ Reported-by: Guenter Roeck <linux@roeck-us.net> Closes: https://lore.kernel.org/lkml/8deef7c4-ac75-4db8-91b7-02cf0e39e371@roeck-us.net/ Fixes: 7704e6be4ed2 ("mei: hook mei_device on class device") Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Tested-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Link: https://patch.msgid.link/20251102180836.1203314-1-alexander.usyskin@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-11-03power: supply: rt9756: Add Richtek RT9756 smart cap divider chargerChiYuan Huang
Add support for RT9756 smart cap divider charger. The RT9759 is a high efficiency and high charge current charger. The maximum charge current is up to 8A. It integrates a dual-phase charge pump core with ADC monitoring. Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Link: https://patch.msgid.link/f682812069b6be2138bfdae2ff9a9c84994d5b64.1761894605.git.cy_huang@richtek.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2025-11-03driver: reset: spacemit-p1: add driver for poweroff/rebootAurelien Jarno
This driver implements poweroff/reboot support for the SpacemiT P1 PMIC chip, which is commonly paired with the SpacemiT K1 SoC. The SpacemiT P1 support is implemented as a MFD driver, so the access is done directly through the regmap interface. Reboot or poweroff is triggered by setting a specific bit in a control register, which is automatically cleared by the hardware afterwards. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Link: https://patch.msgid.link/20251102230352.914421-2-aurelien@aurel32.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2025-11-03power: supply: apm_power: only unset own apm_get_power_statusAhelenia Ziemiańska
Mirroring drivers/macintosh/apm_emu.c, this means that modprobe apm_power && modprobe $anotherdriver && modprobe -r apm_power leaves $anotherdriver's apm_get_power_status instead of deleting it. Fixes: 3788ec932bfd ("[BATTERY] APM emulation driver for class batteries") Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Link: https://patch.msgid.link/xczpgox57hxbunkcbdl5fxhc4gnsajsipldfidi7355afezk64@tarta.nabijaczleweli.xyz Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2025-11-03power: supply: use ktime_divns() to avoid 64-bit divisionMichal Kubecek
The build of intel_dc_ti_battery module on i386 (32-bit) fails with ERROR: modpost: "__udivdi3" [drivers/power/supply/intel_dc_ti_battery.ko] This is caused by 64-bit division of ktime values by NSEC_PER_USEC. Use ktime_divns() helper which handles the division correctly on 32-bit architectures. Fixes: 8c5795fe5527 ("power: supply: Add new Intel Dollar Cove TI battery driver") Signed-off-by: Michal Kubecek <mkubecek@suse.cz> Reviewed-by: Dhruva Gole <d-gole@ti.com> Reviewed-by: Hans de Goede <hansg@kernel.org> Link: https://patch.msgid.link/20251015075957.8F40620057@lion.mk-sys.cz Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2025-11-03power: supply: qcom_battmgr: support disabling charge controlVal Packett
Existing userspace (in particular, upower) disables charge control by setting the start threshold to 0 and the stop threshold to 100. Handle that by actually setting the enable bit to 0 when a start threshold of 0 was requested. Fixes: cc3e883a0625 ("power: supply: qcom_battmgr: Add charge control support") Signed-off-by: Val Packett <val@packett.cool> Link: https://patch.msgid.link/20251012233333.19144-4-val@packett.cool Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2025-11-03power: supply: qcom_battmgr: clamp charge control thresholdsVal Packett
The sysfs API documentation says that drivers "round written values to the nearest supported value" for charge_control_end_threshold. Let's do this for both thresholds, as userspace (e.g. upower) generally does not expect these writes to fail at all. Fixes: cc3e883a0625 ("power: supply: qcom_battmgr: Add charge control support") Signed-off-by: Val Packett <val@packett.cool> Link: https://patch.msgid.link/20251012233333.19144-3-val@packett.cool Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2025-11-03power: supply: wm831x: Check wm831x_set_bits() return valueIvan Abramov
Since wm831x_set_bits() may return error, log failure and exit from wm831x_usb_limit_change() in such case. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 626b6cd5f52e ("power: wm831x_power: Support USB charger current limit management") Signed-off-by: Ivan Abramov <i.abramov@mt-integration.ru> Link: https://patch.msgid.link/20251009170553.566561-1-i.abramov@mt-integration.ru Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2025-11-03power: supply: rt9467: Prevent using uninitialized local variable in ↵Murad Masimov
rt9467_set_value_from_ranges() There is a typo in rt9467_set_value_from_ranges() that can cause leaving local variable sel with an undefined value which is then used in regmap_field_write(). Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 6f7f70e3a8dd ("power: supply: rt9467: Add Richtek RT9467 charger driver") Signed-off-by: Murad Masimov <m.masimov@mt-integration.ru> Link: https://patch.msgid.link/20251009145308.1830893-1-m.masimov@mt-integration.ru Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2025-11-03power: supply: rt9467: Return error on failure in rt9467_set_value_from_ranges()Ivan Abramov
The return value of rt9467_set_value_from_ranges() when setting AICL VTH is not checked, even though it may fail. Log error and return from rt9467_run_aicl() on fail. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 6f7f70e3a8dd ("power: supply: rt9467: Add Richtek RT9467 charger driver") Signed-off-by: Ivan Abramov <i.abramov@mt-integration.ru> Link: https://patch.msgid.link/20251009144725.562278-1-i.abramov@mt-integration.ru Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2025-11-03power: supply: max17040: Check iio_read_channel_processed() return codeIvan Abramov
Since iio_read_channel_processed() may fail, return its exit code on error. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 814755c48f8b ("power: max17040: get thermal data from adc if available") Signed-off-by: Ivan Abramov <i.abramov@mt-integration.ru> Link: https://patch.msgid.link/20251008133648.559286-1-i.abramov@mt-integration.ru Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2025-11-03power: supply: cw2015: Check devm_delayed_work_autocancel() return codeIvan Abramov
Since devm_delayed_work_autocancel() may fail, add return code check and exit cw_bat_probe() on error. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 0cb172a4918e ("power: supply: cw2015: Use device managed API to simplify the code") Signed-off-by: Ivan Abramov <i.abramov@mt-integration.ru> Link: https://patch.msgid.link/20251008120711.556021-1-i.abramov@mt-integration.ru Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2025-11-03power: supply: rt5033_charger: Fix device node reference leaksHaotian Zhang
The device node pointers `np_conn` and `np_edev`, obtained from of_parse_phandle() and of_get_parent() respectively, are not released. This results in a reference count leak. Add of_node_put() calls after the last use of these device nodes to properly release their references and fix the leaks. Fixes: 8242336dc8a8 ("power: supply: rt5033_charger: Add cable detection and USB OTG supply") Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn> Link: https://patch.msgid.link/20250929113234.1726-1-vulab@iscas.ac.cn Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2025-11-03power: supply: max77705: Fix potential IRQ chip conflict when probing two ↵Krzysztof Kozlowski
devices MAX77705 charger is most likely always a single device on the board, however nothing stops board designers to have two of them, thus same device driver could probe twice. Or user could manually try to probing second time. Device driver is not ready for that case, because it allocates statically 'struct regmap_irq_chip' as non-const and stores during probe in 'irq_drv_data' member a pointer to per-probe state container ('struct max77705_charger_data'). devm_regmap_add_irq_chip() does not make a copy of 'struct regmap_irq_chip' but stores the pointer. Second probe - either successful or failure - would overwrite the 'irq_drv_data' from previous device probe, so interrupts would be executed in a wrong context. Fixes: a6a494c8e3ce ("power: supply: max77705: Add charger driver for Maxim 77705") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20251023102905.71535-2-krzysztof.kozlowski@linaro.org Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2025-11-03power: supply: max77705_charger: implement aicl featureDzmitry Sankouski
Adaptive input current allows charger to reduce it's current consumption, when source is not able to provide enough power. Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> Link: https://patch.msgid.link/20250925-max77705_77976_charger_improvement-v6-1-972c716c17d1@gmail.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2025-11-03power: supply: Add bd718(15/28/78) charger driverAndreas Kemnade
Add charger driver for ROHM BD718(15/28/78) PMIC charger block. It is a stripped down version of the driver here: https://lore.kernel.org/lkml/dbd97c1b0d715aa35a8b4d79741e433d97c562aa.1637061794.git.matti.vaittinen@fi.rohmeurope.com/ For the ease of review and to do a step-by-step approach remove all the coloumb counter related stuff and do not sneak in BD71827 support. That also avoids non-trivial rebasing of the above series. Changes besides that: Replace the custom property by a standard one and do not use megaohms for the current sense resistor. Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com> Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com> Link: https://patch.msgid.link/20250918-bd71828-charger-v5-2-851164839c28@kemnade.info Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2025-11-02interconnect: qcom: icc-rpmh: drop support for non-dynamic IDSDmitry Baryshkov
Now as all RPMh interconnect drivers were converted to using the dynamic IDs, drop support for non-dynamic ID allocation. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251031-rework-icc-v3-25-0575304c9624@oss.qualcomm.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
2025-11-02interconnect: qcom: sm8750: convert to dynamic IDsDmitry Baryshkov
Stop using fixed and IDs and covert the platform to use dynamic IDs for the interconnect. This gives more flexibility and also allows us to drop the .num_links member, saving from possible errors related to it being not set or set incorrectly. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251031-rework-icc-v3-24-0575304c9624@oss.qualcomm.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
2025-11-02interconnect: qcom: sm8650: convert to dynamic IDsDmitry Baryshkov
Stop using fixed and IDs and covert the platform to use dynamic IDs for the interconnect. This gives more flexibility and also allows us to drop the .num_links member, saving from possible errors related to it being not set or set incorrectly. Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on QRD8650 Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251031-rework-icc-v3-23-0575304c9624@oss.qualcomm.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
2025-11-02interconnect: qcom: sm8550: convert to dynamic IDsDmitry Baryshkov
Stop using fixed and IDs and covert the platform to use dynamic IDs for the interconnect. This gives more flexibility and also allows us to drop the .num_links member, saving from possible errors related to it being not set or set incorrectly. Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on QRD8550 Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251031-rework-icc-v3-22-0575304c9624@oss.qualcomm.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
2025-11-02interconnect: qcom: sm8450: convert to dynamic IDsDmitry Baryshkov
Stop using fixed and IDs and covert the platform to use dynamic IDs for the interconnect. This gives more flexibility and also allows us to drop the .num_links member, saving from possible errors related to it being not set or set incorrectly. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251031-rework-icc-v3-21-0575304c9624@oss.qualcomm.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
2025-11-02interconnect: qcom: sm8350: convert to dynamic IDsDmitry Baryshkov
Stop using fixed and IDs and covert the platform to use dynamic IDs for the interconnect. This gives more flexibility and also allows us to drop the .num_links member, saving from possible errors related to it being not set or set incorrectly. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251031-rework-icc-v3-20-0575304c9624@oss.qualcomm.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
2025-11-02interconnect: qcom: sm8150: convert to dynamic IDsDmitry Baryshkov
Stop using fixed and IDs and covert the platform to use dynamic IDs for the interconnect. This gives more flexibility and also allows us to drop the .num_links member, saving from possible errors related to it being not set or set incorrectly. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251031-rework-icc-v3-19-0575304c9624@oss.qualcomm.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
2025-11-02interconnect: qcom: sm7150: convert to dynamic IDsDmitry Baryshkov
Stop using fixed and IDs and covert the platform to use dynamic IDs for the interconnect. This gives more flexibility and also allows us to drop the .num_links member, saving from possible errors related to it being not set or set incorrectly. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251031-rework-icc-v3-18-0575304c9624@oss.qualcomm.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
2025-11-02interconnect: qcom: sm6350: convert to dynamic IDsDmitry Baryshkov
Stop using fixed and IDs and covert the platform to use dynamic IDs for the interconnect. This gives more flexibility and also allows us to drop the .num_links member, saving from possible errors related to it being not set or set incorrectly. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251031-rework-icc-v3-17-0575304c9624@oss.qualcomm.com Signed-off-by: Georgi Djakov <djakov@kernel.org>