linux-phy.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hovold <johan+linaro@kernel.org>
To: Vinod Koul <vkoul@kernel.org>
Cc: Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@somainline.org>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Johan Hovold <johan+linaro@kernel.org>
Subject: [PATCH 03/16] phy: qcom-qmp-pcie: drop unused runtime PM implementation
Date: Wed,  7 Sep 2022 13:07:15 +0200	[thread overview]
Message-ID: <20220907110728.19092-4-johan+linaro@kernel.org> (raw)
In-Reply-To: <20220907110728.19092-1-johan+linaro@kernel.org>

Drop the unused and incomplete runtime PM implementation, which was
only used by USB PHYs before splitting the QMP driver.

Note that the runtime PM was never disabled (and state restored) on
driver unbind.

This effectively reverts commit ac0d239936bd ("phy: qcom-qmp: Add
support for runtime PM").

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 38 ------------------------
 1 file changed, 38 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
index 2923977b205a..860620972d8a 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
@@ -53,20 +53,6 @@
 #define USB3_MODE				BIT(0) /* enables USB3 mode */
 #define DP_MODE					BIT(1) /* enables DP mode */
 
-/* QPHY_PCS_AUTONOMOUS_MODE_CTRL register bits */
-#define ARCVR_DTCT_EN				BIT(0)
-#define ALFPS_DTCT_EN				BIT(1)
-#define ARCVR_DTCT_EVENT_SEL			BIT(4)
-
-/* QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR register bits */
-#define IRQ_CLEAR				BIT(0)
-
-/* QPHY_PCS_LFPS_RXTERM_IRQ_STATUS register bits */
-#define RCVR_DETECT				BIT(0)
-
-/* QPHY_V3_PCS_MISC_CLAMP_ENABLE register bits */
-#define CLAMP_EN				BIT(0) /* enables i/o clamp_n */
-
 #define PHY_INIT_COMPLETE_TIMEOUT		10000
 #define POWER_DOWN_DELAY_US_MIN			10
 #define POWER_DOWN_DELAY_US_MAX			11
@@ -125,9 +111,6 @@ enum qphy_reg_layout {
 	QPHY_START_CTRL,
 	QPHY_PCS_READY_STATUS,
 	QPHY_PCS_STATUS,
-	QPHY_PCS_AUTONOMOUS_MODE_CTRL,
-	QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR,
-	QPHY_PCS_LFPS_RXTERM_IRQ_STATUS,
 	QPHY_PCS_POWER_DOWN_CONTROL,
 	/* PCS_MISC registers */
 	QPHY_PCS_MISC_TYPEC_CTRL,
@@ -2153,15 +2136,6 @@ static int qmp_pcie_disable(struct phy *phy)
 	return qmp_pcie_exit(phy);
 }
 
-static int qmp_pcie_set_mode(struct phy *phy, enum phy_mode mode, int submode)
-{
-	struct qmp_phy *qphy = phy_get_drvdata(phy);
-
-	qphy->mode = mode;
-
-	return 0;
-}
-
 static int qmp_pcie_vreg_init(struct device *dev, const struct qmp_phy_cfg *cfg)
 {
 	struct qcom_qmp *qmp = dev_get_drvdata(dev);
@@ -2285,7 +2259,6 @@ static int phy_pipe_clk_register(struct qcom_qmp *qmp, struct device_node *np)
 static const struct phy_ops qmp_pcie_ops = {
 	.power_on	= qmp_pcie_enable,
 	.power_off	= qmp_pcie_disable,
-	.set_mode	= qmp_pcie_set_mode,
 	.owner		= THIS_MODULE,
 };
 
@@ -2474,14 +2447,6 @@ static int qmp_pcie_probe(struct platform_device *pdev)
 	if (!qmp->phys)
 		return -ENOMEM;
 
-	pm_runtime_set_active(dev);
-	pm_runtime_enable(dev);
-	/*
-	 * Prevent runtime pm from being ON by default. Users can enable
-	 * it using power/control in sysfs.
-	 */
-	pm_runtime_forbid(dev);
-
 	id = 0;
 	for_each_available_child_of_node(dev->of_node, child) {
 		/* Create per-lane phy */
@@ -2509,13 +2474,10 @@ static int qmp_pcie_probe(struct platform_device *pdev)
 	phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
 	if (!IS_ERR(phy_provider))
 		dev_info(dev, "Registered Qcom-QMP phy\n");
-	else
-		pm_runtime_disable(dev);
 
 	return PTR_ERR_OR_ZERO(phy_provider);
 
 err_node_put:
-	pm_runtime_disable(dev);
 	of_node_put(child);
 	return ret;
 }
-- 
2.35.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

  parent reply	other threads:[~2022-09-07 11:08 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-07 11:07 [PATCH 00/16] phy: qcom-qmp: further clean ups Johan Hovold
2022-09-07 11:07 ` [PATCH 01/16] phy: qcom-qmp-combo: disable runtime PM on unbind Johan Hovold
2022-09-09  9:26   ` Dmitry Baryshkov
2022-09-09 13:22     ` Johan Hovold
2022-09-07 11:07 ` [PATCH 02/16] phy: qcom-qmp-combo: drop unused defines Johan Hovold
2022-09-09  9:21   ` Dmitry Baryshkov
2022-09-09 13:20     ` Johan Hovold
2022-09-09 14:27       ` Dmitry Baryshkov
2022-09-07 11:07 ` Johan Hovold [this message]
2022-09-09  9:36   ` [PATCH 03/16] phy: qcom-qmp-pcie: drop unused runtime PM implementation Dmitry Baryshkov
2022-09-07 11:07 ` [PATCH 04/16] phy: qcom-qmp-pcie: drop unused defines Johan Hovold
2022-09-09  9:37   ` Dmitry Baryshkov
2022-09-07 11:07 ` [PATCH 05/16] phy: qcom-qmp-pcie-msm8996: drop unused runtime PM implementation Johan Hovold
2022-09-09  9:37   ` Dmitry Baryshkov
2022-09-07 11:07 ` [PATCH 06/16] phy: qcom-qmp-pcie-msm8996: drop unused defines Johan Hovold
2022-09-07 11:07 ` [PATCH 07/16] phy: qcom-qmp-ufs: drop unused runtime PM implementation Johan Hovold
2022-09-09  9:38   ` Dmitry Baryshkov
2022-09-07 11:07 ` [PATCH 08/16] phy: qcom-qmp-ufs: drop unused defines Johan Hovold
2022-09-07 11:07 ` [PATCH 09/16] phy: qcom-qmp-usb: disable runtime PM on unbind Johan Hovold
2022-09-09  9:45   ` Dmitry Baryshkov
2022-09-09 13:23     ` Johan Hovold
2022-09-07 11:07 ` [PATCH 10/16] phy: qcom-qmp-usb: drop unused defines Johan Hovold
2022-09-07 11:07 ` [PATCH 11/16] phy: qcom-qmp: silence noisy probe Johan Hovold
2022-09-09  9:46   ` Dmitry Baryshkov
2022-09-07 11:07 ` [PATCH 12/16] phy: qcom-qmp-combo: shorten function prefixes Johan Hovold
2022-09-09  9:46   ` Dmitry Baryshkov
2022-09-07 11:07 ` [PATCH 13/16] phy: qcom-qmp-pcie-msm8996: drop unused secondary init tables Johan Hovold
2022-09-09  9:47   ` Dmitry Baryshkov
2022-09-07 11:07 ` [PATCH 14/16] phy: qcom-qmp-pcie-msm8996: shorten function prefixes Johan Hovold
2022-09-09  9:47   ` Dmitry Baryshkov
2022-09-07 11:07 ` [PATCH 15/16] phy: qcom-qmp-ufs: " Johan Hovold
2022-09-09  9:47   ` Dmitry Baryshkov
2022-09-07 11:07 ` [PATCH 16/16] phy: qcom-qmp-usb: " Johan Hovold
2022-09-09  9:48   ` Dmitry Baryshkov
2022-09-09 13:27     ` Johan Hovold
2022-09-20  5:58 ` [PATCH 00/16] phy: qcom-qmp: further clean ups Vinod Koul

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=20220907110728.19092-4-johan+linaro@kernel.org \
    --to=johan+linaro@kernel.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=kishon@ti.com \
    --cc=konrad.dybcio@somainline.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=vkoul@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).