From: Johan Hovold <johan@kernel.org>
To: Bjorn Andersson <quic_bjorande@quicinc.com>
Cc: Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
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>,
Abel Vesa <abel.vesa@linaro.org>,
Steev Klimaszewski <steev@kali.org>,
Johan Hovold <johan+linaro@kernel.org>
Subject: Re: [PATCH v2 4/8] phy: qcom-qmp-combo: Introduce orientation variable
Date: Fri, 12 May 2023 11:22:28 +0200 [thread overview]
Message-ID: <ZF4FVBcnWlvKF_DP@hovoldconsulting.com> (raw)
In-Reply-To: <20230510031930.1996020-5-quic_bjorande@quicinc.com>
On Tue, May 09, 2023 at 08:19:26PM -0700, Bjorn Andersson wrote:
> In multiple places throughout the driver code has been written in
> prepration for handling of orientation switching.
>
> Introduce a typec_orientation in qmp_combo and fill out the various
> "placeholders" with the associated logic. By initializing the
> orientation to "normal" this change has no functional impact, but
> reduces the size of the upcoming introduction of dynamic orientation
> switching.
>
> Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
> Tested-by: Abel Vesa <abel.vesa@linaro.org>
> Tested-by: Steev Klimaszewski <steev@kali.org>
> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on HDK8450
> Tested-by: Johan Hovold <johan+linaro@kernel.org> # X13s
> ---
>
> Changes since v1:
> - X-mas in qmp_combo_configure_dp_mode()
>
> drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 54 +++++++++++++----------
> 1 file changed, 30 insertions(+), 24 deletions(-)
> static bool qmp_combo_configure_dp_mode(struct qmp_combo *qmp)
> {
> + bool reverse = qmp->orientation == TYPEC_ORIENTATION_REVERSE;
Nit: I still think parentheses around the right-hand side would improve
readability.
> + const struct phy_configure_opts_dp *dp_opts = &qmp->dp_opts;
> u32 val;
> - bool reverse = false;
> @@ -2235,7 +2236,7 @@ static int qmp_v4_configure_dp_phy(struct qmp_combo *qmp)
> {
> const struct phy_configure_opts_dp *dp_opts = &qmp->dp_opts;
> u32 bias0_en, drvr0_en, bias1_en, drvr1_en;
> - bool reverse = false;
> + bool reverse = qmp->orientation == TYPEC_ORIENTATION_REVERSE;
Same here and below.
And maintaining reverse xmas style throughout the driver would be nice
for consistency too.
> u32 status;
> int ret;
Looks good otherwise:
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Johan
WARNING: multiple messages have this Message-ID (diff)
From: Johan Hovold <johan@kernel.org>
To: Bjorn Andersson <quic_bjorande@quicinc.com>
Cc: Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
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>,
Abel Vesa <abel.vesa@linaro.org>,
Steev Klimaszewski <steev@kali.org>,
Johan Hovold <johan+linaro@kernel.org>
Subject: Re: [PATCH v2 4/8] phy: qcom-qmp-combo: Introduce orientation variable
Date: Fri, 12 May 2023 11:22:28 +0200 [thread overview]
Message-ID: <ZF4FVBcnWlvKF_DP@hovoldconsulting.com> (raw)
In-Reply-To: <20230510031930.1996020-5-quic_bjorande@quicinc.com>
On Tue, May 09, 2023 at 08:19:26PM -0700, Bjorn Andersson wrote:
> In multiple places throughout the driver code has been written in
> prepration for handling of orientation switching.
>
> Introduce a typec_orientation in qmp_combo and fill out the various
> "placeholders" with the associated logic. By initializing the
> orientation to "normal" this change has no functional impact, but
> reduces the size of the upcoming introduction of dynamic orientation
> switching.
>
> Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
> Tested-by: Abel Vesa <abel.vesa@linaro.org>
> Tested-by: Steev Klimaszewski <steev@kali.org>
> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on HDK8450
> Tested-by: Johan Hovold <johan+linaro@kernel.org> # X13s
> ---
>
> Changes since v1:
> - X-mas in qmp_combo_configure_dp_mode()
>
> drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 54 +++++++++++++----------
> 1 file changed, 30 insertions(+), 24 deletions(-)
> static bool qmp_combo_configure_dp_mode(struct qmp_combo *qmp)
> {
> + bool reverse = qmp->orientation == TYPEC_ORIENTATION_REVERSE;
Nit: I still think parentheses around the right-hand side would improve
readability.
> + const struct phy_configure_opts_dp *dp_opts = &qmp->dp_opts;
> u32 val;
> - bool reverse = false;
> @@ -2235,7 +2236,7 @@ static int qmp_v4_configure_dp_phy(struct qmp_combo *qmp)
> {
> const struct phy_configure_opts_dp *dp_opts = &qmp->dp_opts;
> u32 bias0_en, drvr0_en, bias1_en, drvr1_en;
> - bool reverse = false;
> + bool reverse = qmp->orientation == TYPEC_ORIENTATION_REVERSE;
Same here and below.
And maintaining reverse xmas style throughout the driver would be nice
for consistency too.
> u32 status;
> int ret;
Looks good otherwise:
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Johan
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2023-05-12 9:22 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-10 3:19 [PATCH v2 0/8] phy: qcom-qmp-combo: Support orientation switching Bjorn Andersson
2023-05-10 3:19 ` Bjorn Andersson
2023-05-10 3:19 ` [PATCH v2 1/8] dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp: Add ports and orientation-switch Bjorn Andersson
2023-05-10 3:19 ` Bjorn Andersson
2023-05-10 7:55 ` Krzysztof Kozlowski
2023-05-10 7:55 ` Krzysztof Kozlowski
2023-05-10 3:19 ` [PATCH v2 2/8] phy: qcom-qmp-combo: Move phy_mutex out of com_init/exit Bjorn Andersson
2023-05-10 3:19 ` Bjorn Andersson
2023-05-10 3:19 ` [PATCH v2 3/8] phy: qcom-qmp-combo: Extend phy_mutex to all phy_ops Bjorn Andersson
2023-05-10 3:19 ` Bjorn Andersson
2023-05-12 9:10 ` Johan Hovold
2023-05-12 9:10 ` Johan Hovold
2023-05-10 3:19 ` [PATCH v2 4/8] phy: qcom-qmp-combo: Introduce orientation variable Bjorn Andersson
2023-05-10 3:19 ` Bjorn Andersson
2023-05-12 9:22 ` Johan Hovold [this message]
2023-05-12 9:22 ` Johan Hovold
2023-05-10 3:19 ` [PATCH v2 5/8] phy: qcom-qmp-combo: Introduce orientation switching Bjorn Andersson
2023-05-10 3:19 ` Bjorn Andersson
2023-05-10 3:19 ` [PATCH v2 6/8] phy: qcom-qmp-combo: Introduce drm_bridge Bjorn Andersson
2023-05-10 3:19 ` Bjorn Andersson
2023-05-12 9:37 ` Johan Hovold
2023-05-12 9:37 ` Johan Hovold
2023-05-10 3:19 ` [PATCH v2 7/8] arm64: dts: qcom: sc8280xp-crd: Add QMP to SuperSpeed graph Bjorn Andersson
2023-05-10 3:19 ` Bjorn Andersson
2023-05-12 9:41 ` Johan Hovold
2023-05-12 9:41 ` Johan Hovold
2023-05-10 3:19 ` [PATCH v2 8/8] arm64: dts: qcom: sc8280xp-x13s: " Bjorn Andersson
2023-05-10 3:19 ` Bjorn Andersson
2023-05-12 9:42 ` Johan Hovold
2023-05-12 9:42 ` Johan Hovold
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=ZF4FVBcnWlvKF_DP@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=abel.vesa@linaro.org \
--cc=andersson@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=johan+linaro@kernel.org \
--cc=kishon@kernel.org \
--cc=konrad.dybcio@linaro.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=neil.armstrong@linaro.org \
--cc=quic_bjorande@quicinc.com \
--cc=robh+dt@kernel.org \
--cc=steev@kali.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.