From patchwork Thu Oct 21 10:45:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12574675 X-Patchwork-Delegate: lorenzo.pieralisi@arm.com 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51AD1C433EF for ; Thu, 21 Oct 2021 10:45:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 288856128B for ; Thu, 21 Oct 2021 10:45:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230467AbhJUKru (ORCPT ); Thu, 21 Oct 2021 06:47:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:57776 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230376AbhJUKrt (ORCPT ); Thu, 21 Oct 2021 06:47:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D2B2460F9E; Thu, 21 Oct 2021 10:45:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634813133; bh=1MK9BXA7JWARnl0O9y6KyH5YzDwUZkQB6sHYmBqTrdA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u7GLPKmUv3zdswlYOSlvmYa40RNIcOtr84teq9XxEE53NzvQf2HIipaM5mhYHqYpM Eh/i9uEuFKaCMqx+1/M8gstuWRX3yry5ho4pTubUNB3TvkB+RQocFMHloYsco0kE3J RJ9+f51wJWL0UXXwQ7L/OIg13bwwr7m1fGw8LU1kIM+hNPZ7EOUXUnA3KI9ncIh3zn G6EUtOhCUGH/HQBKRhlyN36T3rQvEy7MWFVYrvQJwQCOdpKh0vcmPWU8sMuKeN0R8C vLydU4uumpcjm93bi/ZZvjug/utCRYr26L/ApnIG9mPGLTIgClEUk1xpFSVE+TNDV8 nbI3C4yK9iacQ== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mdVZj-002z5K-6h; Thu, 21 Oct 2021 11:45:31 +0100 From: Mauro Carvalho Chehab To: Lorenzo Pieralisi Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , =?utf-8?q?Krzysztof_Wilc?= =?utf-8?q?zy=C5=84ski?= , Binghui Wang , Bjorn Helgaas , Rob Herring , Xiaowei Song , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH v15 11/13] PCI: kirin: Disable clkreq during poweroff sequence Date: Thu, 21 Oct 2021 11:45:18 +0100 Message-Id: X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org The logic at kirin_pcie_gpio_request() enables some clkreq GPIO lines. Disable them during power-off. Acked-by: Xiaowei Song Signed-off-by: Mauro Carvalho Chehab --- To mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH v15 00/13] at: https://lore.kernel.org/all/cover.1634812676.git.mchehab+huawei@kernel.org/ drivers/pci/controller/dwc/pcie-kirin.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pci/controller/dwc/pcie-kirin.c b/drivers/pci/controller/dwc/pcie-kirin.c index f4ea27b37968..4c3fa02b7108 100644 --- a/drivers/pci/controller/dwc/pcie-kirin.c +++ b/drivers/pci/controller/dwc/pcie-kirin.c @@ -687,6 +687,9 @@ static int kirin_pcie_power_off(struct kirin_pcie *kirin_pcie) if (kirin_pcie->type == PCIE_KIRIN_INTERNAL_PHY) return hi3660_pcie_phy_power_off(kirin_pcie); + for (i = 0; i < kirin_pcie->n_gpio_clkreq; i++) + gpio_direction_output(kirin_pcie->gpio_id_clkreq[i], 1); + phy_power_off(kirin_pcie->phy); phy_exit(kirin_pcie->phy);