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

Commit d3068532 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: Don't schedule sm_work initially during probe"

parents c730c87d 6a6f8be3
Loading
Loading
Loading
Loading
+7 −7
Original line number Original line Diff line number Diff line
@@ -55,9 +55,6 @@
#define DWC3_IDEV_CHG_MAX 1500
#define DWC3_IDEV_CHG_MAX 1500
#define DWC3_HVDCP_CHG_MAX 1800
#define DWC3_HVDCP_CHG_MAX 1800


/* time out to wait for USB cable status notification (in ms)*/
#define SM_INIT_TIMEOUT 30000

/* AHB2PHY register offsets */
/* AHB2PHY register offsets */
#define PERIPH_SS_AHB2PHY_TOP_CFG 0x10
#define PERIPH_SS_AHB2PHY_TOP_CFG 0x10


@@ -2152,7 +2149,11 @@ static int dwc3_msm_resume(struct dwc3_msm *mdwc)
 */
 */
static void dwc3_ext_event_notify(struct dwc3_msm *mdwc)
static void dwc3_ext_event_notify(struct dwc3_msm *mdwc)
{
{
	/* Flush processing any pending events before handling new ones */
	/*
	 * Flush processing any pending events before handling new ones except
	 * for initial notification during bootup.
	 */
	if (mdwc->init)
		flush_delayed_work(&mdwc->sm_work);
		flush_delayed_work(&mdwc->sm_work);


	if (mdwc->id_state == DWC3_ID_FLOAT) {
	if (mdwc->id_state == DWC3_ID_FLOAT) {
@@ -2987,8 +2988,6 @@ static int dwc3_msm_probe(struct platform_device *pdev)
	if (of_property_read_bool(node, "qcom,disable-dev-mode-pm"))
	if (of_property_read_bool(node, "qcom,disable-dev-mode-pm"))
		pm_runtime_get_noresume(mdwc->dev);
		pm_runtime_get_noresume(mdwc->dev);


	schedule_delayed_work(&mdwc->sm_work, 0);

	/* Update initial ID state */
	/* Update initial ID state */
	if (mdwc->pmic_id_irq) {
	if (mdwc->pmic_id_irq) {
		enable_irq(mdwc->pmic_id_irq);
		enable_irq(mdwc->pmic_id_irq);
@@ -3533,6 +3532,7 @@ static void dwc3_otg_sm_work(struct work_struct *w)
				break;
				break;
			}
			}
		} else {
		} else {
			mdwc->typec_current_max = 0;
			dwc3_msm_gadget_vbus_draw(mdwc, 0);
			dwc3_msm_gadget_vbus_draw(mdwc, 0);
			dev_dbg(mdwc->dev, "No device, allowing suspend\n");
			dev_dbg(mdwc->dev, "No device, allowing suspend\n");
		}
		}