From patchwork Thu Mar 11 06:03:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 397476 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp46334jai; Wed, 10 Mar 2021 22:04:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJzDuzC0r2nWoKNO+2y4OYoGv7QUYeDbk497EorfFcQNJYuYMh8rwUHAdlJg438NxbM0MrkH X-Received: by 2002:aa7:c1d5:: with SMTP id d21mr6670017edp.167.1615442664435; Wed, 10 Mar 2021 22:04:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615442664; cv=none; d=google.com; s=arc-20160816; b=l8N960/5KHWsboLss8HLX13azAUYBlVsji3SgpMWRS3Wxtxlx+7Y6FPtwwMIVf/YBu IRR03u6lJ0HJNWl4C3PYGN4LShjltLNKv7mJtLAPPP72uZJTztvht0ZbIJIoKUmT8hEY STA+nKVnTjFcjfFRkugJdcMdczmub3mgRmEN0HK9R7jygVvCbb1Wq2YWD65g3DnhYAI6 d8e8C4YzWCMLFKhXg053grntLi5G67qnqTJ5iHtan5lctsn8QNh3DwDCZj78v9v31VEg AXlj5tyo6HS/Vp7Jt6LhXRsPUJ2vady+wuNaWubfBx+7WlhSF9c70IJMv0t6zfApmRJU gP3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=HNPx2DSIhBecIZB40xNyDRpcDC3Xc50l5VqlNf/nUH8=; b=TlFdu++lEa0m1ca2wC+u5EDd0KZOtmM9F9gpFpJifw+Sq/jVFVUwWkPwwfrKwT+17i piuV5Rs+ald6GeXRKGIJqy5mpRwxUDK/0+YCqaOmpgPXqzdRE64Jspio5+NKT6A1ngxT 0LDZPEoT1A5QxToSHkXIuLBeHdyClH2/5NXRbBbomezTR+fxkRdU0/tXbxs3xW9gA9/h BGpZRWbOmqiEJydf21U2fSwudr8VgKBP/j0frfpR/NKPiHXFW2pixWYYOAQba/rm9pOI JiIKufcbvyeRpaDm2EYzfRggq0MVpmsSPYAzgmGRjGL+1wKE/4vJTDlAisZODTlK32NS TJ7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WV9lUW4M; spf=pass (google.com: domain of linux-usb-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a19si1089557ejt.403.2021.03.10.22.04.24; Wed, 10 Mar 2021 22:04:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-usb-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WV9lUW4M; spf=pass (google.com: domain of linux-usb-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229847AbhCKGDv (ORCPT + 3 others); Thu, 11 Mar 2021 01:03:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229830AbhCKGDa (ORCPT ); Thu, 11 Mar 2021 01:03:30 -0500 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FCA6C061574 for ; Wed, 10 Mar 2021 22:03:30 -0800 (PST) Received: by mail-pl1-x630.google.com with SMTP id j6so9683454plx.6 for ; Wed, 10 Mar 2021 22:03:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=HNPx2DSIhBecIZB40xNyDRpcDC3Xc50l5VqlNf/nUH8=; b=WV9lUW4MPtNCnOkJPaRPRTV+2s5GRwpU8BwS9IJjuhVsz0btlHgEcwtqTtjpyjS/Tn oUP0PJHF2PqXZl0C/ZzM9mfgB5xJEp3KYPbTny/VCt/HtA+B5F1LdzPFTM7ZHhAIzN73 UJXzVpm9x/AIUR4m2I5uXPzzkmgrc9pwJUeLZ/8o7IUobMqqFWXuUfoA4bFbKsWL+Mof q+/gsW6DxQ2LZx3c5pd5YKSw0CgjS7Fo8F9w3l41UqS3dcRr9uMjHyw2yzypW0KZHxt4 5Kw9Q4gpk/62/D47X3et8OXPykvMFBbdr6yMHY5Kctq38BPlmdqs9U1LbAeHZq/blJMU oiRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=HNPx2DSIhBecIZB40xNyDRpcDC3Xc50l5VqlNf/nUH8=; b=BlkFHLT9V0fDRx/R/iZz/d6g+7odDf98ZDDen98Wl7bAbcR43xGC1mq42ckAuHdS1Y 3iPHxHLfID0hrlNBRU6cWa0C1FmQS/NeSJ/bPJLbW0IWTVOFnuTq+uUkqHjGN4QzJLBX MCXP8C84RcAyISsoqGG7hEgkH3m5LYJmR+JowVELDjFonj+UCn4R/VMf+hSoQP6fda8M 4o+sN50rJkAtrJkA0HGcU2V3vgT4t0UBR6K8O7NnHSNTeSBlaLfSkGAWnPk4FFpE7i7I Ow1BnOA8g7DSPNXjSgY5BqngL0UtzYR6r5V+WSeAhii+tVxEswCi9y48t+yBOdB51wKp lKWg== X-Gm-Message-State: AOAM533lLWwdcm2IxkDVEBKspMTE4AntTuIrLWMvD+pj+zAY5bnwtND5 1GKMTW212qf/lYeW0/6YDfQf1A== X-Received: by 2002:a17:902:c808:b029:e6:4204:f62f with SMTP id u8-20020a170902c808b02900e64204f62fmr6656703plx.0.1615442609512; Wed, 10 Mar 2021 22:03:29 -0800 (PST) Received: from localhost.localdomain (80.251.214.228.16clouds.com. [80.251.214.228]) by smtp.gmail.com with ESMTPSA id b7sm1294397pgh.37.2021.03.10.22.03.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 22:03:29 -0800 (PST) From: Shawn Guo To: Felipe Balbi Cc: Bjorn Andersson , linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, Shawn Guo Subject: [PATCH] usb: dwc3: qcom: skip interconnect init for ACPI probe Date: Thu, 11 Mar 2021 14:03:18 +0800 Message-Id: <20210311060318.25418-1-shawn.guo@linaro.org> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The ACPI probe starts failing since commit bea46b981515 ("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: bea46b981515 ("usb: dwc3: qcom: Add interconnect support in dwc3 driver") Signed-off-by: Shawn Guo --- drivers/usb/dwc3/dwc3-qcom.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.17.1 diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c index 175a609cd0af..7dc74885a635 100644 --- a/drivers/usb/dwc3/dwc3-qcom.c +++ b/drivers/usb/dwc3/dwc3-qcom.c @@ -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",