From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Andrey Smirnov <andrew.smirnov@gmail.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Felipe Balbi <balbi@kernel.org>, Ferry Toth <fntoth@gmail.com>,
stable@vger.kernel.org
Subject: [PATCH v2 1/2] Revert "USB: fixup for merge issue with "usb: dwc3: Don't switch OTG -> peripheral if extcon is present""
Date: Tue, 27 Sep 2022 18:53:31 +0300 [thread overview]
Message-ID: <20220927155332.10762-2-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20220927155332.10762-1-andriy.shevchenko@linux.intel.com>
This reverts commit 8bd6b8c4b1009d7d2662138d6bdc6fe58a9274c5.
Prerequisite revert for the reverting of the original commit 0f0101719138.
Fixes: 8bd6b8c4b100 ("USB: fixup for merge issue with "usb: dwc3: Don't switch OTG -> peripheral if extcon is present"")
Fixes: 0f0101719138 ("usb: dwc3: Don't switch OTG -> peripheral if extcon is present")
Reported-by: Ferry Toth <fntoth@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Ferry Toth <fntoth@gmail.com> # for Merrifield
---
drivers/usb/dwc3/core.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index d0237b30c9be..c2b463469d51 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -1684,8 +1684,13 @@ static struct extcon_dev *dwc3_get_extcon(struct dwc3 *dwc)
* This device property is for kernel internal use only and
* is expected to be set by the glue code.
*/
- if (device_property_read_string(dev, "linux,extcon-name", &name) == 0)
- return extcon_get_extcon_dev(name);
+ if (device_property_read_string(dev, "linux,extcon-name", &name) == 0) {
+ edev = extcon_get_extcon_dev(name);
+ if (!edev)
+ return ERR_PTR(-EPROBE_DEFER);
+
+ return edev;
+ }
/*
* Try to get an extcon device from the USB PHY controller's "port"
--
2.35.1
next prev parent reply other threads:[~2022-09-27 15:53 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 15:53 [PATCH v2 0/2] usb: dwc3: revert OTG changes for Intel Merrifield Andy Shevchenko
2022-09-27 15:53 ` Andy Shevchenko [this message]
2022-09-27 15:53 ` [PATCH v2 2/2] Revert "usb: dwc3: Don't switch OTG -> peripheral if extcon is present" Andy Shevchenko
2022-09-29 3:01 ` Andrey Smirnov
2022-09-29 8:47 ` Sven Peter
2022-10-03 21:57 ` Thinh Nguyen
2022-10-04 8:28 ` Andy Shevchenko
2022-10-04 19:14 ` Ferry Toth
2022-10-05 2:12 ` Thinh Nguyen
2022-10-05 2:39 ` Andrey Smirnov
[not found] ` <25bc7dbe-f530-298f-f826-087606cf9491@gmail.com>
2022-10-05 8:44 ` Andy Shevchenko
2022-10-05 8:45 ` Ferry Toth
2022-10-06 2:00 ` Thinh Nguyen
[not found] ` <2886b82d-a1f6-d288-e8d1-edae54046b4f@gmail.com>
2022-10-06 2:12 ` Thinh Nguyen
2022-10-06 12:28 ` Ferry Toth
2022-10-07 2:11 ` Thinh Nguyen
2022-10-07 13:07 ` Ferry Toth
2022-10-10 5:02 ` Andrey Smirnov
2022-10-10 7:10 ` Andy Shevchenko
2022-10-10 21:40 ` Andrey Smirnov
2022-10-11 9:21 ` Andy Shevchenko
2022-10-11 9:36 ` Ferry Toth
2022-10-11 20:17 ` Andrey Smirnov
2022-10-12 10:32 ` Andy Shevchenko
2022-10-12 22:13 ` Andrey Smirnov
2022-10-10 11:04 ` Ferry Toth
2022-10-10 20:52 ` Ferry Toth
2022-10-10 21:35 ` Andrey Smirnov
2022-10-11 18:38 ` Ferry Toth
2022-10-11 20:50 ` Andrey Smirnov
2022-10-12 9:30 ` Ferry Toth
2022-10-12 20:34 ` Ferry Toth
2022-10-12 21:43 ` Andrey Smirnov
2022-10-13 19:35 ` Ferry Toth
2022-10-15 19:54 ` Andrey Smirnov
2022-10-16 20:59 ` Ferry Toth
2022-10-17 19:44 ` Steev Klimaszewski
2022-10-17 21:20 ` Andrey Smirnov
2022-10-18 20:47 ` Ferry Toth
2022-10-20 19:55 ` Ferry Toth
2022-10-17 21:29 ` [PATCH v2 0/2] usb: dwc3: revert OTG changes for Intel Merrifield Andrey Smirnov
2022-10-17 22:20 ` [PATCH v2 2/2] Revert "usb: dwc3: Don't switch OTG -> peripheral if extcon is present" Steev Klimaszewski
2022-10-17 22:22 ` [PATCH v2 0/2] usb: dwc3: revert OTG changes for Intel Merrifield Thinh Nguyen
2022-10-17 23:12 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220927155332.10762-2-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=andrew.smirnov@gmail.com \
--cc=balbi@kernel.org \
--cc=fntoth@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.