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

Commit 4bd717c0 authored by Vijayavardhan Vennapusa's avatar Vijayavardhan Vennapusa
Browse files

USB: dwc3_otg: Use correct delay for sm_work scheduling in A_IDLE



commit 711b9b11: "USB: dwc3_otg:
Retry if vbus regulator get fail with -EPROBE_DEFER" is required
for scheduling sm_work after one sec in case vbus_regulator get
fails when host cable connected during bootup. This introduced a
bug where sm_work is scheduled for delay much greater than one sec.
Hence fix the issue by using correct delay in case vbus_regulator
get fails during bootup.

Change-Id: I5001808962373ff03cf37de04e76ce264d5595e4
Signed-off-by: default avatarVijayavardhan Vennapusa <vvreddy@codeaurora.org>
parent 2caf5a83
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@
#include "io.h"
#include "xhci.h"

#define VBUS_REG_CHECK_DELAY	(jiffies + msecs_to_jiffies(1000))
#define VBUS_REG_CHECK_DELAY	(msecs_to_jiffies(1000))
#define MAX_INVALID_CHRGR_RETRY 3
static int max_chgr_retry_count = MAX_INVALID_CHRGR_RETRY;
module_param(max_chgr_retry_count, int, S_IRUGO | S_IWUSR);
@@ -686,7 +686,7 @@ static void dwc3_otg_sm_work(struct work_struct *w)
	struct dwc3_charger *charger = dotg->charger;
	bool work = 0;
	int ret = 0;
	int delay = 0;
	unsigned long delay = 0;

	pm_runtime_resume(phy->dev);
	dev_dbg(phy->dev, "%s state\n", usb_otg_state_string(phy->state));