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

Commit db2236cc authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: dwc3-msm: Add additional debugging messages"

parents 65c8efc4 5a0974cf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -793,7 +793,7 @@ module_param(ep_addr_txdbg_mask, uint, S_IRUGO | S_IWUSR);
#define DBG_DATA_MSG   64UL

/* Maximum number of messages */
#define DBG_DATA_MAX   128UL
#define DBG_DATA_MAX   2048UL

static struct {
	char     (buf[DBG_DATA_MAX])[DBG_DATA_MSG];   /* buffer */
+9 −2
Original line number Diff line number Diff line
@@ -896,6 +896,8 @@ static void dwc3_restart_usb_work(struct work_struct *w)
		return;
	}

	dbg_event(0xFF, "RestartUSB", 0);

	/* Reset active USB connection */
	mdwc->ext_xceiv.bsv = false;
	queue_delayed_work(system_nrt_wq, &mdwc->resume_work, 0);
@@ -1972,6 +1974,7 @@ static void dwc3_resume_work(struct work_struct *w)
	/* handle any event that was queued while work was already running */
	if (!atomic_read(&dwc->in_lpm)) {
		dev_dbg(mdwc->dev, "%s: notifying xceiv event\n", __func__);
		dbg_event(0xFF, "RWrk !lpm", 0);
		if (mdwc->otg_xceiv) {
			dwc3_wait_for_ext_chg_done(mdwc);
			/* Handle erratic events during cable disconnect */
@@ -1982,11 +1985,12 @@ static void dwc3_resume_work(struct work_struct *w)
		return;
	}

	dbg_event(0xFF, "ReWr flag", atomic_read(&mdwc->pm_suspended));
	/* bail out if system resume in process, else initiate RESUME */
	if (atomic_read(&mdwc->pm_suspended)) {
		dbg_event(0xFF, "RWrk PMSus", 0);
		mdwc->resume_pending = true;
	} else {
		dbg_event(0xFF, "RWrk !PMSus", mdwc->otg_xceiv ? 1 : 0);
		pm_runtime_get_sync(mdwc->dev);
		if (mdwc->otg_xceiv) {
			/*
@@ -2001,7 +2005,6 @@ static void dwc3_resume_work(struct work_struct *w)
			pm_runtime_resume(&dwc->xhci->dev);
		}

		dbg_event(0xFF, "ReWr Else", mdwc->otg_xceiv ? 1 : 0);
		pm_runtime_put_noidle(mdwc->dev);
		if (mdwc->otg_xceiv && (mdwc->ext_xceiv.otg_capability)) {
			dwc3_wait_for_ext_chg_done(mdwc);
@@ -2081,6 +2084,8 @@ static irqreturn_t msm_dwc3_pwr_irq_thread(int irq, void *_mdwc)
	struct dwc3 *dwc = platform_get_drvdata(mdwc->dwc3);

	dev_dbg(mdwc->dev, "%s\n", __func__);
	dbg_event(0xFF, "PWR IRQ", atomic_read(&dwc->in_lpm));

	if (atomic_read(&dwc->in_lpm))
		dwc3_resume_work(&mdwc->resume_work.work);
	else
@@ -2301,6 +2306,7 @@ static int dwc3_msm_power_set_property_usb(struct power_supply *psy,
			 * Set debouncing delay to 120ms. Otherwise battery
			 * charging CDP complaince test fails if delay > 120ms.
			 */
			dbg_event(0xFF, "Q RW (vbus)", val->intval);
			queue_delayed_work(system_nrt_wq,
							&mdwc->resume_work, 12);

@@ -2486,6 +2492,7 @@ static void dwc3_id_work(struct work_struct *w)
		mdwc->ext_xceiv.id = mdwc->id_state;
	}

	dbg_event(0xFF, "RW (id)", 0);
	/* notify OTG */
	dwc3_resume_work(&mdwc->resume_work.work);
}
+2 −0
Original line number Diff line number Diff line
@@ -2161,6 +2161,7 @@ static int dwc3_gadget_start(struct usb_gadget *g,
	int			ret = 0;
	int			irq;

	dbg_event(0xFF, "GdgStrt Begin", 0);
	pm_runtime_get_sync(dwc->dev);
	irq = platform_get_irq(to_platform_device(dwc->dev), 0);
	dwc->irq = irq;
@@ -2197,6 +2198,7 @@ static int dwc3_gadget_start(struct usb_gadget *g,

	spin_unlock_irqrestore(&dwc->lock, flags);
	pm_runtime_put(dwc->dev);
	dbg_event(0xFF, "GdgStrt End", 0);

	return 0;