From mboxrd@z Thu Jan 1 00:00:00 1970 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 A021DC77B75 for ; Fri, 12 May 2023 09:22:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240033AbjELJWF (ORCPT ); Fri, 12 May 2023 05:22:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239963AbjELJWE (ORCPT ); Fri, 12 May 2023 05:22:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CA87DDA6; Fri, 12 May 2023 02:22:03 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id E5CC365440; Fri, 12 May 2023 09:22:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E743FC433EF; Fri, 12 May 2023 09:22:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683883322; bh=R04Are6haFhQwucOhj2F4qhuwwMNUbEeyjwYPt/f22M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=shRIZB9hp7oiDFvvFrhaDsw6O4deS791uNEke8YVMdPgxCCG6xXZUAChxhB82JK93 8yOdKwvT50V103s1samccfrt0zVl0Jx4vaJS+hyoGvSOf3F34yOPQRAlRrDiZHTHoA Th6Q7xMOYDOLDgTOeZcz6NA1NLyA4uFP+x6x4HzsCxowh63GMRogBg9zx/eo0OaZSQ byqe1ERrbksuMII2dy662LCvCrUUFQjeqeSsDEpBO9rEFSU6ymjOyoMtLvqY8r9spU Cy8OGlthwwI9UOa3Xjuk3XhuJNw0YtkrNAR0mHVa6z6IxASDqEoxYdby3smB1yIqtN ZZc/eNTYnkNxw== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1pxOyq-0002uv-HM; Fri, 12 May 2023 11:22:29 +0200 Date: Fri, 12 May 2023 11:22:28 +0200 From: Johan Hovold To: Bjorn Andersson Cc: Vinod Koul , Kishon Vijay Abraham I , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Armstrong , Abel Vesa , Steev Klimaszewski , Johan Hovold Subject: Re: [PATCH v2 4/8] phy: qcom-qmp-combo: Introduce orientation variable Message-ID: References: <20230510031930.1996020-1-quic_bjorande@quicinc.com> <20230510031930.1996020-5-quic_bjorande@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230510031930.1996020-5-quic_bjorande@quicinc.com> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 > Reviewed-by: Neil Armstrong > Tested-by: Abel Vesa > Tested-by: Steev Klimaszewski > Tested-by: Neil Armstrong # on HDK8450 > Tested-by: Johan Hovold # 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