Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 320f837d authored by Rajesh Bharathwaj's avatar Rajesh Bharathwaj Committed by Gerrit - the friendly Code Review server
Browse files

usb: dwc3-msm: Call client on cable insertion



Add support to call tusb1064 driver's function when USB cable is
inserted by providing the direction of the cable.

Change-Id: I7149359da6e31887efc5538a4c06a1c4ba2cca94
Signed-off-by: default avatarRajesh Bharathwaj <rajeshbharathwaj@codeaurora.org>
parent 7a0a670f
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -54,6 +54,10 @@
#include "dbm.h"
#include "debug.h"
#include "xhci.h"
#ifdef CONFIG_TUSB1064_XR_MISC
#include "../../misc/tusb1064.h"
#endif


#define SDP_CONNETION_CHECK_TIME 10000 /* in ms */

@@ -2956,9 +2960,13 @@ static void dwc3_resume_work(struct work_struct *w)
				EXTCON_PROP_USB_TYPEC_POLARITY, &val);
		if (ret)
			mdwc->typec_orientation = ORIENTATION_NONE;
		else
		else {
			mdwc->typec_orientation = val.intval ?
					ORIENTATION_CC2 : ORIENTATION_CC1;
#ifdef CONFIG_TUSB1064_XR_MISC
			tusb1064_usb_event(val.intval ? true : false);
#endif
		}

		dbg_event(0xFF, "cc_state", mdwc->typec_orientation);