From: Neil Armstrong <neil.armstrong@linaro.org>
To: Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Neil Armstrong <neil.armstrong@linaro.org>
Subject: [PATCH v2 2/7] phy: qcom: qmp-combo: store DP phy power state
Date: Mon, 27 May 2024 10:42:34 +0200 [thread overview]
Message-ID: <20240527-topic-sm8x50-upstream-phy-combo-typec-mux-v2-2-a03e68d7b8fc@linaro.org> (raw)
In-Reply-To: <20240527-topic-sm8x50-upstream-phy-combo-typec-mux-v2-0-a03e68d7b8fc@linaro.org>
Switching the PHY Mode requires the DisplayPort PHY to be powered off,
keep track of the DisplayPort phy power state.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
index 7f999e8a433d..183cd9cd1884 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
@@ -1512,6 +1512,7 @@ struct qmp_combo {
unsigned int dp_aux_cfg;
struct phy_configure_opts_dp dp_opts;
unsigned int dp_init_count;
+ bool dp_powered_on;
struct clk_fixed_rate pipe_clk_fixed;
struct clk_hw dp_link_hw;
@@ -2685,6 +2686,8 @@ static int qmp_combo_dp_power_on(struct phy *phy)
/* Configure link rate, swing, etc. */
cfg->configure_dp_phy(qmp);
+ qmp->dp_powered_on = true;
+
mutex_unlock(&qmp->phy_mutex);
return 0;
@@ -2699,6 +2702,8 @@ static int qmp_combo_dp_power_off(struct phy *phy)
/* Assert DP PHY power down */
writel(DP_PHY_PD_CTL_PSR_PWRDN, qmp->dp_dp_phy + QSERDES_DP_PHY_PD_CTL);
+ qmp->dp_powered_on = false;
+
mutex_unlock(&qmp->phy_mutex);
return 0;
--
2.34.1
next prev parent reply other threads:[~2024-05-27 8:42 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-27 8:42 [PATCH v2 0/7] arm64: qcom: allow up to 4 lanes for the Type-C DisplayPort Altmode Neil Armstrong
2024-05-27 8:42 ` [PATCH v2 1/7] dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp: Reference usb-switch.yaml to allow mode-switch Neil Armstrong
2024-05-27 18:43 ` Krzysztof Kozlowski
2024-05-27 8:42 ` Neil Armstrong [this message]
2024-05-27 8:59 ` [PATCH v2 2/7] phy: qcom: qmp-combo: store DP phy power state Dmitry Baryshkov
2024-06-06 13:29 ` Neil Armstrong
2024-06-07 7:32 ` Dmitry Baryshkov
2024-05-27 8:42 ` [PATCH v2 3/7] phy: qcom: qmp-combo: introduce QPHY_MODE Neil Armstrong
2024-05-27 8:46 ` Dmitry Baryshkov
2024-05-27 8:48 ` Neil Armstrong
2024-05-27 8:59 ` Dmitry Baryshkov
2025-06-04 11:25 ` Udipto Goswami
2025-06-04 12:31 ` Neil Armstrong
2024-05-27 8:42 ` [PATCH v2 4/7] phy: qcom: qmp-combo: register a typec mux to change the QPHY_MODE Neil Armstrong
2024-05-27 8:57 ` Dmitry Baryshkov
2024-06-06 14:19 ` Neil Armstrong
2024-05-27 8:42 ` [PATCH v2 5/7] arm64: dts: qcom-sm8550: allow 4 lanes for DisplayPort and enable QMP PHY mode-switch Neil Armstrong
2024-05-27 9:03 ` Dmitry Baryshkov
2024-05-27 8:42 ` [PATCH v2 6/7] arm64: dts: qcom-sm8650: " Neil Armstrong
2024-05-27 9:03 ` Dmitry Baryshkov
2024-05-27 8:42 ` [PATCH v2 7/7] arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13: " Neil Armstrong
2024-05-27 9:04 ` Dmitry Baryshkov
2024-05-28 13:48 ` [PATCH v2 0/7] arm64: qcom: allow up to 4 lanes for the Type-C DisplayPort Altmode Bjorn Andersson
2024-05-29 7:55 ` Neil Armstrong
2024-08-16 6:35 ` Luca Weiss
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=20240527-topic-sm8x50-upstream-phy-combo-typec-mux-v2-2-a03e68d7b8fc@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kishon@kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzk+dt@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=robh@kernel.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).