From patchwork Thu Jun 22 19:40:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrien Thierry X-Patchwork-Id: 695808 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D62D0EB64DC for ; Thu, 22 Jun 2023 19:41:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230151AbjFVTl0 (ORCPT ); Thu, 22 Jun 2023 15:41:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230306AbjFVTl0 (ORCPT ); Thu, 22 Jun 2023 15:41:26 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AB841BE1 for ; Thu, 22 Jun 2023 12:40:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687462839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uDPZNxjzH+jHNZJo2QpSpUM+1Ny6iijvGtMks4f3Nq8=; b=XLwAfcxffZUxgTbYCUfvhBomouBMjOHFzzI0TfcVXAeb1J01hWedTHWXeGD0ZGBxTvbjlJ WOD1SJB9znMQuCFMygfYj42Cni9APLLxrj1CXXq9zmzXkLM0CUcV25fAEQj8LIKC5GRnqn LqnbtP06fuCIIx614He9NTmRTdpXOcE= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-155-t6yrfDy8Ne673tv7ViHN1A-1; Thu, 22 Jun 2023 15:40:38 -0400 X-MC-Unique: t6yrfDy8Ne673tv7ViHN1A-1 Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-62ff7d8de12so81467086d6.2 for ; Thu, 22 Jun 2023 12:40:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687462837; x=1690054837; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uDPZNxjzH+jHNZJo2QpSpUM+1Ny6iijvGtMks4f3Nq8=; b=aX/swIZ4AsHhnI6eC1jP//EyiAkkLRJISL4VJKcxBRXBZ8wyMTjfdluSlnOzNwla8Z hjGIybaswDIuCoIPxQoXR22hiy6x57oPzHkAPU372QXEE9SXy6FtbCfsaFPaJR5QrUIW YTbVwxGJ5k6AHxE4XwFT056OF81YLVtwlXSFUSuLm12zh1RWfOtCpe7bHs8DUXtBatbC 8WTM/9TwcNQkf7U8SMbqTdGxUri325W8MGIN3LR12bnWVHfcbF6C+s/yuG7xgRRmG3L4 N6AGra8ICI7rID+Q0iwHQVHaGyquayWWPxPrfZggzS9/Kv1/bftontPcOJHgMFMsKC4k K5Ww== X-Gm-Message-State: AC+VfDzk3A3TUZjApiIspeiirW/jNRgZEc8rzMCDtba6OQBsYQgSTA1F b7GP1MH0zIEiM+fe8I4LDyzMTwbc7FZ41lOlGMIB7KkaPKIquk+Lw3jwhgs1j7Kcg61y4zBcjH9 nY04QoDcZJq7PpO6UA0iZcRaD5Q== X-Received: by 2002:ad4:4eea:0:b0:632:28ab:87ef with SMTP id dv10-20020ad44eea000000b0063228ab87efmr2462859qvb.9.1687462837640; Thu, 22 Jun 2023 12:40:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ48ljbTVVqciyrTAaT63ohXJ00bzYVr2e5hnlxltW2yKLyktmAlcIfQrs9LDlnWNwknhydvkg== X-Received: by 2002:ad4:4eea:0:b0:632:28ab:87ef with SMTP id dv10-20020ad44eea000000b0063228ab87efmr2462833qvb.9.1687462837364; Thu, 22 Jun 2023 12:40:37 -0700 (PDT) Received: from fedora.redhat.com ([107.171.218.122]) by smtp.gmail.com with ESMTPSA id jo30-20020a056214501e00b006301819be40sm4174183qvb.49.2023.06.22.12.40.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jun 2023 12:40:36 -0700 (PDT) From: Adrien Thierry To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Wesley Cheng , Stephen Boyd , Philipp Zabel , Manu Gautam Cc: Adrien Thierry , Andrew Halaney , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org Subject: [PATCH v3 1/3] phy: qcom-snps-femto-v2: properly enable ref clock Date: Thu, 22 Jun 2023 15:40:18 -0400 Message-Id: <20230622194021.80892-2-athierry@redhat.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230622194021.80892-1-athierry@redhat.com> References: <20230622194021.80892-1-athierry@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The driver is not enabling the ref clock, which thus gets disabled by the clk_disable_unused initcall. This leads to the dwc3 controller failing to initialize if probed after clk_disable_unused is called, for instance when the driver is built as a module. To fix this, switch to the clk_bulk API to handle both cfg_ahb and ref clocks at the proper places. Note that the cfg_ahb clock is currently not used by any device tree instantiation of the PHY. Work needs to be done separately to fix this. Link: https://lore.kernel.org/linux-arm-msm/ZEqvy+khHeTkC2hf@fedora/ Fixes: 51e8114f80d0 ("phy: qcom-snps: Add SNPS USB PHY driver for QCOM based SOCs") Reviewed-by: Andrew Halaney Signed-off-by: Adrien Thierry --- drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c | 67 ++++++++++++++----- 1 file changed, 49 insertions(+), 18 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c index 6c237f3cc66d..ce1d2f8b568a 100644 --- a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c +++ b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c @@ -110,11 +110,13 @@ struct phy_override_seq { /** * struct qcom_snps_hsphy - snps hs phy attributes * + * @dev: device structure + * * @phy: generic phy * @base: iomapped memory space for snps hs phy * - * @cfg_ahb_clk: AHB2PHY interface clock - * @ref_clk: phy reference clock + * @num_clks: number of clocks + * @clks: array of clocks * @phy_reset: phy reset control * @vregs: regulator supplies bulk data * @phy_initialized: if PHY has been initialized correctly @@ -122,11 +124,13 @@ struct phy_override_seq { * @update_seq_cfg: tuning parameters for phy init */ struct qcom_snps_hsphy { + struct device *dev; + struct phy *phy; void __iomem *base; - struct clk *cfg_ahb_clk; - struct clk *ref_clk; + int num_clks; + struct clk_bulk_data *clks; struct reset_control *phy_reset; struct regulator_bulk_data vregs[SNPS_HS_NUM_VREGS]; @@ -135,6 +139,32 @@ struct qcom_snps_hsphy { struct phy_override_seq update_seq_cfg[NUM_HSPHY_TUNING_PARAMS]; }; +static int qcom_snps_hsphy_clk_init(struct qcom_snps_hsphy *hsphy) +{ + struct device *dev = hsphy->dev; + + hsphy->num_clks = 2; + hsphy->clks = devm_kcalloc(dev, hsphy->num_clks, sizeof(*hsphy->clks), GFP_KERNEL); + if (!hsphy->clks) + return -ENOMEM; + + /* + * HACK: For cfg_ahb clock, use devm_clk_get_optional() because currently no device + * tree instantiation of the PHY is using the clock. This needs to be fixed in order + * for this code to be able to use devm_clk_bulk_get(). + */ + hsphy->clks[0].id = "cfg_ahb"; + hsphy->clks[0].clk = devm_clk_get_optional(dev, "cfg_ahb"); + + hsphy->clks[1].id = "ref"; + hsphy->clks[1].clk = devm_clk_get(dev, "ref"); + if (IS_ERR(hsphy->clks[1].clk)) + return dev_err_probe(dev, PTR_ERR(hsphy->clks[1].clk), + "failed to get ref clk\n"); + + return 0; +} + static inline void qcom_snps_hsphy_write_mask(void __iomem *base, u32 offset, u32 mask, u32 val) { @@ -165,7 +195,7 @@ static int qcom_snps_hsphy_suspend(struct qcom_snps_hsphy *hsphy) 0, USB2_AUTO_RESUME); } - clk_disable_unprepare(hsphy->cfg_ahb_clk); + clk_bulk_disable_unprepare(hsphy->num_clks, hsphy->clks); return 0; } @@ -175,9 +205,9 @@ static int qcom_snps_hsphy_resume(struct qcom_snps_hsphy *hsphy) dev_dbg(&hsphy->phy->dev, "Resume QCOM SNPS PHY, mode\n"); - ret = clk_prepare_enable(hsphy->cfg_ahb_clk); + ret = clk_bulk_prepare_enable(hsphy->num_clks, hsphy->clks); if (ret) { - dev_err(&hsphy->phy->dev, "failed to enable cfg ahb clock\n"); + dev_err(&hsphy->phy->dev, "failed to enable clocks\n"); return ret; } @@ -374,16 +404,16 @@ static int qcom_snps_hsphy_init(struct phy *phy) if (ret) return ret; - ret = clk_prepare_enable(hsphy->cfg_ahb_clk); + ret = clk_bulk_prepare_enable(hsphy->num_clks, hsphy->clks); if (ret) { - dev_err(&phy->dev, "failed to enable cfg ahb clock, %d\n", ret); + dev_err(&phy->dev, "failed to enable clocks, %d\n", ret); goto poweroff_phy; } ret = reset_control_assert(hsphy->phy_reset); if (ret) { dev_err(&phy->dev, "failed to assert phy_reset, %d\n", ret); - goto disable_ahb_clk; + goto disable_clks; } usleep_range(100, 150); @@ -391,7 +421,7 @@ static int qcom_snps_hsphy_init(struct phy *phy) ret = reset_control_deassert(hsphy->phy_reset); if (ret) { dev_err(&phy->dev, "failed to de-assert phy_reset, %d\n", ret); - goto disable_ahb_clk; + goto disable_clks; } qcom_snps_hsphy_write_mask(hsphy->base, USB2_PHY_USB_PHY_CFG0, @@ -448,8 +478,8 @@ static int qcom_snps_hsphy_init(struct phy *phy) return 0; -disable_ahb_clk: - clk_disable_unprepare(hsphy->cfg_ahb_clk); +disable_clks: + clk_bulk_disable_unprepare(hsphy->num_clks, hsphy->clks); poweroff_phy: regulator_bulk_disable(ARRAY_SIZE(hsphy->vregs), hsphy->vregs); @@ -461,7 +491,7 @@ static int qcom_snps_hsphy_exit(struct phy *phy) struct qcom_snps_hsphy *hsphy = phy_get_drvdata(phy); reset_control_assert(hsphy->phy_reset); - clk_disable_unprepare(hsphy->cfg_ahb_clk); + clk_bulk_disable_unprepare(hsphy->num_clks, hsphy->clks); regulator_bulk_disable(ARRAY_SIZE(hsphy->vregs), hsphy->vregs); hsphy->phy_initialized = false; @@ -554,14 +584,15 @@ static int qcom_snps_hsphy_probe(struct platform_device *pdev) if (!hsphy) return -ENOMEM; + hsphy->dev = dev; + hsphy->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(hsphy->base)) return PTR_ERR(hsphy->base); - hsphy->ref_clk = devm_clk_get(dev, "ref"); - if (IS_ERR(hsphy->ref_clk)) - return dev_err_probe(dev, PTR_ERR(hsphy->ref_clk), - "failed to get ref clk\n"); + ret = qcom_snps_hsphy_clk_init(hsphy); + if (ret) + return dev_err_probe(dev, ret, "failed to initialize clocks\n"); hsphy->phy_reset = devm_reset_control_get_exclusive(&pdev->dev, NULL); if (IS_ERR(hsphy->phy_reset)) { From patchwork Thu Jun 22 19:40:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrien Thierry X-Patchwork-Id: 694942 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CAB69EB64DA for ; Thu, 22 Jun 2023 19:41:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230306AbjFVTle (ORCPT ); Thu, 22 Jun 2023 15:41:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230116AbjFVTlc (ORCPT ); Thu, 22 Jun 2023 15:41:32 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05A461BCC for ; Thu, 22 Jun 2023 12:40:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687462846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DqhwtQo4HweKbF66I7wMIR+srfhZ3FF6k/Qs3cAOKDk=; b=M2WPIDDM4lXcXJOgy8DZ74L4KophhdtAS9YVgWi+1jwZl7l8TOdX7Uja2F4geMcCa8nYqz aJFGMl0IpHjYWDOjfwncUqyo8gm6wp9RIeRlUw5uLD4KkS0OTDWsOrXXGLYuC0mhZLtNBD Jodnuc+ywgrWQPr4xZOlC4+GYXrlkYA= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-488-UPigSbFrPNW2UaS0u1sLpw-1; Thu, 22 Jun 2023 15:40:43 -0400 X-MC-Unique: UPigSbFrPNW2UaS0u1sLpw-1 Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-6238c3bf768so95840306d6.0 for ; Thu, 22 Jun 2023 12:40:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687462839; x=1690054839; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DqhwtQo4HweKbF66I7wMIR+srfhZ3FF6k/Qs3cAOKDk=; b=I3Sw4AvI8Oki5kqeDp6B8hOKrmUIulgooZhx2Ui/hIs8yBiuoFQHOf7ocDEPkRIzaQ I7IzisHIYHRXFQEo4HlSPyza7cO2g8P4kK0jkBn0hw5wxt4tfztgdsvTmJ0b0oiItrGG saU467hQbeWUeRHhqTTUZUDD9jva4e7y00vTzWP5JOF6J652gGqgJqWqMv+2x0atjZuY XCUDUan+D6WngFtwuUZHvTFdQsdWwagaRBHX7y8i6kxj7WQPa2B74FSslpsB1x/zITyt MbOQvqNtoe54mS+VEvtVp6Cf0fgQn8qpwSrq4zRvJRqwtcm2P789FP5EFeMCjew8yGeM q25Q== X-Gm-Message-State: AC+VfDzZTJMvWoJ3iFICrov3ihS5JywaBw5m3piYMuQygsunnYOcZCEg 6VjhGQWfmrtKYqTMluKBuxpyaaodiILATO6ZO/WfIAhXxHNYI7T6YcBpFqOuRs3pQ0JWBn4v9MZ jRVvSLEeJpunsT/5uiSHuYJMLMg== X-Received: by 2002:a05:6214:5086:b0:631:f6f1:87dd with SMTP id kk6-20020a056214508600b00631f6f187ddmr9337129qvb.8.1687462839593; Thu, 22 Jun 2023 12:40:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ69TnqqnfQxrmbJrjGYdzCVW52XHc4aK+QXoi41a2M0LmdNJH1EUhWqDLJh8yup8EdWguSn+g== X-Received: by 2002:a05:6214:5086:b0:631:f6f1:87dd with SMTP id kk6-20020a056214508600b00631f6f187ddmr9337105qvb.8.1687462839297; Thu, 22 Jun 2023 12:40:39 -0700 (PDT) Received: from fedora.redhat.com ([107.171.218.122]) by smtp.gmail.com with ESMTPSA id jo30-20020a056214501e00b006301819be40sm4174183qvb.49.2023.06.22.12.40.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jun 2023 12:40:38 -0700 (PDT) From: Adrien Thierry To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I Cc: Adrien Thierry , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org Subject: [PATCH v3 2/3] phy: qcom-snps-femto-v2: add system sleep PM ops Date: Thu, 22 Jun 2023 15:40:19 -0400 Message-Id: <20230622194021.80892-3-athierry@redhat.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230622194021.80892-1-athierry@redhat.com> References: <20230622194021.80892-1-athierry@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The downstream driver [1] implements set_suspend(), which deals with both runtime and system sleep/resume. The upstream driver already has runtime PM ops, so add the system sleep PM ops as well, reusing the same code as the runtime PM ops. [1] https://git.codelinaro.org/clo/la/kernel/msm-5.4/-/blob/LV.AU.1.2.1.r2-05300-gen3meta.0/drivers/usb/phy/phy-msm-snps-hs.c Signed-off-by: Adrien Thierry --- drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c index ce1d2f8b568a..378a5029f61e 100644 --- a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c +++ b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c @@ -179,7 +179,7 @@ static inline void qcom_snps_hsphy_write_mask(void __iomem *base, u32 offset, readl_relaxed(base + offset); } -static int qcom_snps_hsphy_suspend(struct qcom_snps_hsphy *hsphy) +static int qcom_snps_hsphy_do_suspend(struct qcom_snps_hsphy *hsphy) { dev_dbg(&hsphy->phy->dev, "Suspend QCOM SNPS PHY\n"); @@ -199,7 +199,7 @@ static int qcom_snps_hsphy_suspend(struct qcom_snps_hsphy *hsphy) return 0; } -static int qcom_snps_hsphy_resume(struct qcom_snps_hsphy *hsphy) +static int qcom_snps_hsphy_do_resume(struct qcom_snps_hsphy *hsphy) { int ret; @@ -214,25 +214,25 @@ static int qcom_snps_hsphy_resume(struct qcom_snps_hsphy *hsphy) return 0; } -static int __maybe_unused qcom_snps_hsphy_runtime_suspend(struct device *dev) +static int __maybe_unused qcom_snps_hsphy_suspend(struct device *dev) { struct qcom_snps_hsphy *hsphy = dev_get_drvdata(dev); if (!hsphy->phy_initialized) return 0; - qcom_snps_hsphy_suspend(hsphy); + qcom_snps_hsphy_do_suspend(hsphy); return 0; } -static int __maybe_unused qcom_snps_hsphy_runtime_resume(struct device *dev) +static int __maybe_unused qcom_snps_hsphy_resume(struct device *dev) { struct qcom_snps_hsphy *hsphy = dev_get_drvdata(dev); if (!hsphy->phy_initialized) return 0; - qcom_snps_hsphy_resume(hsphy); + qcom_snps_hsphy_do_resume(hsphy); return 0; } @@ -518,8 +518,10 @@ static const struct of_device_id qcom_snps_hsphy_of_match_table[] = { MODULE_DEVICE_TABLE(of, qcom_snps_hsphy_of_match_table); static const struct dev_pm_ops qcom_snps_hsphy_pm_ops = { - SET_RUNTIME_PM_OPS(qcom_snps_hsphy_runtime_suspend, - qcom_snps_hsphy_runtime_resume, NULL) + SET_RUNTIME_PM_OPS(qcom_snps_hsphy_suspend, + qcom_snps_hsphy_resume, NULL) + SET_SYSTEM_SLEEP_PM_OPS(qcom_snps_hsphy_suspend, + qcom_snps_hsphy_resume) }; static void qcom_snps_hsphy_override_param_update_val( From patchwork Thu Jun 22 19:40:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrien Thierry X-Patchwork-Id: 695809 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38F39EB64DA for ; Thu, 22 Jun 2023 19:41:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230287AbjFVTlZ (ORCPT ); Thu, 22 Jun 2023 15:41:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229802AbjFVTlY (ORCPT ); Thu, 22 Jun 2023 15:41:24 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F38711A4 for ; Thu, 22 Jun 2023 12:40:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687462845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MWrDFCHsqN4+5MSAzLCn1UT7GF/+NLROeJoU0j89xKo=; b=bA8OFLJH8+0lMEJj9Vxwwe6fxeNXye3bCU9fg4Cp0HV+Vp7cUmvPArutbBaVslHXgD0+4l a8EcJy+DieB5IfuajukvrzhTuPfHtC6RQRDL+UGIKV3WBVdQ5cQQQPs43qFFyVpup9rX7l x2zQjKqyOsQm0DhEvKZhuicFk6rG7H0= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-124-zElQo2liMQWwGpttbHNYKA-1; Thu, 22 Jun 2023 15:40:42 -0400 X-MC-Unique: zElQo2liMQWwGpttbHNYKA-1 Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-62ffe2b9faaso74790326d6.3 for ; Thu, 22 Jun 2023 12:40:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687462841; x=1690054841; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MWrDFCHsqN4+5MSAzLCn1UT7GF/+NLROeJoU0j89xKo=; b=JROLXjGkJFfAXawbrh7Zy2uIWddscGlYtmruOMEIfbc9gUb5YHwGprKVdAPMc4+GM0 q0CufzpvJT52VWE6a1Kdkj2pdgMQm4Q/82lxehd1a476Gqv8l14LAvyQaAS9sgolfFPI 97Xkz48AdsosEklgKWMgcOAZG95T/ciDnCU32b4GqsirlfQSWvNixkW5JHJTmvy/oyVF Xe0ZFXWYbpBpT6L2KLhRF2xBqDf8s/L+XdA18Zm6bX2W6Ze0bcRj9ak1ETl9qntOJE2d k4LxWGCsXW9/X1h0xmr6xStdqc72u5MMf16TyOYGYEh2G5aZUZ0kQ2rJzpr9wtzgXVF7 dqmg== X-Gm-Message-State: AC+VfDyCYbgPGVy2Kdm8H43yOtzP2l3eGrtvJ4SooKbU5MzfdOkuBtsp 4uN8AF7qiJg7vf14zABy32Lyg5zOqHpoLzhgMVpZrSyUQPxWSWKpYnC/kH5mi+SirAZN58tp1LI xHid72FI4mT0j77l1G3Kpe4B3HA== X-Received: by 2002:ad4:5945:0:b0:625:bb19:278c with SMTP id eo5-20020ad45945000000b00625bb19278cmr21175179qvb.2.1687462841470; Thu, 22 Jun 2023 12:40:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ73yfvqsiPyuOtABnb0j8eIwVwowAAFand2k5OPq2wcWipHS01G81L+H9yJSu96nSUjf8KfOw== X-Received: by 2002:ad4:5945:0:b0:625:bb19:278c with SMTP id eo5-20020ad45945000000b00625bb19278cmr21175163qvb.2.1687462841144; Thu, 22 Jun 2023 12:40:41 -0700 (PDT) Received: from fedora.redhat.com ([107.171.218.122]) by smtp.gmail.com with ESMTPSA id jo30-20020a056214501e00b006301819be40sm4174183qvb.49.2023.06.22.12.40.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jun 2023 12:40:40 -0700 (PDT) From: Adrien Thierry To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I Cc: Adrien Thierry , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org Subject: [PATCH v3 3/3] phy: qcom-snps-femto-v2: use qcom_snps_hsphy_do_suspend/resume error code Date: Thu, 22 Jun 2023 15:40:20 -0400 Message-Id: <20230622194021.80892-4-athierry@redhat.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230622194021.80892-1-athierry@redhat.com> References: <20230622194021.80892-1-athierry@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The return value from qcom_snps_hsphy_do_suspend/resume is not used. Make sure qcom_snps_hsphy_suspend/resume return this value as well. Signed-off-by: Adrien Thierry --- drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c index 378a5029f61e..6be8b5218aaa 100644 --- a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c +++ b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c @@ -221,8 +221,7 @@ static int __maybe_unused qcom_snps_hsphy_suspend(struct device *dev) if (!hsphy->phy_initialized) return 0; - qcom_snps_hsphy_do_suspend(hsphy); - return 0; + return qcom_snps_hsphy_do_suspend(hsphy); } static int __maybe_unused qcom_snps_hsphy_resume(struct device *dev) @@ -232,8 +231,7 @@ static int __maybe_unused qcom_snps_hsphy_resume(struct device *dev) if (!hsphy->phy_initialized) return 0; - qcom_snps_hsphy_do_resume(hsphy); - return 0; + return qcom_snps_hsphy_do_resume(hsphy); } static int qcom_snps_hsphy_set_mode(struct phy *phy, enum phy_mode mode,