From 5f160c51129bfb4b1d5e8845fdacbe3bade30b8f Mon Sep 17 00:00:00 2001 From: Simo Piiroinen Date: Tue, 14 Nov 2017 10:52:11 +0200 Subject: [PATCH] [udev] Handle high voltage dedicated chargers. JB#39319 While usb-moded correctly goes to charging-only mode when/if it sees power supply type go through USB_DCP -> USB_HVDCP, it still complains about unhandled USB_HVDCP type. Explicitly treat receiving of high voltage dedicated charger profile events as a charger connection. Signed-off-by: Simo Piiroinen --- src/usb_moded-udev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/usb_moded-udev.c b/src/usb_moded-udev.c index 8706fdd..2e36976 100644 --- a/src/usb_moded-udev.c +++ b/src/usb_moded-udev.c @@ -447,7 +447,9 @@ static void udev_parse(struct udev_device *dev, bool initial) else schedule_cable_connection_timeout(); } - else if (!strcmp(tmp, "USB_DCP")) { + else if (!strcmp(tmp, "USB_DCP") || + !strcmp(tmp, "USB_HVDCP") || + !strcmp(tmp, "USB_HVDCP_3")) { setup_charger_connection(); } else if( !strcmp(tmp, "Unknown")) {