From patchwork Mon Oct 17 06:50:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13008196 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B63D8C41535 for ; Mon, 17 Oct 2022 06:50:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GgQnI9yeQpNYgN0Ia8TMqRNCFx+ZI22LqShGlL+9xQU=; b=SF8yWjQJR5jNAB vbzYI/zUm6fWxQ5pZeRtjtklpzYsTfr3t9LJr052pQkngiL3inz1Cb4zAzIN0c9z1aNOwTGrbSAQS Lz5rcsiPu23onSrZmdAh9QA7AEO/9l1zxU1cpfSjzkLHPGSBPMOtprP7Rf9ABEwiRDxIjqipA7LCM EDPAyM/lta29w1bLqGxvhpblepUUi+W+E9Ff4LBlJyyXLlX2TKcEs1CQIKJlwPiSRLXwpcF/pNd6a paQXw5LzzcjkwLrqciVmtpWk6evZnbohoL5h77vrg5D2KDzbnOnnA3zVsaRju9M8LCYy2i1fWu0hz B9vdR4N5AC8CuUYOimRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1okJxY-008946-5L; Mon, 17 Oct 2022 06:50:48 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1okJxU-00890n-NY for linux-phy@lists.infradead.org; Mon, 17 Oct 2022 06:50:46 +0000 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 E211760F4F; Mon, 17 Oct 2022 06:50:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB95AC4314B; Mon, 17 Oct 2022 06:50:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665989440; bh=548g71Mb6f3vyWSHRoV49n/vXkaP5EyhH0HdMFKQL0k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BtcTHCoicEPi1nMLshm7i6orRV55cIxtLnmJTdnrRdXSPGmbJjP2SpvGW7j73i2KM o/UsePjZheo3wKi8HbjdUar9uOBguU+WWIla/lGcaW5jIZTN8XlmHp4RZ+T/AexEGS FH4kD4q/PqBCCzT6wPyqezEWv6kJ1Z5TMXYAOs85YVO2mOoqmctYowGAgIXTQMyZuw kdzz0Uos3wUHbhMosVIFcSqhAFqSGnHgJG5gf+TT+NQJJVU09S9131EYkPc8m5Eo+T B7F4ffZk2K2u+tlIZR5TjA2+hl9U6SW6fOdNNQyVhlBPTo1VAcLh8srOxUZCNTQdyK NAqfATIQ9ygMQ== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1okJxG-00057i-LX; Mon, 17 Oct 2022 08:50:30 +0200 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Dmitry Baryshkov , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v3 06/11] phy: qcom-qmp-pcie-msm8996: clean up power-down handling Date: Mon, 17 Oct 2022 08:50:08 +0200 Message-Id: <20221017065013.19647-7-johan+linaro@kernel.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221017065013.19647-1-johan+linaro@kernel.org> References: <20221017065013.19647-1-johan+linaro@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221016_235044_859194_55E477DA X-CRM114-Status: GOOD ( 11.29 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org This driver uses v2 registers only so drop the unnecessary POWER_DOWN_CONTROL override. Note that this register is already hard-coded when powering on the PHY. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold --- drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c index 707ec81c7a2a..5fdd85a1dc3e 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c @@ -91,7 +91,6 @@ enum qphy_reg_layout { QPHY_SW_RESET, QPHY_START_CTRL, QPHY_PCS_STATUS, - QPHY_PCS_POWER_DOWN_CONTROL, /* Keep last to ensure regs_layout arrays are properly initialized */ QPHY_LAYOUT_SIZE }; @@ -591,13 +590,8 @@ static int qmp_pcie_msm8996_power_off(struct phy *phy) qphy_clrbits(qphy->pcs, cfg->regs[QPHY_START_CTRL], cfg->start_ctrl); /* Put PHY into POWER DOWN state: active low */ - if (cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL]) { - qphy_clrbits(qphy->pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], - cfg->pwrdn_ctrl); - } else { - qphy_clrbits(qphy->pcs, QPHY_V2_PCS_POWER_DOWN_CONTROL, - cfg->pwrdn_ctrl); - } + qphy_clrbits(qphy->pcs, QPHY_V2_PCS_POWER_DOWN_CONTROL, + cfg->pwrdn_ctrl); return 0; }