]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: common: usb-conn-gpio: use a unique name for usb connector device
authorChance Yang <chance.yang@kneron.us>
Fri, 11 Apr 2025 08:33:26 +0000 (16:33 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 6 Jul 2025 08:57:55 +0000 (10:57 +0200)
commitb09737d4071e052f8418ff62969a2ac0dd297341
tree1eecb2da49ead5fe68dd2da9400416b4694d1f3c
parent6db06aaea07bb7c8e33a425cf7b98bf29ee6056e
usb: common: usb-conn-gpio: use a unique name for usb connector device

[ Upstream commit d4e5b10c55627e2f3fc9e5b337a28b4e2f02a55e ]

The current implementation of the usb-conn-gpio driver uses a fixed
"usb-charger" name for all USB connector devices. This causes conflicts
in the power supply subsystem when multiple USB connectors are present,
as duplicate names are not allowed.

Use IDA to manage unique IDs for naming usb connectors (e.g.,
usb-charger-0, usb-charger-1).

Signed-off-by: Chance Yang <chance.yang@kneron.us>
Link: https://lore.kernel.org/r/20250411-work-next-v3-1-7cd9aa80190c@kneron.us
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/common/usb-conn-gpio.c