Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp523758rwb; Fri, 13 Jan 2023 00:24:39 -0800 (PST) X-Google-Smtp-Source: AMrXdXtW4hLa5Jab79wCgYi6tTpV2yZJRcEbSSwKfqfFOSLz/PTdHfthLHRKtWHeflXIkDLaAGn/ X-Received: by 2002:a17:902:9043:b0:189:bc50:b93b with SMTP id w3-20020a170902904300b00189bc50b93bmr67370231plz.3.1673598278875; Fri, 13 Jan 2023 00:24:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673598278; cv=none; d=google.com; s=arc-20160816; b=F4o2/lJuz7r52lTgEiMGZKSIh9TDBH2xSvdn73udqa0rMwQ1L7AReh1hA3sbLS5n+T 7VWk3K1/TtDtMaFDshW5JSHkiPmlb6h1NhTLK4QyDPiBzHpVFJaw0Y1NZT7PaxAVnIEu 9sb9aFqncohNdxcKN5FApJXUZEN6xMKnlEy55COKTKNhg0fyeX+W8V2jJrTqWrQMGnV7 ruUjzhSHktTOkSV7X0hDB+/5amYK6BxZmhvNb5WKubJQNJ3Xcm93s0GSleI0O6GXVoBD Nmv+q+GZWLPfJpYo2TFp1QP5ZR3ohCbm9rgACc71HC5MRdQq9Qh+7+FvR6xGGBXFEXIw uzlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=CfDFlio+/Z9X+ic4P5g2oV63AvMLZ08/cPQMYD5lpoA=; b=PcP9jZivqCeX7jJcCjdQNIhBZo/XhTAaUb925nYFbIiVIdD4kvv+S6DydA5LH6Lz/S llyrjf8CRllcFJt4PILNeuaxHvWISR2Kof4QzZ8zEWur3WsUtAFzB+GgE3KG6o3UkJJ7 aPFh/L70V5Vl8SMVHMvGhec/vuH6yAgyOVLf+z1PeGqwDiVBFRnN5hJPQD9qYRBfC3J3 FoVe10+HodfMsBaK0g+msKVBpLfwUjccisR+/ak4Eo8gVfUe9jCH+5uPrHpaVIDs3s81 F0Hf5sf14jvVytVa9q4cePoeh8l2fvLhkvI26TecBMRN1wMFuHmrFS0iH2KTRFAn72wc G3mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ZLE/kooO"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g7-20020a1709029f8700b00192a8d6e21csi19510719plq.458.2023.01.13.00.24.32; Fri, 13 Jan 2023 00:24:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ZLE/kooO"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240906AbjAMILJ (ORCPT + 50 others); Fri, 13 Jan 2023 03:11:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235311AbjAMIKW (ORCPT ); Fri, 13 Jan 2023 03:10:22 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2F6A6369; Fri, 13 Jan 2023 00:09:28 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6DD18B81FF6; Fri, 13 Jan 2023 08:09:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 171ACC433D2; Fri, 13 Jan 2023 08:09:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673597366; bh=zSasbgdHynKwfOjksylVPOoExRkYiM4TC878mGmgv54=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZLE/kooOpcCY4IviTNZiNIs7j0uraeKNofPA7RBDKDdYNmyEhL1+HFJD4suPSinNB Gf6z+TUM9sv4RYwZaVdVkN9wQjY3ijOPi1EkL0qhnaxC/KD5JU7Vl1rBhOKOtyc1ar 2nxSLE+B1V5sW36DZRU8EZx0OfuUHnI3WAkeUBiHLx1PQvQKYU5L/LnrxQJnUm27Ul KDUhocgTlb7MXFjLZe3xt53e9MNZ7MnB1iejurVLHaWpwrSoR2EtGCjP1sgS/8Dbr2 gdQzOwNYss14SHo1E418WwurqfzPdWeddGFzUfhIKzPB9puCdTfwmlq7sxh/3c4UJW JcTuDj4Ot78kQ== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1pGF83-0006Nr-KU; Fri, 13 Jan 2023 09:09:35 +0100 Date: Fri, 13 Jan 2023 09:09:35 +0100 From: Johan Hovold To: Stephen Boyd Cc: stable@vger.kernel.org, Johan Hovold , linux-kernel@vger.kernel.org, patches@lists.linux.dev, Dmitry Baryshkov , Vinod Koul Subject: Re: [PATCH 5.15.y 4/4] phy: qcom-qmp-combo: fix runtime suspend Message-ID: References: <20230113005405.3992011-1-swboyd@chromium.org> <20230113005405.3992011-5-swboyd@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230113005405.3992011-5-swboyd@chromium.org> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 12, 2023 at 04:54:05PM -0800, Stephen Boyd wrote: > From: Johan Hovold > > commit c7b98de745cffdceefc077ad5cf9cda032ef8959 upstream. > > Drop the confused runtime-suspend type check which effectively broke > runtime PM if the DP child node happens to be parsed before the USB > child node during probe (e.g. due to order of child nodes in the > devicetree). > > Instead use the new driver data USB PHY pointer to access the USB > configuration and resources. > > Fixes: 52e013d0bffa ("phy: qcom-qmp: Add support for DP in USB3+DP combo phy") > Reviewed-by: Dmitry Baryshkov > Signed-off-by: Johan Hovold > Link: https://lore.kernel.org/r/20221114081346.5116-6-johan+linaro@kernel.org > Signed-off-by: Vinod Koul > [swboyd@chromium.org: Backport to pre-split driver] > Signed-off-by: Stephen Boyd > --- > drivers/phy/qualcomm/phy-qcom-qmp.c | 12 ++---------- > 1 file changed, 2 insertions(+), 10 deletions(-) > > diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c > index 9fda6d283f20..d928afe2ebba 100644 > --- a/drivers/phy/qualcomm/phy-qcom-qmp.c > +++ b/drivers/phy/qualcomm/phy-qcom-qmp.c > @@ -4985,15 +4985,11 @@ static void qcom_qmp_phy_disable_autonomous_mode(struct qmp_phy *qphy) > static int __maybe_unused qcom_qmp_phy_runtime_suspend(struct device *dev) > { > struct qcom_qmp *qmp = dev_get_drvdata(dev); > - struct qmp_phy *qphy = qmp->phys[0]; > + struct qmp_phy *qphy = qmp->usb_phy; > const struct qmp_phy_cfg *cfg = qphy->cfg; > > dev_vdbg(dev, "Suspending QMP phy, mode:%d\n", qphy->mode); So this doesn't work currently either as the usb_phy pointer is not set for PCIe and UFS PHYs. > > - /* Supported only for USB3 PHY and luckily USB3 is the first phy */ > - if (cfg->type != PHY_TYPE_USB3) > - return 0; > - > if (!qmp->init_count) { > dev_vdbg(dev, "PHY not initialized, bailing out\n"); > return 0; Johan