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>
Fri, 11 Apr 2025 14:08:34 +0000 (16:08 +0200)
commitd4e5b10c55627e2f3fc9e5b337a28b4e2f02a55e
tree97e4a9d6984c4e5bae8012ad657540f65bed49ce
parentffb34a60ce86656ba12d46e91f1ccc71dd221251
usb: common: usb-conn-gpio: use a unique name for usb connector device

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>
drivers/usb/common/usb-conn-gpio.c