{"id":810499,"url":"http://patchwork.ozlabs.org/api/patches/810499/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-pci/patch/1504694351-32358-1-git-send-email-j-keerthy@ti.com/","project":{"id":28,"url":"http://patchwork.ozlabs.org/api/projects/28/?format=json","name":"Linux PCI development","link_name":"linux-pci","list_id":"linux-pci.vger.kernel.org","list_email":"linux-pci@vger.kernel.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<1504694351-32358-1-git-send-email-j-keerthy@ti.com>","list_archive_url":null,"date":"2017-09-06T10:39:11","name":"pci: dwc: dra7xx: Add shutdown handler to cleanly turn off clocks","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"2313483390a9f21d6e5c1adabd031a05b43c8a8f","submitter":{"id":47064,"url":"http://patchwork.ozlabs.org/api/people/47064/?format=json","name":"Keerthy","email":"j-keerthy@ti.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-pci/patch/1504694351-32358-1-git-send-email-j-keerthy@ti.com/mbox/","series":[{"id":1759,"url":"http://patchwork.ozlabs.org/api/series/1759/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-pci/list/?series=1759","date":"2017-09-06T10:39:11","name":"pci: dwc: dra7xx: Add shutdown handler to cleanly turn off clocks","version":1,"mbox":"http://patchwork.ozlabs.org/series/1759/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/810499/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/810499/checks/","tags":{},"related":[],"headers":{"Return-Path":"<linux-pci-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-pci-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=ti.com header.i=@ti.com header.b=\"vM8rBN4v\";\n\tdkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xnKpn2ftFz9sBd\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed,  6 Sep 2017 20:40:00 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752700AbdIFKj6 (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tWed, 6 Sep 2017 06:39:58 -0400","from fllnx209.ext.ti.com ([198.47.19.16]:56220 \"EHLO\n\tfllnx209.ext.ti.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752508AbdIFKj6 (ORCPT\n\t<rfc822;linux-pci@vger.kernel.org>); Wed, 6 Sep 2017 06:39:58 -0400","from dlelxv90.itg.ti.com ([172.17.2.17])\n\tby fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id v86AdbCa013919; \n\tWed, 6 Sep 2017 05:39:37 -0500","from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26])\n\tby dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id v86AdW9S017207; \n\tWed, 6 Sep 2017 05:39:32 -0500","from DLEE109.ent.ti.com (157.170.170.41) by DLEE115.ent.ti.com\n\t(157.170.170.26) with Microsoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34;\n\tWed, 6 Sep 2017 05:39:31 -0500","from dlep33.itg.ti.com (157.170.170.75) by DLEE109.ent.ti.com\n\t(157.170.170.41) with Microsoft SMTP Server (version=TLS1_0,\n\tcipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend\n\tTransport; Wed, 6 Sep 2017 05:39:31 -0500","from ula0393675.india.ti.com (ileax41-snat.itg.ti.com\n\t[10.172.224.153])\n\tby dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v86AdToF009828;\n\tWed, 6 Sep 2017 05:39:29 -0500"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com;\n\ts=ti-com-17Q1; t=1504694377;\n\tbh=MDMmLZYBijuCNW2SP0ljtek6qJF1YRH6jIygR18v8hE=;\n\th=From:To:CC:Subject:Date;\n\tb=vM8rBN4vpyAvdZmmC1IUX6N2pz42vDEYfClHzd3aht5o1CO2EEFfzG5mZ9yxSWBEh\n\t/IAe9IJgFMXRogUtEcYhbkmk++8sXsHDDiuwaTtefxXkFEo/xCVcSABun5/B0wCK7Q\n\txJELWWAsb7aVtL0npu8B+3WvnB5tu48j9mOIftG0=","From":"Keerthy <j-keerthy@ti.com>","To":"<kishon@ti.com>, <bhelgaas@google.com>","CC":"<t-kristo@ti.com>, <linux-kernel@vger.kernel.org>,\n\t<linux-omap@vger.kernel.org>, <linux-pci@vger.kernel.org>,\n\t<j-keerthy@ti.com>","Subject":"[PATCH] pci: dwc: dra7xx: Add shutdown handler to cleanly turn off\n\tclocks","Date":"Wed, 6 Sep 2017 16:09:11 +0530","Message-ID":"<1504694351-32358-1-git-send-email-j-keerthy@ti.com>","X-Mailer":"git-send-email 1.9.1","MIME-Version":"1.0","Content-Type":"text/plain","X-EXCLAIMER-MD-CONFIG":"e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180","Sender":"linux-pci-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<linux-pci.vger.kernel.org>","X-Mailing-List":"linux-pci@vger.kernel.org"},"content":"Add shutdown handler to cleanly turn off clocks.\n\nSigned-off-by: Keerthy <j-keerthy@ti.com>\n---\n drivers/pci/dwc/pci-dra7xx.c | 14 ++++++++++++++\n 1 file changed, 14 insertions(+)","diff":"diff --git a/drivers/pci/dwc/pci-dra7xx.c b/drivers/pci/dwc/pci-dra7xx.c\nindex d4e98f3..66d1cfe 100644\n--- a/drivers/pci/dwc/pci-dra7xx.c\n+++ b/drivers/pci/dwc/pci-dra7xx.c\n@@ -874,6 +874,19 @@ static int dra7xx_pcie_suspend_noirq(struct device *dev)\n \treturn 0;\n }\n \n+void dra7xx_pcie_shutdown(struct platform_device *pdev)\n+{\n+\tstruct dra7xx_pcie *dra7xx = dev_get_drvdata(&pdev->dev);\n+\tint ret;\n+\n+\tret = pm_runtime_put_sync(&pdev->dev);\n+\tif (ret < 0)\n+\t\tdev_dbg(&pdev->dev, \"pm_runtime_put_sync failed\\n\");\n+\n+\tpm_runtime_disable(&pdev->dev);\n+\tdra7xx_pcie_disable_phy(dra7xx);\n+}\n+\n static int dra7xx_pcie_resume_noirq(struct device *dev)\n {\n \tstruct dra7xx_pcie *dra7xx = dev_get_drvdata(dev);\n@@ -902,5 +915,6 @@ static int dra7xx_pcie_resume_noirq(struct device *dev)\n \t\t.suppress_bind_attrs = true,\n \t\t.pm\t= &dra7xx_pcie_pm_ops,\n \t},\n+\t.shutdown = dra7xx_pcie_shutdown,\n };\n builtin_platform_driver_probe(dra7xx_pcie_driver, dra7xx_pcie_probe);\n","prefixes":[]}