From 1087df59e26326ee9583d2a49e183feaf9c303d8 Mon Sep 17 00:00:00 2001 From: Jianwei Zheng Date: Tue, 23 Jul 2024 14:52:34 +0800 Subject: [PATCH] extcon: usb-gpio: add some extcon cables Current Code USB2 PHY use extcon notifier to send USB charger types to power driver. If we use gpio to detect vbus or id state, the extcon device is allocated and registered by extcon-usb-gpio.c driver and USB2 PHY obtains this extcon device through DTS. If these cables are missing, it will cause USB2 PHY driver to be unable to set the status of these cables, leading to functional abnormalities. Change-Id: Iec27dfde4ec8bf12294bd6c57c3db5dada2f35cd Signed-off-by: William Wu Signed-off-by: Jianwei Zheng --- drivers/extcon/extcon-usb-gpio.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/extcon/extcon-usb-gpio.c b/drivers/extcon/extcon-usb-gpio.c index 40d967a11e87..3681ff92da68 100644 --- a/drivers/extcon/extcon-usb-gpio.c +++ b/drivers/extcon/extcon-usb-gpio.c @@ -37,6 +37,11 @@ struct usb_extcon_info { static const unsigned int usb_extcon_cable[] = { EXTCON_USB, EXTCON_USB_HOST, + EXTCON_USB_VBUS_EN, + EXTCON_CHG_USB_SDP, + EXTCON_CHG_USB_CDP, + EXTCON_CHG_USB_DCP, + EXTCON_CHG_USB_SLOW, EXTCON_NONE, };