Skip to content

Commit

Permalink
usb: dwc3: qcom: skip interconnect init for ACPI probe
Browse files Browse the repository at this point in the history
commit 5e4010e upstream.

The ACPI probe starts failing since commit bea46b9 ("usb: dwc3:
qcom: Add interconnect support in dwc3 driver"), because there is no
interconnect support for ACPI, and of_icc_get() call in
dwc3_qcom_interconnect_init() will just return -EINVAL.

Fix the problem by skipping interconnect init for ACPI probe, and then
the NULL icc_path_ddr will simply just scheild all ICC calls.

Fixes: bea46b9 ("usb: dwc3: qcom: Add interconnect support in dwc3 driver")
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210311060318.25418-1-shawn.guo@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Shawn Guo authored and Greg Kroah-Hartman committed Apr 7, 2021
1 parent 79b09e4 commit ac52350
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/usb/dwc3/dwc3-qcom.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ static int dwc3_qcom_interconnect_init(struct dwc3_qcom *qcom)
struct device *dev = qcom->dev;
int ret;

if (has_acpi_companion(dev))
return 0;

qcom->icc_path_ddr = of_icc_get(dev, "usb-ddr");
if (IS_ERR(qcom->icc_path_ddr)) {
dev_err(dev, "failed to get usb-ddr path: %ld\n",
Expand Down

0 comments on commit ac52350

Please sign in to comment.