[{"id":1766636,"web_url":"http://patchwork.ozlabs.org/comment/1766636/","msgid":"<d0302595-dc63-5274-335d-cf5445cab4e0@rock-chips.com>","list_archive_url":null,"date":"2017-09-12T00:39:37","subject":"Re: [PATCH v5 1/3] PCI: rockchip: Add support for pcie wake irq","submitter":{"id":66993,"url":"http://patchwork.ozlabs.org/api/people/66993/","name":"Shawn Lin","email":"shawn.lin@rock-chips.com"},"content":"On 2017/9/11 23:10, Jeffy Chen wrote:\n> Add support for PCIE_WAKE pin in rockchip pcie driver.\n> \n> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>\n> ---\n> \n\nLGTM,\n\nAcked-by: Shawn Lin <shawn.lin@rock-chips.com>\n\n> Changes in v5:\n> Rebase\n> \n> Changes in v3:\n> Fix error handling\n> \n> Changes in v2:\n> Use dev_pm_set_dedicated_wake_irq\n>          -- Suggested by Brian Norris <briannorris@chromium.com>\n> \n>   drivers/pci/host/pcie-rockchip.c | 19 +++++++++++++++++--\n>   1 file changed, 17 insertions(+), 2 deletions(-)\n> \n> diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c\n> index 9051c6c8fea4..a8b7272597a7 100644\n> --- a/drivers/pci/host/pcie-rockchip.c\n> +++ b/drivers/pci/host/pcie-rockchip.c\n> @@ -37,6 +37,7 @@\n>   #include <linux/pci_ids.h>\n>   #include <linux/phy/phy.h>\n>   #include <linux/platform_device.h>\n> +#include <linux/pm_wakeirq.h>\n>   #include <linux/reset.h>\n>   #include <linux/regmap.h>\n>   \n> @@ -995,6 +996,15 @@ static int rockchip_pcie_setup_irq(struct rockchip_pcie *rockchip)\n>   \t\treturn err;\n>   \t}\n>   \n> +\t/* Must init wakeup before setting dedicated wakeup irq. */\n> +\tdevice_init_wakeup(dev, true);\n> +\tirq = platform_get_irq_byname(pdev, \"wakeup\");\n> +\tif (irq >= 0) {\n> +\t\terr = dev_pm_set_dedicated_wake_irq(dev, irq);\n> +\t\tif (err)\n> +\t\t\tdev_err(dev, \"failed to setup PCIe wakeup IRQ\\n\");\n> +\t}\n> +\n>   \treturn 0;\n>   }\n>   \n> @@ -1542,11 +1552,11 @@ static int rockchip_pcie_probe(struct platform_device *pdev)\n>   \n>   \terr = rockchip_pcie_parse_dt(rockchip);\n>   \tif (err)\n> -\t\treturn err;\n> +\t\tgoto err_disable_wake;\n>   \n>   \terr = rockchip_pcie_enable_clocks(rockchip);\n>   \tif (err)\n> -\t\treturn err;\n> +\t\tgoto err_disable_wake;\n>   \n>   \terr = rockchip_pcie_set_vpcie(rockchip);\n>   \tif (err) {\n> @@ -1656,6 +1666,9 @@ static int rockchip_pcie_probe(struct platform_device *pdev)\n>   \t\tregulator_disable(rockchip->vpcie0v9);\n>   err_set_vpcie:\n>   \trockchip_pcie_disable_clocks(rockchip);\n> +err_disable_wake:\n> +\tdev_pm_clear_wake_irq(dev);\n> +\tdevice_init_wakeup(dev, false);\n>   \treturn err;\n>   }\n>   \n> @@ -1682,6 +1695,8 @@ static int rockchip_pcie_remove(struct platform_device *pdev)\n>   \tif (!IS_ERR(rockchip->vpcie0v9))\n>   \t\tregulator_disable(rockchip->vpcie0v9);\n>   \n> +\tdev_pm_clear_wake_irq(dev);\n> +\tdevice_init_wakeup(dev, false);\n>   \treturn 0;\n>   }\n>   \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"doBbJaLR\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xrmDH4wH3z9s7B\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue, 12 Sep 2017 10:40:29 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1drZFY-0002hL-PH; Tue, 12 Sep 2017 00:40:24 +0000","from lucky1.263xmail.com ([211.157.147.135])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1drZFT-0001Pp-Cj; Tue, 12 Sep 2017 00:40:22 +0000","from shawn.lin?rock-chips.com (unknown [192.168.165.103])\n\tby lucky1.263xmail.com (Postfix) with ESMTP id 2D5AC935;\n\tTue, 12 Sep 2017 08:39:47 +0800 (CST)","from [172.16.12.30] (localhost [127.0.0.1])\n\tby smtp.263.net (Postfix) with ESMTPA id C3905416;\n\tTue, 12 Sep 2017 08:39:40 +0800 (CST)","from [172.16.12.30] (unknown [58.22.7.114])\n\tby smtp.263.net (Postfix) whith ESMTP id 10175564WUO;\n\tTue, 12 Sep 2017 08:39:45 +0800 (CST)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:\n\tContent-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive:\n\tList-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From:\n\tReferences:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=TpwQSRlhmk/v8ELv7xgcaUq5Z/CmclqJwnDv0OgFTJU=;\n\tb=doBbJaLRbyE/ZPrAcPzMnsA4n\n\t/o0PydxkE/Nzxgkp5NKxnkKIn0214I6Cfk33lLssNMAT17UHRvLw4yCEShxDUilTHMEkCR1ll6Ny+\n\tyAYOHaxwNkOYXHyjOkwZNE2L7emHGOb137QzOeQOmBRX14++qJvpt+ZLq06jmH7aHd90SVZqgmnF7\n\tPp5XiwcAlVV9up75z1Ur4P+PQFPCbnD/fWDg/Q2nJwrPsgycl3YvOk/haEOT5pJjn6m+WsvQgHljD\n\thiHeyHqbM7ar3csBsSazjtgidPdCLmJXDS5Avtg+fNQ+rh6zThUlsTkUpRVyM/EKmrk+2UrXaftIv\n\tuMFfJSVXw==;","X-263anti-spam":"KSV:0;","X-MAIL-GRAY":"1","X-MAIL-DELIVERY":"0","X-KSVirus-check":"0","X-ABS-CHECKED":"4","X-RL-SENDER":"shawn.lin@rock-chips.com","X-FST-TO":"linux-arm-kernel@lists.infradead.org","X-SENDER-IP":"58.22.7.114","X-LOGIN-NAME":"shawn.lin@rock-chips.com","X-UNIQUE-TAG":"<3778e790a4ef349e1fb1ed3ebda32a26>","X-ATTACHMENT-NUM":"0","X-SENDER":"lintao@rock-chips.com","X-DNS-TYPE":"0","Subject":"Re: [PATCH v5 1/3] PCI: rockchip: Add support for pcie wake irq","To":"Jeffy Chen <jeffy.chen@rock-chips.com>","References":"<20170911151029.25185-1-jeffy.chen@rock-chips.com>\n\t<20170911151029.25185-2-jeffy.chen@rock-chips.com>","From":"Shawn Lin <shawn.lin@rock-chips.com>","Message-ID":"<d0302595-dc63-5274-335d-cf5445cab4e0@rock-chips.com>","Date":"Tue, 12 Sep 2017 08:39:37 +0800","User-Agent":"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170911151029.25185-2-jeffy.chen@rock-chips.com>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170911_174019_787348_068C00A6 ","X-CRM114-Status":"UNSURE (   9.89  )","X-CRM114-Notice":"Please train this message.","X-Spam-Score":"-0.4 (/)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-0.4 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server\n\t[58.22.7.114 listed in dnsbl.sorbs.net]\n\t0.0 RCVD_IN_MSPIKE_L4      RBL: Bad reputation (-4)\n\t[211.157.147.135 listed in bl.mailspike.net]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000] 0.0 RCVD_IN_MSPIKE_BL      Mailspike blacklisted","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Heiko Stuebner <heiko@sntech.de>, linux-pci@vger.kernel.org,\n\tshawn.lin@rock-chips.com, briannorris@chromium.org,\n\tdianders@chromium.org, \n\tlinux-rockchip@lists.infradead.org, bhelgaas@google.com,\n\tlinux-arm-kernel@lists.infradead.org","Content-Transfer-Encoding":"7bit","Content-Type":"text/plain; charset=\"us-ascii\"; Format=\"flowed\"","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1766639,"web_url":"http://patchwork.ozlabs.org/comment/1766639/","msgid":"<fb363e50-6a88-c546-2ae9-4abb28a931f0@rock-chips.com>","list_archive_url":null,"date":"2017-09-12T00:40:36","subject":"Re: [PATCH v5 3/3] arm64: dts: rockchip: Handle pcie wake in pcie\n\tdriver for Gru","submitter":{"id":66993,"url":"http://patchwork.ozlabs.org/api/people/66993/","name":"Shawn Lin","email":"shawn.lin@rock-chips.com"},"content":"On 2017/9/11 23:10, Jeffy Chen wrote:\n> Currently we are handling pcie wake irq in mrvl wifi driver.\n> Move it to rockchip pcie driver for Gru boards.\n> \n> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>\n> ---\n> \n\nReviewed-by: Shawn Lin <shawn.lin@rock-chips.com>\n\n> Changes in v5:\n> Use \"wakeup\" instead of \"wake\"\n> \n> Changes in v3: None\n> Changes in v2: None\n> \n>   arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 15 +++++++++------\n>   1 file changed, 9 insertions(+), 6 deletions(-)\n> \n> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi\n> index 199a5118b20d..9e0269a13ced 100644\n> --- a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi\n> +++ b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi\n> @@ -707,7 +707,15 @@ ap_i2c_audio: &i2c8 {\n>   \n>   \tep-gpios = <&gpio2 27 GPIO_ACTIVE_HIGH>;\n>   \tpinctrl-names = \"default\";\n> -\tpinctrl-0 = <&pcie_clkreqn_cpm>, <&wifi_perst_l>;\n> +\tpinctrl-0 = <&pcie_clkreqn_cpm>, <&wlan_host_wake_l>, <&wifi_perst_l>;\n> +\n> +\tinterrupts-extended = <&gic GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH 0>,\n> +\t\t\t      <&gic GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH 0>,\n> +\t\t\t      <&gic GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH 0>,\n> +\t\t\t      <&gpio0 8 IRQ_TYPE_LEVEL_LOW>;\n> +\tinterrupt-names = \"sys\", \"legacy\", \"client\", \"wakeup\";\n> +\t/delete-property/ interrupts;\n> +\n>   \tvpcie3v3-supply = <&pp3300_wifi_bt>;\n>   \tvpcie1v8-supply = <&wlan_pd_n>; /* HACK: see &wlan_pd_n */\n>   \tvpcie0v9-supply = <&pp900_pcie>;\n> @@ -722,11 +730,6 @@ ap_i2c_audio: &i2c8 {\n>   \t\t\tcompatible = \"pci1b4b,2b42\";\n>   \t\t\treg = <0x83010000 0x0 0x00000000 0x0 0x00100000\n>   \t\t\t       0x83010000 0x0 0x00100000 0x0 0x00100000>;\n> -\t\t\tinterrupt-parent = <&gpio0>;\n> -\t\t\tinterrupts = <8 IRQ_TYPE_LEVEL_LOW>;\n> -\t\t\tpinctrl-names = \"default\";\n> -\t\t\tpinctrl-0 = <&wlan_host_wake_l>;\n> -\t\t\twakeup-source;\n>   \t\t};\n>   \t};\n>   };\n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"bzxqLZmY\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xrmFb6PpPz9s7B\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue, 12 Sep 2017 10:41:39 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1drZGg-0003Qi-0z; Tue, 12 Sep 2017 00:41:34 +0000","from lucky1.263xmail.com ([211.157.147.131])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1drZGR-0002xY-23; Tue, 12 Sep 2017 00:41:30 +0000","from shawn.lin?rock-chips.com (unknown [192.168.165.105])\n\tby lucky1.263xmail.com (Postfix) with ESMTP id 825338F866;\n\tTue, 12 Sep 2017 08:40:54 +0800 (CST)","from [172.16.12.30] (localhost [127.0.0.1])\n\tby smtp.263.net (Postfix) with ESMTPA id 73E5342D;\n\tTue, 12 Sep 2017 08:40:37 +0800 (CST)","from [172.16.12.30] (unknown [58.22.7.114])\n\tby smtp.263.net (Postfix) whith ESMTP id 27886MFYZFG;\n\tTue, 12 Sep 2017 08:40:53 +0800 (CST)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:\n\tContent-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive:\n\tList-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From:\n\tReferences:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=cnzlHffLtI4Kwa5rVUttcmIKN5mS2wWr1MySgN1Vr40=;\n\tb=bzxqLZmYyjP7VI0c7zxqKCAkZ\n\t4KRkegaHbUd7b/MCrwsUwLmcQ9fqAmloAdqKkxwadkIXIfrSVfEZdEeWjLfiZC5B4qB5tNLlyoKKq\n\tW+E+u/FarG7czY846FMub16wt2/5UhrQrHVdui0/t0fSCvgNh/HeGe/+MslNQs6rX8E9LUhS5PBhu\n\t1/MyYXcgj01Tk8M5k9B/Ka0T1danL32YHiGkUzOY0nfsy4q1rFPi0u7ab4xvHrW8ME6d4+Xz8pmJn\n\tPGiIJU/boUrlyJ+/9H/LjDS+VIuukx2cs3Mh4BxFmz1ubnKa6dtOr9l3ie/CJNi3iKpJKtBhX/uVQ\n\tPiY7aZjog==;","X-263anti-spam":"KSV:0;","X-MAIL-GRAY":"1","X-MAIL-DELIVERY":"0","X-KSVirus-check":"0","X-ABS-CHECKED":"4","X-RL-SENDER":"shawn.lin@rock-chips.com","X-FST-TO":"catalin.marinas@arm.com","X-SENDER-IP":"58.22.7.114","X-LOGIN-NAME":"shawn.lin@rock-chips.com","X-UNIQUE-TAG":"<de89fe782bea87944e93a5001ca43606>","X-ATTACHMENT-NUM":"0","X-SENDER":"lintao@rock-chips.com","X-DNS-TYPE":"0","Subject":"Re: [PATCH v5 3/3] arm64: dts: rockchip: Handle pcie wake in pcie\n\tdriver for Gru","To":"Jeffy Chen <jeffy.chen@rock-chips.com>","References":"<20170911151029.25185-1-jeffy.chen@rock-chips.com>\n\t<20170911151029.25185-4-jeffy.chen@rock-chips.com>","From":"Shawn Lin <shawn.lin@rock-chips.com>","Message-ID":"<fb363e50-6a88-c546-2ae9-4abb28a931f0@rock-chips.com>","Date":"Tue, 12 Sep 2017 08:40:36 +0800","User-Agent":"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170911151029.25185-4-jeffy.chen@rock-chips.com>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170911_174119_734355_BDAB99BB ","X-CRM114-Status":"UNSURE (   8.20  )","X-CRM114-Notice":"Please train this message.","X-Spam-Score":"2.3 (++)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (2.3 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server\n\t[58.22.7.114 listed in dnsbl.sorbs.net]\n\t2.7 RCVD_IN_PSBL           RBL: Received via a relay in PSBL\n\t[211.157.147.131 listed in psbl.surriel.com]\n\t0.0 RCVD_IN_MSPIKE_L4      RBL: Bad reputation (-4)\n\t[211.157.147.131 listed in bl.mailspike.net]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000] 0.0 RCVD_IN_MSPIKE_BL      Mailspike blacklisted","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, devicetree@vger.kernel.org,\n\tHeiko Stuebner <heiko@sntech.de>,\n\tCatalin Marinas <catalin.marinas@arm.com>, \n\tshawn.lin@rock-chips.com, briannorris@chromium.org,\n\tWill Deacon <will.deacon@arm.com>, dianders@chromium.org,\n\tRob Herring <robh+dt@kernel.org>, linux-rockchip@lists.infradead.org, \n\tMatthias Kaehlcke <mka@chromium.org>,\n\tKlaus Goger <klaus.goger@theobroma-systems.com>, bhelgaas@google.com, \n\tlinux-arm-kernel@lists.infradead.org","Content-Transfer-Encoding":"7bit","Content-Type":"text/plain; charset=\"us-ascii\"; Format=\"flowed\"","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1785961,"web_url":"http://patchwork.ozlabs.org/comment/1785961/","msgid":"<20171013015620.GA94568@google.com>","list_archive_url":null,"date":"2017-10-13T01:56:22","subject":"Re: [PATCH v5 1/3] PCI: rockchip: Add support for pcie wake irq","submitter":{"id":67074,"url":"http://patchwork.ozlabs.org/api/people/67074/","name":"Brian Norris","email":"briannorris@chromium.org"},"content":"Hi,\n\nOn Mon, Sep 11, 2017 at 11:10:27PM +0800, Jeffy Chen wrote:\n> Add support for PCIE_WAKE pin in rockchip pcie driver.\n> \n> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>\n> ---\n> \n> Changes in v5:\n> Rebase\n> \n> Changes in v3:\n> Fix error handling\n> \n> Changes in v2:\n> Use dev_pm_set_dedicated_wake_irq\n>         -- Suggested by Brian Norris <briannorris@chromium.com>\n> \n>  drivers/pci/host/pcie-rockchip.c | 19 +++++++++++++++++--\n>  1 file changed, 17 insertions(+), 2 deletions(-)\n> \n> diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c\n> index 9051c6c8fea4..a8b7272597a7 100644\n> --- a/drivers/pci/host/pcie-rockchip.c\n> +++ b/drivers/pci/host/pcie-rockchip.c\n> @@ -37,6 +37,7 @@\n>  #include <linux/pci_ids.h>\n>  #include <linux/phy/phy.h>\n>  #include <linux/platform_device.h>\n> +#include <linux/pm_wakeirq.h>\n>  #include <linux/reset.h>\n>  #include <linux/regmap.h>\n>  \n> @@ -995,6 +996,15 @@ static int rockchip_pcie_setup_irq(struct rockchip_pcie *rockchip)\n>  \t\treturn err;\n>  \t}\n>  \n> +\t/* Must init wakeup before setting dedicated wakeup irq. */\n> +\tdevice_init_wakeup(dev, true);\n\nAm I crazy, or should this go inside the 'irq >= 0' conditional?\nOtherwise, for the whole series:\n\nReviewed-by: Brian Norris <briannorris@chromium.org>\nTested-by: Brian Norris <briannorris@chromium.org>\n\nBjorn, were you planning to pick this up?\n\nAlso, the DT binding change conflicts (just simple context) with the\nPERST# series I just sent out. Would be good if we could land one or\nboth :)\n\nThanks,\nBrian\n\n> +\tirq = platform_get_irq_byname(pdev, \"wakeup\");\n> +\tif (irq >= 0) {\n> +\t\terr = dev_pm_set_dedicated_wake_irq(dev, irq);\n> +\t\tif (err)\n> +\t\t\tdev_err(dev, \"failed to setup PCIe wakeup IRQ\\n\");\n> +\t}\n> +\n>  \treturn 0;\n>  }\n>  \n> @@ -1542,11 +1552,11 @@ static int rockchip_pcie_probe(struct platform_device *pdev)\n>  \n>  \terr = rockchip_pcie_parse_dt(rockchip);\n>  \tif (err)\n> -\t\treturn err;\n> +\t\tgoto err_disable_wake;\n>  \n>  \terr = rockchip_pcie_enable_clocks(rockchip);\n>  \tif (err)\n> -\t\treturn err;\n> +\t\tgoto err_disable_wake;\n>  \n>  \terr = rockchip_pcie_set_vpcie(rockchip);\n>  \tif (err) {\n> @@ -1656,6 +1666,9 @@ static int rockchip_pcie_probe(struct platform_device *pdev)\n>  \t\tregulator_disable(rockchip->vpcie0v9);\n>  err_set_vpcie:\n>  \trockchip_pcie_disable_clocks(rockchip);\n> +err_disable_wake:\n> +\tdev_pm_clear_wake_irq(dev);\n> +\tdevice_init_wakeup(dev, false);\n>  \treturn err;\n>  }\n>  \n> @@ -1682,6 +1695,8 @@ static int rockchip_pcie_remove(struct platform_device *pdev)\n>  \tif (!IS_ERR(rockchip->vpcie0v9))\n>  \t\tregulator_disable(rockchip->vpcie0v9);\n>  \n> +\tdev_pm_clear_wake_irq(dev);\n> +\tdevice_init_wakeup(dev, false);\n>  \treturn 0;\n>  }\n>  \n> -- \n> 2.11.0\n> \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"powNGXHC\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"UixMF9Jp\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yCrSG32vtz9sNr\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tFri, 13 Oct 2017 12:56:57 +1100 (AEDT)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e2pDX-0007LB-JI; Fri, 13 Oct 2017 01:56:51 +0000","from mail-pf0-x229.google.com ([2607:f8b0:400e:c00::229])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e2pDS-0007Gf-Jn for linux-arm-kernel@lists.infradead.org;\n\tFri, 13 Oct 2017 01:56:48 +0000","by mail-pf0-x229.google.com with SMTP id e64so7615599pfk.9\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tThu, 12 Oct 2017 18:56:25 -0700 (PDT)","from google.com ([2620:0:1000:1600:3454:68dc:8404:7e7b])\n\tby smtp.gmail.com with ESMTPSA id\n\tg24sm32767485pfk.0.2017.10.12.18.56.23\n\t(version=TLS1_2 cipher=AES128-SHA bits=128/128);\n\tThu, 12 Oct 2017 18:56:24 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:\n\tMessage-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=nmGx3MtSRHaRaWXtUoFaBNu5h1zjoBqbHf0kN/mEEuA=;\n\tb=powNGXHCimEopm\n\tPLf5U42HS3xSUq59NHc/MRs+fsoA0Kw27zUReJIzfPlE/UjgznVzWge7jKhKU9Vqy+C8HdBk05byk\n\tpA328xecIvseMRmp1sf2VusZtLZmjcL+CaRvW/NglsFkBrRwwIeI3UpJpT+ewdknMPWUr/Zo5ew9N\n\t8VA36jaHRW4zMoDllfPg8pptFnHREJ29JxwknoY4KlGymTx5St7uAeM9pgOwZjmBBVZi02p4GAg4R\n\ta46TCUsZOTgRWBx3o3oS5MLeas3DiyxXO98Nn+QWPLh3Fi21An7UMQTBSOzuI1PML3+puURxYKjjL\n\tZRCAiRJRB9KpSXedNbUw==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=w0lEHR+CzOK3CHM9BX1dsbfHRdZxfHo4OxUvectkECY=;\n\tb=UixMF9Jph3ks8LcSN63cqSN9J6e6ZRTVf6AowW1GEPsViq2QceERdeXgWsxqeXaOi3\n\twSaQBmDMbnGfp0UKbP3ZnCe3PRfche0+jJR6gayqBll5prGOnpxpYp7tSS1Ph603A0GA\n\tjbrXKd6JQ4hnYT7GzGhPOTQ7kmqFipS0WHHow="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=w0lEHR+CzOK3CHM9BX1dsbfHRdZxfHo4OxUvectkECY=;\n\tb=PfHAg5d13ulHniWCLqTh3Iah1guNwynDAmRSpUos92IP5j+LuOLfSiwdQIiSIZVBQX\n\t+hNGCJmWMbPjd7Z6lmf2aiCXcWzPOzBTXtIv67Yyqp4J42yYre4MdMRmZQGFXQCfANwi\n\tjRGOgNCOPxOQNMM8hJeLq1jpNqyJRg/Cz6wouLUApFiQx+8PraRZUksY6GCbCzC+LIKY\n\t12ABJQyM5EpCa5DiOpzyxVVlRuJpmaBPyVMfT67EElXgrDKQ1cPAbz+IMzS0YJ4mMota\n\t5x2PMfpPcGo3IabPMmz35WVTLAhtXMmOj5uB/AVWF+nXZqZBRInPV42/VClqNvv97/TC\n\thB8g==","X-Gm-Message-State":"AMCzsaUSAXfb2n2oc6RidEVDXBMNTsYYizOvLyI02EcE4TYVNmRRZVYK\n\tSjvewAP+XwrietH/auUD3WDeP9F6sRI=","X-Google-Smtp-Source":"AOwi7QDIfWZdj7YP6JAMQOazuT/kNPXl5Xb1n1jNp1GtXG+NYvw5fa6BbHxrKt5+WALyFJqrKFuQkw==","X-Received":"by 10.84.235.3 with SMTP id o3mr1819420plk.30.1507859784876;\n\tThu, 12 Oct 2017 18:56:24 -0700 (PDT)","Date":"Thu, 12 Oct 2017 18:56:22 -0700","From":"Brian Norris <briannorris@chromium.org>","To":"Jeffy Chen <jeffy.chen@rock-chips.com>","Subject":"Re: [PATCH v5 1/3] PCI: rockchip: Add support for pcie wake irq","Message-ID":"<20171013015620.GA94568@google.com>","References":"<20170911151029.25185-1-jeffy.chen@rock-chips.com>\n\t<20170911151029.25185-2-jeffy.chen@rock-chips.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20170911151029.25185-2-jeffy.chen@rock-chips.com>","User-Agent":"Mutt/1.5.21 (2010-09-15)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20171012_185646_719226_092BFF92 ","X-CRM114-Status":"GOOD (  18.80  )","X-Spam-Score":"-2.0 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.0 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno\n\ttrust [2607:f8b0:400e:c00:0:0:0:229 listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Heiko Stuebner <heiko@sntech.de>, linux-pci@vger.kernel.org,\n\tshawn.lin@rock-chips.com, linux-kernel@vger.kernel.org,\n\tdianders@chromium.org, \n\tlinux-rockchip@lists.infradead.org, bhelgaas@google.com,\n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1785967,"web_url":"http://patchwork.ozlabs.org/comment/1785967/","msgid":"<20171013023246.GZ25517@bhelgaas-glaptop.roam.corp.google.com>","list_archive_url":null,"date":"2017-10-13T02:32:47","subject":"Re: [PATCH v5 1/3] PCI: rockchip: Add support for pcie wake irq","submitter":{"id":67298,"url":"http://patchwork.ozlabs.org/api/people/67298/","name":"Bjorn Helgaas","email":"helgaas@kernel.org"},"content":"On Thu, Oct 12, 2017 at 06:56:22PM -0700, Brian Norris wrote:\n> Hi,\n> \n> On Mon, Sep 11, 2017 at 11:10:27PM +0800, Jeffy Chen wrote:\n> > Add support for PCIE_WAKE pin in rockchip pcie driver.\n> > \n> > Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>\n> > ---\n> > \n> > Changes in v5:\n> > Rebase\n> > \n> > Changes in v3:\n> > Fix error handling\n> > \n> > Changes in v2:\n> > Use dev_pm_set_dedicated_wake_irq\n> >         -- Suggested by Brian Norris <briannorris@chromium.com>\n> > \n> >  drivers/pci/host/pcie-rockchip.c | 19 +++++++++++++++++--\n> >  1 file changed, 17 insertions(+), 2 deletions(-)\n> > \n> > diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c\n> > index 9051c6c8fea4..a8b7272597a7 100644\n> > --- a/drivers/pci/host/pcie-rockchip.c\n> > +++ b/drivers/pci/host/pcie-rockchip.c\n> > @@ -37,6 +37,7 @@\n> >  #include <linux/pci_ids.h>\n> >  #include <linux/phy/phy.h>\n> >  #include <linux/platform_device.h>\n> > +#include <linux/pm_wakeirq.h>\n> >  #include <linux/reset.h>\n> >  #include <linux/regmap.h>\n> >  \n> > @@ -995,6 +996,15 @@ static int rockchip_pcie_setup_irq(struct rockchip_pcie *rockchip)\n> >  \t\treturn err;\n> >  \t}\n> >  \n> > +\t/* Must init wakeup before setting dedicated wakeup irq. */\n> > +\tdevice_init_wakeup(dev, true);\n> \n> Am I crazy, or should this go inside the 'irq >= 0' conditional?\n> Otherwise, for the whole series:\n> \n> Reviewed-by: Brian Norris <briannorris@chromium.org>\n> Tested-by: Brian Norris <briannorris@chromium.org>\n> \n> Bjorn, were you planning to pick this up?\n\nI had already applied this to pci/host-rockchip, but I must have gotten\ninterrupted before sending the email.\n\nBut now that you mention it, I looked at this again and have some\nquestions.  I'll respond to the original patch.\n\n> Also, the DT binding change conflicts (just simple context) with the\n> PERST# series I just sent out. Would be good if we could land one or\n> both :)\n> \n> Thanks,\n> Brian\n> \n> > +\tirq = platform_get_irq_byname(pdev, \"wakeup\");\n> > +\tif (irq >= 0) {\n> > +\t\terr = dev_pm_set_dedicated_wake_irq(dev, irq);\n> > +\t\tif (err)\n> > +\t\t\tdev_err(dev, \"failed to setup PCIe wakeup IRQ\\n\");\n> > +\t}\n> > +\n> >  \treturn 0;\n> >  }\n> >  \n> > @@ -1542,11 +1552,11 @@ static int rockchip_pcie_probe(struct platform_device *pdev)\n> >  \n> >  \terr = rockchip_pcie_parse_dt(rockchip);\n> >  \tif (err)\n> > -\t\treturn err;\n> > +\t\tgoto err_disable_wake;\n> >  \n> >  \terr = rockchip_pcie_enable_clocks(rockchip);\n> >  \tif (err)\n> > -\t\treturn err;\n> > +\t\tgoto err_disable_wake;\n> >  \n> >  \terr = rockchip_pcie_set_vpcie(rockchip);\n> >  \tif (err) {\n> > @@ -1656,6 +1666,9 @@ static int rockchip_pcie_probe(struct platform_device *pdev)\n> >  \t\tregulator_disable(rockchip->vpcie0v9);\n> >  err_set_vpcie:\n> >  \trockchip_pcie_disable_clocks(rockchip);\n> > +err_disable_wake:\n> > +\tdev_pm_clear_wake_irq(dev);\n> > +\tdevice_init_wakeup(dev, false);\n> >  \treturn err;\n> >  }\n> >  \n> > @@ -1682,6 +1695,8 @@ static int rockchip_pcie_remove(struct platform_device *pdev)\n> >  \tif (!IS_ERR(rockchip->vpcie0v9))\n> >  \t\tregulator_disable(rockchip->vpcie0v9);\n> >  \n> > +\tdev_pm_clear_wake_irq(dev);\n> > +\tdevice_init_wakeup(dev, false);\n> >  \treturn 0;\n> >  }\n> >  \n> > -- \n> > 2.11.0\n> > \n> > \n> \n> _______________________________________________\n> linux-arm-kernel mailing list\n> linux-arm-kernel@lists.infradead.org\n> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"YvMeKcKO\"; dkim-atps=neutral","mail.kernel.org;\n\tdmarc=none (p=none dis=none) header.from=kernel.org","mail.kernel.org;\n\tspf=none smtp.mailfrom=helgaas@kernel.org"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yCsG71gj6z9sNV\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tFri, 13 Oct 2017 13:33:19 +1100 (AEDT)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e2pml-0006Se-TZ; Fri, 13 Oct 2017 02:33:15 +0000","from mail.kernel.org ([198.145.29.99])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e2pmh-0006RB-Gk; Fri, 13 Oct 2017 02:33:13 +0000","from localhost (unknown [69.71.4.159])\n\t(using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits))\n\t(No client certificate requested)\n\tby mail.kernel.org (Postfix) with ESMTPSA id B6F5121903;\n\tFri, 13 Oct 2017 02:32:49 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:\n\tMessage-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=vZtBA4vFiv6EkJr5xHrDQGYvxZv60OXCrOXqzjLO4EU=;\n\tb=YvMeKcKOHtIRMh\n\tmAI+rZqCqRot1HuQqs3QL66NIMnRqnhM1Lui6yYRN/gsnA9Vv4to8yiCYe/U37WxlrQ6vMhHlbztg\n\t+o0n4WsuvHs9NSG6TGtdatVpUr7epSppCALYa2gMIJAIppG8jJRbopvvo5UIFWjm1PLpFu4b0hX5e\n\tyeTM7vQ8ihPtAzCmZ7ZImfWogCOrh4d/1dRkfPnX2UPsBXvJJ7r+43lAGWyb0qlGCcxf1XikkI2uP\n\t3hOAYqtg4MD6lopkU7WosULGJa95McP7mujlss+nX0GyamddatsSJwFvvyIA9mh8RFOlcnpTtqb3K\n\tEkV4eaCHlBl7kgsTOK4w==;","DMARC-Filter":"OpenDMARC Filter v1.3.2 mail.kernel.org B6F5121903","Date":"Thu, 12 Oct 2017 21:32:47 -0500","From":"Bjorn Helgaas <helgaas@kernel.org>","To":"Brian Norris <briannorris@chromium.org>","Subject":"Re: [PATCH v5 1/3] PCI: rockchip: Add support for pcie wake irq","Message-ID":"<20171013023246.GZ25517@bhelgaas-glaptop.roam.corp.google.com>","References":"<20170911151029.25185-1-jeffy.chen@rock-chips.com>\n\t<20170911151029.25185-2-jeffy.chen@rock-chips.com>\n\t<20171013015620.GA94568@google.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20171013015620.GA94568@google.com>","User-Agent":"Mutt/1.5.21 (2010-09-15)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20171012_193311_643334_DA9B6ECE ","X-CRM114-Status":"GOOD (  22.09  )","X-Spam-Score":"-6.9 (------)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-6.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/,\n\thigh trust [198.145.29.99 listed in list.dnswl.org]\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Heiko Stuebner <heiko@sntech.de>, linux-pci@vger.kernel.org,\n\tshawn.lin@rock-chips.com, Jeffy Chen <jeffy.chen@rock-chips.com>,\n\tdianders@chromium.org, linux-kernel@vger.kernel.org,\n\tlinux-rockchip@lists.infradead.org, bhelgaas@google.com,\n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1785971,"web_url":"http://patchwork.ozlabs.org/comment/1785971/","msgid":"<20171013030441.GA25517@bhelgaas-glaptop.roam.corp.google.com>","list_archive_url":null,"date":"2017-10-13T03:04:41","subject":"Re: [PATCH v5 1/3] PCI: rockchip: Add support for pcie wake irq","submitter":{"id":67298,"url":"http://patchwork.ozlabs.org/api/people/67298/","name":"Bjorn Helgaas","email":"helgaas@kernel.org"},"content":"[+cc Rafael, linux-pm]\n\nOn Mon, Sep 11, 2017 at 11:10:27PM +0800, Jeffy Chen wrote:\n> Add support for PCIE_WAKE pin in rockchip pcie driver.\n> \n> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>\n> ---\n> \n> Changes in v5:\n> Rebase\n> \n> Changes in v3:\n> Fix error handling\n> \n> Changes in v2:\n> Use dev_pm_set_dedicated_wake_irq\n>         -- Suggested by Brian Norris <briannorris@chromium.com>\n> \n>  drivers/pci/host/pcie-rockchip.c | 19 +++++++++++++++++--\n>  1 file changed, 17 insertions(+), 2 deletions(-)\n> \n> diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c\n> index 9051c6c8fea4..a8b7272597a7 100644\n> --- a/drivers/pci/host/pcie-rockchip.c\n> +++ b/drivers/pci/host/pcie-rockchip.c\n> @@ -37,6 +37,7 @@\n>  #include <linux/pci_ids.h>\n>  #include <linux/phy/phy.h>\n>  #include <linux/platform_device.h>\n> +#include <linux/pm_wakeirq.h>\n>  #include <linux/reset.h>\n>  #include <linux/regmap.h>\n>  \n> @@ -995,6 +996,15 @@ static int rockchip_pcie_setup_irq(struct rockchip_pcie *rockchip)\n>  \t\treturn err;\n>  \t}\n>  \n> +\t/* Must init wakeup before setting dedicated wakeup irq. */\n> +\tdevice_init_wakeup(dev, true);\n> +\tirq = platform_get_irq_byname(pdev, \"wakeup\");\n> +\tif (irq >= 0) {\n> +\t\terr = dev_pm_set_dedicated_wake_irq(dev, irq);\n\nI'm a little skeptical about dev_pm_set_dedicated_wake_irq(), not\nbecause I know anything at all about it, but because there are only\nfive callers in the whole tree, three of which are in UART code, and\nnone in anything resembling PCI code.\n\nIs Rockchip really that special, or are we going about this the wrong\nway?\n\n> +\t\tif (err)\n> +\t\t\tdev_err(dev, \"failed to setup PCIe wakeup IRQ\\n\");\n> +\t}\n> +\n>  \treturn 0;\n\nThe above could be structured as:\n\n  irq = platform_get_irq_byname(pdev, \"wakeup\");\n  if (irq < 0)\n    return 0;\n\n  device_init_wakeup(dev, true);\n  err = dev_pm_set_dedicated_wake_irq(dev, irq);\n  if (err) {\n    dev_pm_clear_wake_irq(dev);\n    device_init_wakeup(dev, false);\n  }\n\n  return 0;\n\nto unindent the mainline non-error code.\n\n>  }\n>  \n> @@ -1542,11 +1552,11 @@ static int rockchip_pcie_probe(struct platform_device *pdev)\n>  \n>  \terr = rockchip_pcie_parse_dt(rockchip);\n>  \tif (err)\n> -\t\treturn err;\n> +\t\tgoto err_disable_wake;\n>  \n>  \terr = rockchip_pcie_enable_clocks(rockchip);\n>  \tif (err)\n> -\t\treturn err;\n> +\t\tgoto err_disable_wake;\n>  \n>  \terr = rockchip_pcie_set_vpcie(rockchip);\n>  \tif (err) {\n> @@ -1656,6 +1666,9 @@ static int rockchip_pcie_probe(struct platform_device *pdev)\n>  \t\tregulator_disable(rockchip->vpcie0v9);\n>  err_set_vpcie:\n>  \trockchip_pcie_disable_clocks(rockchip);\n> +err_disable_wake:\n> +\tdev_pm_clear_wake_irq(dev);\n> +\tdevice_init_wakeup(dev, false);\n\nI think this error cleanup should be done in rockchip_pcie_setup_irq()\nas shown above.  There's no real connection between\nrockchip_pcie_probe() and the wake setup.\n\n>  \treturn err;\n>  }\n>  \n> @@ -1682,6 +1695,8 @@ static int rockchip_pcie_remove(struct platform_device *pdev)\n>  \tif (!IS_ERR(rockchip->vpcie0v9))\n>  \t\tregulator_disable(rockchip->vpcie0v9);\n>  \n> +\tdev_pm_clear_wake_irq(dev);\n> +\tdevice_init_wakeup(dev, false);\n>  \treturn 0;\n>  }\n>  \n> -- \n> 2.11.0\n> \n> \n> \n> _______________________________________________\n> linux-arm-kernel mailing list\n> linux-arm-kernel@lists.infradead.org\n> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"XNJUFLJU\"; dkim-atps=neutral","mail.kernel.org;\n\tdmarc=none (p=none dis=none) header.from=kernel.org","mail.kernel.org;\n\tspf=none smtp.mailfrom=helgaas@kernel.org"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yCsz12Bp4z9sPm\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tFri, 13 Oct 2017 14:05:14 +1100 (AEDT)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e2qHe-0004fh-Jq; Fri, 13 Oct 2017 03:05:10 +0000","from mail.kernel.org ([198.145.29.99])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e2qHa-0003Qj-Sn; Fri, 13 Oct 2017 03:05:08 +0000","from localhost (unknown [69.71.4.159])\n\t(using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits))\n\t(No client certificate requested)\n\tby mail.kernel.org (Postfix) with ESMTPSA id 45FE221908;\n\tFri, 13 Oct 2017 03:04:45 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:\n\tMessage-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=Rqg+jJQbImKwpaKRifChcdHDFNvB18wdojizlPeOgew=;\n\tb=XNJUFLJUsgLvPl\n\tSOhFU5UHq/1qid3RBgPhikFIUkhay0DBPA/qDaLoq6T2DU/i/uABhRw4vgBnHEbWua2lqyShF/NTa\n\tWoqQ7EewvUR+H24G1xtgvIgPUTp/aLFP6IQJIWZ9lQLlhoUW8S2HWcZ0Y76QP+pKaIiPcd/ES2Q76\n\tXdQ7DBnXc25V9knaKMw4q2c6k9eJpXgAj9HJktEyb7LgriexlVoycVkNzyjiIrAs+aZuzoAGboqRC\n\t9UkhDaxsUzF6MrB5ye5UjTKDhzg7c9LpTUxxS+NsJSoNYIihO8YYjmAjQi7CGVElKW9NX5wtrhfUf\n\tNNS4ughktulEuJfbjjQg==;","DMARC-Filter":"OpenDMARC Filter v1.3.2 mail.kernel.org 45FE221908","Date":"Thu, 12 Oct 2017 22:04:41 -0500","From":"Bjorn Helgaas <helgaas@kernel.org>","To":"Jeffy Chen <jeffy.chen@rock-chips.com>","Subject":"Re: [PATCH v5 1/3] PCI: rockchip: Add support for pcie wake irq","Message-ID":"<20171013030441.GA25517@bhelgaas-glaptop.roam.corp.google.com>","References":"<20170911151029.25185-1-jeffy.chen@rock-chips.com>\n\t<20170911151029.25185-2-jeffy.chen@rock-chips.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20170911151029.25185-2-jeffy.chen@rock-chips.com>","User-Agent":"Mutt/1.5.21 (2010-09-15)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20171012_200507_023140_C4F67587 ","X-CRM114-Status":"GOOD (  17.59  )","X-Spam-Score":"-6.9 (------)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-6.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/,\n\thigh trust [198.145.29.99 listed in list.dnswl.org]\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Heiko Stuebner <heiko@sntech.de>, linux-pm@vger.kernel.org,\n\tlinux-pci@vger.kernel.org, shawn.lin@rock-chips.com,\n\tbriannorris@chromium.org, \n\t\"Rafael J. Wysocki\" <rjw@rjwysocki.net>, linux-kernel@vger.kernel.org,\n\tdianders@chromium.org, linux-rockchip@lists.infradead.org,\n\tbhelgaas@google.com, linux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1786022,"web_url":"http://patchwork.ozlabs.org/comment/1786022/","msgid":"<20171013063100.GB56763@google.com>","list_archive_url":null,"date":"2017-10-13T06:31:00","subject":"Re: [PATCH v5 1/3] PCI: rockchip: Add support for pcie wake irq","submitter":{"id":67074,"url":"http://patchwork.ozlabs.org/api/people/67074/","name":"Brian Norris","email":"briannorris@chromium.org"},"content":"On Thu, Oct 12, 2017 at 09:32:47PM -0500, Bjorn Helgaas wrote:\n> On Thu, Oct 12, 2017 at 06:56:22PM -0700, Brian Norris wrote:\n> > Bjorn, were you planning to pick this up?\n> \n> I had already applied this to pci/host-rockchip, but I must have gotten\n> interrupted before sending the email.\n\nYou also hadn't merged it into your /next branch either, which is where\nI was looking (and basing my other patch set).\n\n> But now that you mention it, I looked at this again and have some\n> questions.  I'll respond to the original patch.\n\nBrian","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"G/UMOR1d\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"aFYhJhtX\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yCyY137Skz9sNr\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tFri, 13 Oct 2017 17:31:33 +1100 (AEDT)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e2tVJ-00010Z-Vp; Fri, 13 Oct 2017 06:31:29 +0000","from mail-pf0-x232.google.com ([2607:f8b0:400e:c00::232])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e2tVE-0000vC-2S for linux-arm-kernel@lists.infradead.org;\n\tFri, 13 Oct 2017 06:31:25 +0000","by mail-pf0-x232.google.com with SMTP id n89so994537pfk.11\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tThu, 12 Oct 2017 23:31:03 -0700 (PDT)","from google.com ([2620:0:1000:1600:3454:68dc:8404:7e7b])\n\tby smtp.gmail.com with ESMTPSA id\n\ta25sm829202pfc.143.2017.10.12.23.31.02\n\t(version=TLS1_2 cipher=AES128-SHA bits=128/128);\n\tThu, 12 Oct 2017 23:31:02 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:\n\tMessage-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=pxeBN2sg/4gPGVAb0Rxiv4AzyS962zJ/oPS56ShkWFA=;\n\tb=G/UMOR1dQT/gyr\n\ta5I7UpDlDp/uNh0/xmbT4bBB+YO/EbY1hxSUl56DLmpzukps69etPg5tUCHfDQszCji6samYkC8/O\n\tk/MkLRwaJE4PZyLyIjZ5fDYwiwWzlPAvhvhVcv2fOvxo4LmDQGwsQSxzu5rsLipflZnVNe5wLwOtj\n\ttwD0WFfDDwJ4Kj9+fmnZTPKFr0Z+3HlyBHUexaww8J81FcW9CiS0xrFEKPQBp//BuBR0owc7XWGyu\n\tyty7GocEVA/LuTr/cID31Jz7aeuD+WBSd68pCzjLqK/2onnm/mIQfYGkMUu8cIH5DoIT5BSKfrbLK\n\t6E0fcu2jWD8TW7YuhFGA==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=hEmKaj2mrW3xap2c3JXoHhjQbqbJ0Vd1nMteZwavmdY=;\n\tb=aFYhJhtXvCic0rSZ2djP4dYJtqCVvgS4s6L1IM1A0s9w+5ZgNqUpqQi90cfmkOAVBE\n\tq8/Vpr0TRYQgYGhw6GzN0nXoE5z7j/4QAV8QuL0hiBRLogClRWlZkAyBnIcralpEBP98\n\tRRzfWnPX5CiEWuXCZa8pkxCfGrJzNR3ETudt8="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=hEmKaj2mrW3xap2c3JXoHhjQbqbJ0Vd1nMteZwavmdY=;\n\tb=Hu8WVOQAHlRIgttu/P8rKTwrQxpIF7/NV29qKPnRuG4ulTzHVDREAOjKCr7rI0Ku0f\n\tybEmy8eRFAtRGz/wBny30Fa5IO9aySQ5lrE1ALkgqW41xYuaV3g/kyPbZXdWk2mQrHkL\n\tNnQ6VQFfWs1D0Mm0jsVCsfN2IcP251WWj0yEK7xS93GCGa3ncv2o/mlWjxifPkXZjv4J\n\tGEc2E2BSstwZIkkXa9rxv0oMXJBwVaUCuQQF6deEzvsCpF/qFcOtmQdeJdbmEroNXVQe\n\taFj1wwTxp2ecE4xpp6YSDBhxKoXESi5XW3mscN4dW3g6MLbWyaTzuOYr4to8gA7tTxl6\n\th3bg==","X-Gm-Message-State":"AMCzsaWJnG3VDODP/o67OflVY9zFOy/QpKOkESB2UtxMQEFHG28Kff1H\n\tz3GCHW2uCPSiL7ocDjNVBXxyK7jW63c=","X-Google-Smtp-Source":"AOwi7QC9oKnUEScWj0UYcj7IviMkxItfSMbDI2/l8/2mRdbkyJWLRBUIbpPv4I5g2U3Ce9D70/xrxQ==","X-Received":"by 10.98.33.80 with SMTP id h77mr464572pfh.18.1507876263207;\n\tThu, 12 Oct 2017 23:31:03 -0700 (PDT)","Date":"Thu, 12 Oct 2017 23:31:00 -0700","From":"Brian Norris <briannorris@chromium.org>","To":"Bjorn Helgaas <helgaas@kernel.org>","Subject":"Re: [PATCH v5 1/3] PCI: rockchip: Add support for pcie wake irq","Message-ID":"<20171013063100.GB56763@google.com>","References":"<20170911151029.25185-1-jeffy.chen@rock-chips.com>\n\t<20170911151029.25185-2-jeffy.chen@rock-chips.com>\n\t<20171013015620.GA94568@google.com>\n\t<20171013023246.GZ25517@bhelgaas-glaptop.roam.corp.google.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20171013023246.GZ25517@bhelgaas-glaptop.roam.corp.google.com>","User-Agent":"Mutt/1.5.21 (2010-09-15)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20171012_233124_168625_ED467F4D ","X-CRM114-Status":"GOOD (  11.43  )","X-Spam-Score":"-2.0 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.0 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno\n\ttrust [2607:f8b0:400e:c00:0:0:0:232 listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Heiko Stuebner <heiko@sntech.de>, linux-pci@vger.kernel.org,\n\tshawn.lin@rock-chips.com, Jeffy Chen <jeffy.chen@rock-chips.com>,\n\tdianders@chromium.org, linux-kernel@vger.kernel.org,\n\tlinux-rockchip@lists.infradead.org, bhelgaas@google.com,\n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1786274,"web_url":"http://patchwork.ozlabs.org/comment/1786274/","msgid":"<2453698.N4jfPaHx71@aspire.rjw.lan>","list_archive_url":null,"date":"2017-10-13T13:21:41","subject":"Re: [PATCH v5 1/3] PCI: rockchip: Add support for pcie wake irq","submitter":{"id":26536,"url":"http://patchwork.ozlabs.org/api/people/26536/","name":"Rafael J. Wysocki","email":"rjw@rjwysocki.net"},"content":"[+cc Tony]\n\nOn Friday, October 13, 2017 5:04:41 AM CEST Bjorn Helgaas wrote:\n> [+cc Rafael, linux-pm]\n> \n> On Mon, Sep 11, 2017 at 11:10:27PM +0800, Jeffy Chen wrote:\n> > Add support for PCIE_WAKE pin in rockchip pcie driver.\n> > \n> > Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>\n> > ---\n> > \n> > Changes in v5:\n> > Rebase\n> > \n> > Changes in v3:\n> > Fix error handling\n> > \n> > Changes in v2:\n> > Use dev_pm_set_dedicated_wake_irq\n> >         -- Suggested by Brian Norris <briannorris@chromium.com>\n> > \n> >  drivers/pci/host/pcie-rockchip.c | 19 +++++++++++++++++--\n> >  1 file changed, 17 insertions(+), 2 deletions(-)\n> > \n> > diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c\n> > index 9051c6c8fea4..a8b7272597a7 100644\n> > --- a/drivers/pci/host/pcie-rockchip.c\n> > +++ b/drivers/pci/host/pcie-rockchip.c\n> > @@ -37,6 +37,7 @@\n> >  #include <linux/pci_ids.h>\n> >  #include <linux/phy/phy.h>\n> >  #include <linux/platform_device.h>\n> > +#include <linux/pm_wakeirq.h>\n> >  #include <linux/reset.h>\n> >  #include <linux/regmap.h>\n> >  \n> > @@ -995,6 +996,15 @@ static int rockchip_pcie_setup_irq(struct rockchip_pcie *rockchip)\n> >  \t\treturn err;\n> >  \t}\n> >  \n> > +\t/* Must init wakeup before setting dedicated wakeup irq. */\n> > +\tdevice_init_wakeup(dev, true);\n> > +\tirq = platform_get_irq_byname(pdev, \"wakeup\");\n> > +\tif (irq >= 0) {\n> > +\t\terr = dev_pm_set_dedicated_wake_irq(dev, irq);\n> \n> I'm a little skeptical about dev_pm_set_dedicated_wake_irq(), not\n> because I know anything at all about it, but because there are only\n> five callers in the whole tree, three of which are in UART code, and\n> none in anything resembling PCI code.\n> \n> Is Rockchip really that special, or are we going about this the wrong\n> way?\n> \n> > +\t\tif (err)\n> > +\t\t\tdev_err(dev, \"failed to setup PCIe wakeup IRQ\\n\");\n> > +\t}\n> > +\n> >  \treturn 0;\n> \n> The above could be structured as:\n> \n>   irq = platform_get_irq_byname(pdev, \"wakeup\");\n>   if (irq < 0)\n>     return 0;\n> \n>   device_init_wakeup(dev, true);\n>   err = dev_pm_set_dedicated_wake_irq(dev, irq);\n>   if (err) {\n>     dev_pm_clear_wake_irq(dev);\n>     device_init_wakeup(dev, false);\n>   }\n> \n>   return 0;\n> \n> to unindent the mainline non-error code.\n> \n> >  }\n> >  \n> > @@ -1542,11 +1552,11 @@ static int rockchip_pcie_probe(struct platform_device *pdev)\n> >  \n> >  \terr = rockchip_pcie_parse_dt(rockchip);\n> >  \tif (err)\n> > -\t\treturn err;\n> > +\t\tgoto err_disable_wake;\n> >  \n> >  \terr = rockchip_pcie_enable_clocks(rockchip);\n> >  \tif (err)\n> > -\t\treturn err;\n> > +\t\tgoto err_disable_wake;\n> >  \n> >  \terr = rockchip_pcie_set_vpcie(rockchip);\n> >  \tif (err) {\n> > @@ -1656,6 +1666,9 @@ static int rockchip_pcie_probe(struct platform_device *pdev)\n> >  \t\tregulator_disable(rockchip->vpcie0v9);\n> >  err_set_vpcie:\n> >  \trockchip_pcie_disable_clocks(rockchip);\n> > +err_disable_wake:\n> > +\tdev_pm_clear_wake_irq(dev);\n> > +\tdevice_init_wakeup(dev, false);\n> \n> I think this error cleanup should be done in rockchip_pcie_setup_irq()\n> as shown above.  There's no real connection between\n> rockchip_pcie_probe() and the wake setup.\n> \n> >  \treturn err;\n> >  }\n> >  \n> > @@ -1682,6 +1695,8 @@ static int rockchip_pcie_remove(struct platform_device *pdev)\n> >  \tif (!IS_ERR(rockchip->vpcie0v9))\n> >  \t\tregulator_disable(rockchip->vpcie0v9);\n> >  \n> > +\tdev_pm_clear_wake_irq(dev);\n> > +\tdevice_init_wakeup(dev, false);\n> >  \treturn 0;\n> >  }\n> >  \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"pSJHNEWn\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yD7sn71Zlz9sNr\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tSat, 14 Oct 2017 00:31:41 +1100 (AEDT)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e303u-0003XY-J3; Fri, 13 Oct 2017 13:31:38 +0000","from cloudserver094114.home.net.pl ([79.96.170.134])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e303q-000374-Ja; Fri, 13 Oct 2017 13:31:36 +0000","from 79.184.255.244.ipv4.supernova.orange.pl (79.184.255.244) (HELO\n\taspire.rjw.lan)\n\tby serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer\n\t0.82) id aeb4bcbf3d47d997; Fri, 13 Oct 2017 15:31:11 +0200"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:\n\tMessage-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=0YUBoi4jFUaBKhcAVY5bidqexMjAcPO4xCFtXq7IpGA=;\n\tb=pSJHNEWnWC+fQN\n\tFMU+Iu1I6Pjk85N0tczz7ij85KohtgX4c/WhZZjmeXXd1TpUbDLGKM6XLmGozLb3rMpVh6lxcLuCn\n\tvhVqMeJgjs/FWJ29Iivb3J7Q9CsdXlDVd1tM8AEkM4NeMArM9cqPGEERKGO4u4WIjynsvFesJFMbx\n\tyVfhifYQKD4doS8VyskuEKokbfN0PhGsTvpwnwhrpP/lUYeGUOMVyXl/vz2pabDLY1DKZvQkD3Hl3\n\t3SgtZedFI4A9ztvSKyk2rxYaxJf2peFuYFNcnRz/8aUG4JxOTMenzqMI4Nek+W8CPh9oIwrze+/gp\n\tLZ3J1IwX2A7ZBvqouagQ==;","From":"\"Rafael J. Wysocki\" <rjw@rjwysocki.net>","To":"Bjorn Helgaas <helgaas@kernel.org>","Subject":"Re: [PATCH v5 1/3] PCI: rockchip: Add support for pcie wake irq","Date":"Fri, 13 Oct 2017 15:21:41 +0200","Message-ID":"<2453698.N4jfPaHx71@aspire.rjw.lan>","In-Reply-To":"<20171013030441.GA25517@bhelgaas-glaptop.roam.corp.google.com>","References":"<20170911151029.25185-1-jeffy.chen@rock-chips.com>\n\t<20170911151029.25185-2-jeffy.chen@rock-chips.com>\n\t<20171013030441.GA25517@bhelgaas-glaptop.roam.corp.google.com>","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20171013_063134_839053_E9EA9E22 ","X-CRM114-Status":"GOOD (  17.71  )","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"briannorris@chromium.org, Heiko Stuebner <heiko@sntech.de>,\n\tlinux-pm@vger.kernel.org, Tony Lindgren <tony@atomide.com>,\n\tlinux-pci@vger.kernel.org, shawn.lin@rock-chips.com,\n\tJeffy Chen <jeffy.chen@rock-chips.com>, linux-kernel@vger.kernel.org, \n\tdianders@chromium.org, linux-rockchip@lists.infradead.org,\n\tbhelgaas@google.com, linux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1786507,"web_url":"http://patchwork.ozlabs.org/comment/1786507/","msgid":"<20171013175825.GR4394@atomide.com>","list_archive_url":null,"date":"2017-10-13T17:58:26","subject":"Re: [PATCH v5 1/3] PCI: rockchip: Add support for pcie wake irq","submitter":{"id":365,"url":"http://patchwork.ozlabs.org/api/people/365/","name":"Tony Lindgren","email":"tony@atomide.com"},"content":"* Rafael J. Wysocki <rjw@rjwysocki.net> [171013 06:32]:\n> [+cc Tony]\n> \n> On Friday, October 13, 2017 5:04:41 AM CEST Bjorn Helgaas wrote:\n> > [+cc Rafael, linux-pm]\n> > On Mon, Sep 11, 2017 at 11:10:27PM +0800, Jeffy Chen wrote:\n> > > Add support for PCIE_WAKE pin in rockchip pcie driver.\n...\n> > > @@ -995,6 +996,15 @@ static int rockchip_pcie_setup_irq(struct rockchip_pcie *rockchip)\n> > >  \t\treturn err;\n> > >  \t}\n> > >  \n> > > +\t/* Must init wakeup before setting dedicated wakeup irq. */\n> > > +\tdevice_init_wakeup(dev, true);\n> > > +\tirq = platform_get_irq_byname(pdev, \"wakeup\");\n> > > +\tif (irq >= 0) {\n> > > +\t\terr = dev_pm_set_dedicated_wake_irq(dev, irq);\n> > \n> > I'm a little skeptical about dev_pm_set_dedicated_wake_irq(), not\n> > because I know anything at all about it, but because there are only\n> > five callers in the whole tree, three of which are in UART code, and\n> > none in anything resembling PCI code.\n\nWell it should work for any device that can provide an out of band wakeup\ninterrupt such as a dedicated GPIO line.\n\n> > Is Rockchip really that special, or are we going about this the wrong\n> > way?\n\nMaybe this can be set up in a generic way somewhere similar to what\nthe I2C bus is doing?\n\nSee i2c_device_probe() for dev_pm_set_dedicated_wake_irq() in\ndrivers/i2c/i2c-core-base.c.\n\nRegards,\n\nTony","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"deRM+wuG\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yDFp969Sjz9s82\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tSat, 14 Oct 2017 04:58:57 +1100 (AEDT)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e34EY-00084o-Kx; Fri, 13 Oct 2017 17:58:54 +0000","from muru.com ([72.249.23.125])\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e34EU-0007tC-PP; Fri, 13 Oct 2017 17:58:52 +0000","from atomide.com (localhost [127.0.0.1])\n\tby muru.com (Postfix) with ESMTPS id F3E198167;\n\tFri, 13 Oct 2017 17:59:41 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:\n\tMessage-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=AP0x3JrtiyHrCCu/oykIs7IZ48Rc4PjZTPJ28IMw2UU=;\n\tb=deRM+wuGZu7K0x\n\tYg6MZVP87ysrLP/H0sfv6cWmnaWqu2XbF0PLFY9VAPDkg5g29KYCR3ov3axgyTP92qeHscW9QjXC8\n\tTi4LWopoM+bc9yliPBXnYODDy6+1CS8Qtd252YP5ZtXYEgTHUWd5StCfAbCHPy9YVyT60e7yDNepS\n\tUw0mdIBtp1f+Ep6nC0bsMJkVBF4tHp4euV6DjrME70bk/5wez0v8x7H+kdlkAFYQ5DL+9UyDMOFlh\n\tqT3ShBtET+wMqgo+TrPTf2/B8AC+5OJzvfGClSAqTXeBK+L+HuBTJWSL7gFV9VJ/8qnJfLtDg322S\n\tSKyVtUvZZ4EVH68PsR+A==;","Date":"Fri, 13 Oct 2017 10:58:26 -0700","From":"Tony Lindgren <tony@atomide.com>","To":"\"Rafael J. Wysocki\" <rjw@rjwysocki.net>","Subject":"Re: [PATCH v5 1/3] PCI: rockchip: Add support for pcie wake irq","Message-ID":"<20171013175825.GR4394@atomide.com>","References":"<20170911151029.25185-1-jeffy.chen@rock-chips.com>\n\t<20170911151029.25185-2-jeffy.chen@rock-chips.com>\n\t<20171013030441.GA25517@bhelgaas-glaptop.roam.corp.google.com>\n\t<2453698.N4jfPaHx71@aspire.rjw.lan>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<2453698.N4jfPaHx71@aspire.rjw.lan>","User-Agent":"Mutt/1.9.0 (2017-09-02)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20171013_105850_863360_EAD3C3B8 ","X-CRM114-Status":"GOOD (  13.47  )","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"briannorris@chromium.org, Heiko Stuebner <heiko@sntech.de>,\n\tlinux-pm@vger.kernel.org, linux-pci@vger.kernel.org,\n\tshawn.lin@rock-chips.com, \n\tJeffy Chen <jeffy.chen@rock-chips.com>, linux-kernel@vger.kernel.org, \n\tdianders@chromium.org, linux-rockchip@lists.infradead.org,\n\tBjorn Helgaas <helgaas@kernel.org>, bhelgaas@google.com,\n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1786535,"web_url":"http://patchwork.ozlabs.org/comment/1786535/","msgid":"<59E10709.4020300@rock-chips.com>","list_archive_url":null,"date":"2017-10-13T18:33:45","subject":"Re: [PATCH v5 1/3] PCI: rockchip: Add support for pcie wake irq","submitter":{"id":67754,"url":"http://patchwork.ozlabs.org/api/people/67754/","name":"Jeffy Chen","email":"jeffy.chen@rock-chips.com"},"content":"Hi Rafael,\n\nOn 10/13/2017 09:21 PM, Rafael J. Wysocki wrote:\n>>\n>>I'm a little skeptical about dev_pm_set_dedicated_wake_irq(), not\n>>because I know anything at all about it, but because there are only\n>>five callers in the whole tree, three of which are in UART code, and\n>>none in anything resembling PCI code.\n>>\n>>Is Rockchip really that special, or are we going about this the wrong\n>>way?\n\nwe used to put these codes in the wifi driver, but another wifi vendor \nsuggests these should go into the pcie driver.\n\nand as tony said, it could go into pcie common code :)\n>>\n>> > >+\t\tif (err)\n>> > >+\t\t\tdev_err(dev, \"failed to setup PCIe wakeup IRQ\\n\");\n>> > >+\t}\n>> > >+\n>> > >  \treturn 0;\n>>\n>>The above could be structured as:\n>>\n>>   irq = platform_get_irq_byname(pdev, \"wakeup\");\n>>   if (irq < 0)\n>>     return 0;\n>>\n>>   device_init_wakeup(dev, true);\n>>   err = dev_pm_set_dedicated_wake_irq(dev, irq);\n>>   if (err) {\n>>     dev_pm_clear_wake_irq(dev);\n>>     device_init_wakeup(dev, false);\n>>   }\n>>\nthere's no need to call dev_pm_clear_wake_irq when \ndev_pm_set_dedicated_wake_irq failed...and i agree the \ndevice_init_wakeup part, i'll add that in the next version(with brian's \ncomment too)\n>>   return 0;\n>>\n>>to unindent the mainline non-error code.\n>>\n>> > >  }\n>> > >\n>> > >@@ -1542,11 +1552,11 @@ static int rockchip_pcie_probe(struct platform_device *pdev)\n>> > >\n>> > >  \terr = rockchip_pcie_parse_dt(rockchip);\n>> > >  \tif (err)\n>> > >-\t\treturn err;\n>> > >+\t\tgoto err_disable_wake;\n>> > >\n>> > >  \terr = rockchip_pcie_enable_clocks(rockchip);\n>> > >  \tif (err)\n>> > >-\t\treturn err;\n>> > >+\t\tgoto err_disable_wake;\n>> > >\n>> > >  \terr = rockchip_pcie_set_vpcie(rockchip);\n>> > >  \tif (err) {\n>> > >@@ -1656,6 +1666,9 @@ static int rockchip_pcie_probe(struct platform_device *pdev)\n>> > >  \t\tregulator_disable(rockchip->vpcie0v9);\n>> > >  err_set_vpcie:\n>> > >  \trockchip_pcie_disable_clocks(rockchip);\n>> > >+err_disable_wake:\n>> > >+\tdev_pm_clear_wake_irq(dev);\n>> > >+\tdevice_init_wakeup(dev, false);\n>>\n>>I think this error cleanup should be done in rockchip_pcie_setup_irq()\n>>as shown above.  There's no real connection between\n>>rockchip_pcie_probe() and the wake setup.\n\nthis error handling is like inline \"rockchip_pcie_cleanup_irq()\", and \nthey are harmless to be called even if we don't have the wakeup irq :)","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"ZJr8WWFa\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yDGb45q4Tz9s1h\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tSat, 14 Oct 2017 05:34:24 +1100 (AEDT)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e34mp-0002F4-PV; Fri, 13 Oct 2017 18:34:19 +0000","from regular1.263xmail.com ([211.150.99.131])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e34ml-0002CQ-Ug; Fri, 13 Oct 2017 18:34:18 +0000","from jeffy.chen?rock-chips.com (unknown [192.168.167.76])\n\tby regular1.263xmail.com (Postfix) with ESMTP id 2B98661EB;\n\tSat, 14 Oct 2017 02:33:48 +0800 (CST)","from [172.16.22.86] (localhost [127.0.0.1])\n\tby smtp.263.net (Postfix) with ESMTPA id 6B08938B;\n\tSat, 14 Oct 2017 02:33:47 +0800 (CST)","from [172.16.22.86] (unknown [103.29.142.67])\n\tby smtp.263.net (Postfix) whith ESMTP id 13677W6LXDP;\n\tSat, 14 Oct 2017 02:33:50 +0800 (CST)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:\n\tContent-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive:\n\tList-Unsubscribe:List-Id:In-Reply-To:References:Subject:To:MIME-Version:From:\n\tDate:Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=2Vc1y/2ooGFoGqvVoScH/K4tg2J03twsmNbKbSv/iOg=;\n\tb=ZJr8WWFaanzorDCz7k9dX8Efm\n\t5RLyRS4GLG7WmTLaaYRQASemeJZgycvcnsits9Clzg7Mf/tdJ8Nff/16Kvg4nR2NIGbSfbKbziev/\n\tEIq2fflX4YSAYE1EhC5KroRARW2zefqcN4gkHOe1/sM3ImwYqxSh7OMfZf2R/0Asvq6pD6QbABkXJ\n\tMoFYUE+Y9KBD0oHtSWaLTpJL3qoAt6r4Qf1Ou8YEwUBnleLUvODM7ZFAXIYa2I6S1+N4MjyyxG+pm\n\tg9Nc4WpPsAKbTnpkF+oYz3gSM2W126z11ccTh3X7KkWhoe8wIiLpfEYl47fGXlX0wRuC66H+TC+FW\n\tZ0ciqWPzg==;","X-263anti-spam":"KSV:0;","X-MAIL-GRAY":"0","X-MAIL-DELIVERY":"1","X-KSVirus-check":"0","X-ABS-CHECKED":"4","X-RL-SENDER":"jeffy.chen@rock-chips.com","X-FST-TO":"rjw@rjwysocki.net","X-SENDER-IP":"103.29.142.67","X-LOGIN-NAME":"jeffy.chen@rock-chips.com","X-UNIQUE-TAG":"<1a0bde58e3282179d6881f6db236e29f>","X-ATTACHMENT-NUM":"0","X-SENDER":"cjf@rock-chips.com","X-DNS-TYPE":"0","Message-ID":"<59E10709.4020300@rock-chips.com>","Date":"Sat, 14 Oct 2017 02:33:45 +0800","From":"jeffy <jeffy.chen@rock-chips.com>","User-Agent":"Mozilla/5.0 (X11; Linux x86_64;\n\trv:19.0) Gecko/20130126 Thunderbird/19.0","MIME-Version":"1.0","To":"\"Rafael J. Wysocki\" <rjw@rjwysocki.net>, \n\tBjorn Helgaas <helgaas@kernel.org>","Subject":"Re: [PATCH v5 1/3] PCI: rockchip: Add support for pcie wake irq","References":"<20170911151029.25185-1-jeffy.chen@rock-chips.com>\n\t<20170911151029.25185-2-jeffy.chen@rock-chips.com>\n\t<20171013030441.GA25517@bhelgaas-glaptop.roam.corp.google.com>\n\t<2453698.N4jfPaHx71@aspire.rjw.lan>","In-Reply-To":"<2453698.N4jfPaHx71@aspire.rjw.lan>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20171013_113416_536629_47EE43C7 ","X-CRM114-Status":"GOOD (  10.24  )","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno trust [211.150.99.131 listed in list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Heiko Stuebner <heiko@sntech.de>, linux-pm@vger.kernel.org,\n\tTony Lindgren <tony@atomide.com>, linux-pci@vger.kernel.org,\n\tshawn.lin@rock-chips.com, briannorris@chromium.org,\n\tlinux-kernel@vger.kernel.org, dianders@chromium.org,\n\tlinux-rockchip@lists.infradead.org, bhelgaas@google.com,\n\tlinux-arm-kernel@lists.infradead.org","Content-Transfer-Encoding":"7bit","Content-Type":"text/plain; charset=\"us-ascii\"; Format=\"flowed\"","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1786587,"web_url":"http://patchwork.ozlabs.org/comment/1786587/","msgid":"<20171013191906.GF25517@bhelgaas-glaptop.roam.corp.google.com>","list_archive_url":null,"date":"2017-10-13T19:19:06","subject":"Re: [PATCH v5 1/3] PCI: rockchip: Add support for pcie wake irq","submitter":{"id":67298,"url":"http://patchwork.ozlabs.org/api/people/67298/","name":"Bjorn Helgaas","email":"helgaas@kernel.org"},"content":"On Sat, Oct 14, 2017 at 02:33:45AM +0800, jeffy wrote:\n> Hi Rafael,\n> \n> On 10/13/2017 09:21 PM, Rafael J. Wysocki wrote:\n> >>\n> >>I'm a little skeptical about dev_pm_set_dedicated_wake_irq(), not\n> >>because I know anything at all about it, but because there are only\n> >>five callers in the whole tree, three of which are in UART code, and\n> >>none in anything resembling PCI code.\n> >>\n> >>Is Rockchip really that special, or are we going about this the wrong\n> >>way?\n> \n> we used to put these codes in the wifi driver, but another wifi\n> vendor suggests these should go into the pcie driver.\n> \n> and as tony said, it could go into pcie common code :)\n\nI guess the implication (I'm speculating here) is that in most\nexisting cases, the WAKE# signal is fielded by an ACPI BIOS, which\nknows how it's connected.  I suppose that would end up being turned\ninto an SCI that Linux already knows how to handle generically.\n\nAnd further, that the non-ACPI drivers are relatively new and you're\nthe first attempt to use WAKE# with a non-ACPI PCI host driver?\n\nIf this setup could be done somewhere in PCIe common code, that would\nbe great.  We have so much copy and pasted code already, it'd be nice\nto avoid adding more.  I don't know if this would fit in\npci_scan_root_bus_bridge(), doing something like dma_configure() does\nto get hold of a struct platform_device * or a struct device * so you\ncould lookup the IRQ?\n\n> >>> >+\t\tif (err)\n> >>> >+\t\t\tdev_err(dev, \"failed to setup PCIe wakeup IRQ\\n\");\n> >>> >+\t}\n> >>> >+\n> >>> >  \treturn 0;\n> >>\n> >>The above could be structured as:\n> >>\n> >>  irq = platform_get_irq_byname(pdev, \"wakeup\");\n> >>  if (irq < 0)\n> >>    return 0;\n> >>\n> >>  device_init_wakeup(dev, true);\n> >>  err = dev_pm_set_dedicated_wake_irq(dev, irq);\n> >>  if (err) {\n> >>    dev_pm_clear_wake_irq(dev);\n> >>    device_init_wakeup(dev, false);\n> >>  }\n> >>\n> there's no need to call dev_pm_clear_wake_irq when\n> dev_pm_set_dedicated_wake_irq failed...and i agree the\n> device_init_wakeup part, i'll add that in the next version(with\n> brian's comment too)\n> >>  return 0;\n> >>\n> >>to unindent the mainline non-error code.\n> >>\n> >>> >  }\n> >>> >\n> >>> >@@ -1542,11 +1552,11 @@ static int rockchip_pcie_probe(struct platform_device *pdev)\n> >>> >\n> >>> >  \terr = rockchip_pcie_parse_dt(rockchip);\n> >>> >  \tif (err)\n> >>> >-\t\treturn err;\n> >>> >+\t\tgoto err_disable_wake;\n> >>> >\n> >>> >  \terr = rockchip_pcie_enable_clocks(rockchip);\n> >>> >  \tif (err)\n> >>> >-\t\treturn err;\n> >>> >+\t\tgoto err_disable_wake;\n> >>> >\n> >>> >  \terr = rockchip_pcie_set_vpcie(rockchip);\n> >>> >  \tif (err) {\n> >>> >@@ -1656,6 +1666,9 @@ static int rockchip_pcie_probe(struct platform_device *pdev)\n> >>> >  \t\tregulator_disable(rockchip->vpcie0v9);\n> >>> >  err_set_vpcie:\n> >>> >  \trockchip_pcie_disable_clocks(rockchip);\n> >>> >+err_disable_wake:\n> >>> >+\tdev_pm_clear_wake_irq(dev);\n> >>> >+\tdevice_init_wakeup(dev, false);\n> >>\n> >>I think this error cleanup should be done in rockchip_pcie_setup_irq()\n> >>as shown above.  There's no real connection between\n> >>rockchip_pcie_probe() and the wake setup.\n> \n> this error handling is like inline \"rockchip_pcie_cleanup_irq()\",\n> and they are harmless to be called even if we don't have the wakeup\n> irq :)\n\nI'm sure they're harmless.  The point is that the cleanup should be\ndone near the failure, not in the caller of the caller of the function\nwhere the failure was detected.  You have:\n\n  rockchip_pcie_probe\n    rockchip_pcie_parse_dt\n      rockchip_pcie_setup_irq\n        err = dev_pm_set_dedicated_wake_irq\n        if (err)\n          dev_err(...)\n\nSo you detect the error in rockchip_pcie_setup_irq(), but you clean up\nfrom it in rockchip_pcie_probe(), which doesn't make sense because\nrockchip_pcie_probe() doesn't do anything related to wakeup interupts.\n\nBjorn","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"ffqyoPCk\"; dkim-atps=neutral","mail.kernel.org;\n\tdmarc=none (p=none dis=none) header.from=kernel.org","mail.kernel.org;\n\tspf=none smtp.mailfrom=helgaas@kernel.org"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yDHbH1pRRz9sDB\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tSat, 14 Oct 2017 06:19:39 +1100 (AEDT)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e35Ub-0007Jr-Dr; Fri, 13 Oct 2017 19:19:33 +0000","from mail.kernel.org ([198.145.29.99])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e35UX-0007Ig-Kt; Fri, 13 Oct 2017 19:19:31 +0000","from localhost (unknown [69.71.4.159])\n\t(using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits))\n\t(No client certificate requested)\n\tby mail.kernel.org (Postfix) with ESMTPSA id A6D9D219DC;\n\tFri, 13 Oct 2017 19:19:08 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:\n\tMessage-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=MB1h02wV5E0JYo8X7wXaSfKLEIEDpjnuWxDtjOOvCJw=;\n\tb=ffqyoPCk76A1i0\n\tICbVoY8HOzBuCwt6l0h5ucvXp3JVcCikZvQ2VsYp82DsM2/Ht+6gZNrIfgpVN/SYiyK4vA96pixTP\n\tyyZsnJtfP1rnD8rPzP0yPZdTPSCtcQ1sv1B7Tb5OgGKS4ZOb2heIW2+ACNvLDX1RYByBb3iY9RpU0\n\tF1/39qRiO7pT9b/vjr4XLPTehRo363H1W6646gXOgD3HWZTDy9AVg/Y3wby6iQBWw2ahsD91DkV9O\n\tYkd9cInYKUxvB8fofML8/1XgT004kE7RLAVXBMPIJQ67Wmz1N7+Snbdqz4lH0FqpMdbmhyzzD3+j6\n\t2HkM05OT0Eb60s7+aJ6w==;","DMARC-Filter":"OpenDMARC Filter v1.3.2 mail.kernel.org A6D9D219DC","Date":"Fri, 13 Oct 2017 14:19:06 -0500","From":"Bjorn Helgaas <helgaas@kernel.org>","To":"jeffy <jeffy.chen@rock-chips.com>","Subject":"Re: [PATCH v5 1/3] PCI: rockchip: Add support for pcie wake irq","Message-ID":"<20171013191906.GF25517@bhelgaas-glaptop.roam.corp.google.com>","References":"<20170911151029.25185-1-jeffy.chen@rock-chips.com>\n\t<20170911151029.25185-2-jeffy.chen@rock-chips.com>\n\t<20171013030441.GA25517@bhelgaas-glaptop.roam.corp.google.com>\n\t<2453698.N4jfPaHx71@aspire.rjw.lan>\n\t<59E10709.4020300@rock-chips.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<59E10709.4020300@rock-chips.com>","User-Agent":"Mutt/1.5.21 (2010-09-15)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20171013_121929_744268_E19FC298 ","X-CRM114-Status":"GOOD (  22.21  )","X-Spam-Score":"-6.9 (------)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-6.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/,\n\thigh trust [198.145.29.99 listed in list.dnswl.org]\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Heiko Stuebner <heiko@sntech.de>, linux-pm@vger.kernel.org,\n\tTony Lindgren <tony@atomide.com>, linux-pci@vger.kernel.org,\n\tshawn.lin@rock-chips.com, briannorris@chromium.org,\n\t\"Rafael J. Wysocki\" <rjw@rjwysocki.net>, linux-kernel@vger.kernel.org,\n\tdianders@chromium.org, linux-rockchip@lists.infradead.org,\n\tbhelgaas@google.com, linux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1786599,"web_url":"http://patchwork.ozlabs.org/comment/1786599/","msgid":"<59E11358.3090409@rock-chips.com>","list_archive_url":null,"date":"2017-10-13T19:26:16","subject":"Re: [PATCH v5 1/3] PCI: rockchip: Add support for pcie wake irq","submitter":{"id":67754,"url":"http://patchwork.ozlabs.org/api/people/67754/","name":"Jeffy Chen","email":"jeffy.chen@rock-chips.com"},"content":"Hi Bjorn,\n\nOn 10/14/2017 03:19 AM, Bjorn Helgaas wrote:\n> I'm sure they're harmless.  The point is that the cleanup should be\n> done near the failure, not in the caller of the caller of the function\n> where the failure was detected.  You have:\n>\n>    rockchip_pcie_probe\n>      rockchip_pcie_parse_dt\n>        rockchip_pcie_setup_irq\n>          err = dev_pm_set_dedicated_wake_irq\n>          if (err)\n>            dev_err(...)\n>\n> So you detect the error in rockchip_pcie_setup_irq(), but you clean up\n> from it in rockchip_pcie_probe(), which doesn't make sense because\n> rockchip_pcie_probe() doesn't do anything related to wakeup interupts.\n>\nright, but if something wrong happens in rockchip_pcie_probe() later \nthan rockchip_pcie_setup_irq(), we may still need to clean it up ;)\n\ni think the error handling is a little like what we do in the remove \ncallback\n> Bjorn\n>\n>\n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"fuGAtkZ8\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yDHlf2fx3z9sRW\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tSat, 14 Oct 2017 06:26:54 +1100 (AEDT)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e35bd-0003b6-2F; Fri, 13 Oct 2017 19:26:49 +0000","from regular1.263xmail.com ([211.150.99.137])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e35bZ-0003XX-W5; Fri, 13 Oct 2017 19:26:48 +0000","from jeffy.chen?rock-chips.com (unknown [192.168.167.183])\n\tby regular1.263xmail.com (Postfix) with ESMTP id 6504EDB38;\n\tSat, 14 Oct 2017 03:26:18 +0800 (CST)","from [172.16.22.86] (localhost [127.0.0.1])\n\tby smtp.263.net (Postfix) with ESMTPA id CD5EC345;\n\tSat, 14 Oct 2017 03:26:17 +0800 (CST)","from [172.16.22.86] (unknown [103.29.142.67])\n\tby smtp.263.net (Postfix) whith ESMTP id 27725X0IOX2;\n\tSat, 14 Oct 2017 03:26:21 +0800 (CST)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:\n\tContent-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive:\n\tList-Unsubscribe:List-Id:In-Reply-To:References:Subject:To:MIME-Version:From:\n\tDate:Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=r7wZsCLw7w7ATfzBGUkS0gP1IHWu93u5ybHcmn1g6Bc=;\n\tb=fuGAtkZ8FlzaU3abtztTWbXVm\n\tkqHpgrm3zt8mi2szMvrLUPN87lDuKEesGSSaEfF2+SK97Vx0ErtDByEj3kjcvDcCoFpwDkFnC5jz2\n\tX70LaY+CNCZ6JW/DiZS9zsEW2Wrig8Sgvaw3sqRkwDOfiQRHsLkXJW+t4juQDNhWluoP5ydFxrvf9\n\tisrmkod5RvAQmgxBhrbg3qRkBYaYzT0kTDtpde7rwsKAUnoGV3wPNUGCxlTLkDiMXymAGz+QygYc8\n\tYMiCtmUwmj1QyIaAQ7KyGPHXhXzUuIRqJfHl67fHpkWexI384/bLJBVHmVJUn4HYkaDEu6Ga1sQlM\n\tpp8Mj90+A==;","X-263anti-spam":"KSV:0;","X-MAIL-GRAY":"0","X-MAIL-DELIVERY":"1","X-KSVirus-check":"0","X-ABS-CHECKED":"4","X-RL-SENDER":"jeffy.chen@rock-chips.com","X-FST-TO":"helgaas@kernel.org","X-SENDER-IP":"103.29.142.67","X-LOGIN-NAME":"jeffy.chen@rock-chips.com","X-UNIQUE-TAG":"<646ab2bd8ffb7015988cbae18509aeb7>","X-ATTACHMENT-NUM":"0","X-SENDER":"cjf@rock-chips.com","X-DNS-TYPE":"0","Message-ID":"<59E11358.3090409@rock-chips.com>","Date":"Sat, 14 Oct 2017 03:26:16 +0800","From":"jeffy <jeffy.chen@rock-chips.com>","User-Agent":"Mozilla/5.0 (X11; Linux x86_64;\n\trv:19.0) Gecko/20130126 Thunderbird/19.0","MIME-Version":"1.0","To":"Bjorn Helgaas <helgaas@kernel.org>","Subject":"Re: [PATCH v5 1/3] PCI: rockchip: Add support for pcie wake irq","References":"<20170911151029.25185-1-jeffy.chen@rock-chips.com>\n\t<20170911151029.25185-2-jeffy.chen@rock-chips.com>\n\t<20171013030441.GA25517@bhelgaas-glaptop.roam.corp.google.com>\n\t<2453698.N4jfPaHx71@aspire.rjw.lan> <59E10709.4020300@rock-chips.com>\n\t<20171013191906.GF25517@bhelgaas-glaptop.roam.corp.google.com>","In-Reply-To":"<20171013191906.GF25517@bhelgaas-glaptop.roam.corp.google.com>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20171013_122646_387203_B2E8053F ","X-CRM114-Status":"GOOD (  10.15  )","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno trust [211.150.99.137 listed in list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Heiko Stuebner <heiko@sntech.de>, linux-pm@vger.kernel.org,\n\tTony Lindgren <tony@atomide.com>, linux-pci@vger.kernel.org,\n\tshawn.lin@rock-chips.com, briannorris@chromium.org,\n\t\"Rafael J. Wysocki\" <rjw@rjwysocki.net>, linux-kernel@vger.kernel.org,\n\tdianders@chromium.org, linux-rockchip@lists.infradead.org,\n\tbhelgaas@google.com, linux-arm-kernel@lists.infradead.org","Content-Transfer-Encoding":"7bit","Content-Type":"text/plain; charset=\"us-ascii\"; Format=\"flowed\"","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1786658,"web_url":"http://patchwork.ozlabs.org/comment/1786658/","msgid":"<20171013204358.GA3585@google.com>","list_archive_url":null,"date":"2017-10-13T20:44:00","subject":"Re: [PATCH v5 1/3] PCI: rockchip: Add support for pcie wake irq","submitter":{"id":67074,"url":"http://patchwork.ozlabs.org/api/people/67074/","name":"Brian Norris","email":"briannorris@chromium.org"},"content":"Hi,\n\nOn Fri, Oct 13, 2017 at 02:19:06PM -0500, Bjorn Helgaas wrote:\n> On Sat, Oct 14, 2017 at 02:33:45AM +0800, jeffy wrote:\n> > Hi Rafael,\n> > \n> > On 10/13/2017 09:21 PM, Rafael J. Wysocki wrote:\n> > >>\n> > >>I'm a little skeptical about dev_pm_set_dedicated_wake_irq(), not\n> > >>because I know anything at all about it, but because there are only\n> > >>five callers in the whole tree, three of which are in UART code, and\n> > >>none in anything resembling PCI code.\n> > >>\n> > >>Is Rockchip really that special, or are we going about this the wrong\n> > >>way?\n> > \n> > we used to put these codes in the wifi driver, but another wifi\n> > vendor suggests these should go into the pcie driver.\n> > \n> > and as tony said, it could go into pcie common code :)\n> \n> I guess the implication (I'm speculating here) is that in most\n> existing cases, the WAKE# signal is fielded by an ACPI BIOS, which\n> knows how it's connected.  I suppose that would end up being turned\n> into an SCI that Linux already knows how to handle generically.\n\nI wasn't sure how ACPI did this when I first suggested Rockchip take\nthis approach, but since then I believe have figured it out. We have:\n\npci_prepare_to_sleep() -> pci_enable_wake()\n\nwhere pci_enable_wake() will configure PME wakeup and/or \"platform\" wake\n(which presumably is the WAKE# signal). pci-acpi.c has registered hooks\nfor the latter via pci_set_platform_pm().\n\nThis doesn't really make it any more generic for discovering this\nplatform-specific detail. We'd have to set up some kind of platform ops\nthat could be shared for any DT-based platforms.\n\nBut that *does* answer the question I had about conditionality: should\nwe always enable WAKE# for platforms that have the pin hooked up to the\nhost? Or is this configured on a per-device basis? IIUC, the intention\nis that there's only a single open-drain WAKE# pin for the whole system,\nand it's just pulled high for EPs that don't implement it.\n\n> And further, that the non-ACPI drivers are relatively new and you're\n> the first attempt to use WAKE# with a non-ACPI PCI host driver?\n\nQuite possibly. Or everyone just sidestepped this an configured the pin\nelsewhere (e.g., you could stick a GPIO like this into a gpio-keys\ndevice and it would mostly work).\n\n> If this setup could be done somewhere in PCIe common code, that would\n> be great.  We have so much copy and pasted code already, it'd be nice\n> to avoid adding more.  I don't know if this would fit in\n> pci_scan_root_bus_bridge(), doing something like dma_configure() does\n> to get hold of a struct platform_device * or a struct device * so you\n> could lookup the IRQ?\n\nIt looks like the infrastructure is in pci_set_platform_pm(), sort of.\nBut that still doesn't help you for the repetition; you're just lucky\nyou only have 2 controller drivers that call this right now :)\n\nSide note: there's some dissonance between this statement, in\nDocumentation/driver-api/pm/devices.rst:\n\n\"Device drivers, however, are not expected to call\n:c:func:`device_set_wakeup_enable()` directly in any case.\"\n\nYet:\n\n$ git grep -l device_set_wakeup_enable drivers/ | wc -l\n69\n\nAnd particularly, I believe that was necessary for Wifi drivers like\ndrivers/net/wireless/ath/ath10k/wow.c.\n\nBrian","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"e3Nfp6Lr\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"TEmShPQd\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yDKTD2Tf2z9sxR\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tSat, 14 Oct 2017 07:44:32 +1100 (AEDT)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e36om-0000VK-Tj; Fri, 13 Oct 2017 20:44:28 +0000","from mail-pf0-x22e.google.com ([2607:f8b0:400e:c00::22e])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e36oh-0000TG-RY for linux-arm-kernel@lists.infradead.org;\n\tFri, 13 Oct 2017 20:44:26 +0000","by mail-pf0-x22e.google.com with SMTP id l188so11264717pfc.6\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tFri, 13 Oct 2017 13:44:03 -0700 (PDT)","from google.com ([2620:0:1000:1600:55ef:4ed7:1a34:623c])\n\tby smtp.gmail.com with ESMTPSA id\n\td76sm4181851pfk.69.2017.10.13.13.44.01\n\t(version=TLS1_2 cipher=AES128-SHA bits=128/128);\n\tFri, 13 Oct 2017 13:44:02 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:\n\tMessage-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=WFZDM005xT4aYpn2e6vfUum1EKrIqtxViNeyRb8yL/U=;\n\tb=e3Nfp6LrB4Dd6H\n\tWKE8xAoH1/GaAJ9hIvBvmpVss+pTx1kSxozLXounEkJ0+QRWU9VJ+YIzxhchUK8/ghA6pxnSIRicd\n\tHhOlpC4QfaTmkPk0gW9PX2RrANVabZ39KDQGe54Q47Rjpys3wMPvdeJZuH9k1qrYIcXG1O/UunLkn\n\tn0ld+ia2MGu00FGD1ihEExyNrXWG+8Sp1Ot/+DCTmJrXyS9jPOQAZG5QM77yGCHsLzaHOaaR4VbnW\n\tln6nkbVQzDlPdyiz6PuAGG+eSD1Q6w8sbqhMy0j0xq2rRp/YiDHgiHUxZNRd+LfScIwQttJEgtapM\n\tfEOwdQxQKJMU0dfwCw6g==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=5n6/PRpFHsfaeG25+AwAJUP8g3/UHWf5K7kb1DJZ4RU=;\n\tb=TEmShPQdOVIikqYy/jW93GuXJv+zLfInryNnQ5/6DRq8jZAYYFGMlZBV2/Pz6i/h4K\n\t4luawcRDpnavH2KLuJCuGihbWdZ+HUtBnLdJGFbpHng1GqvqbXTd8TECyqJFE5VEGW3Z\n\txBI/Ah2SpGLK1ZjZ86IxX7+E9Jix6+HXv6bD0="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=5n6/PRpFHsfaeG25+AwAJUP8g3/UHWf5K7kb1DJZ4RU=;\n\tb=D2EC+ChDxvULqpQFJM9f2uZLqs9Fcs/HdZ1C99xaDwRaVurvzjXQD2pk72XoR2IeFf\n\tgwuvfBR05MuxvQA64oXBd9DLBm1p1ylbgfCIDJ5LIldrjUeap07l7Kd/L+TZ+n47kItq\n\t4OajOxFPFxrQ2yC7G42AFWRIYVo4PdY2ljawntUuVrGvlU47vOTw7b/DU6RiVIk8CNCA\n\tXdMr9DecCXo7MdEyavGLtLQItlSNdl28h1z/oDoIckwXnNd7PtBeDK+0nht/2iexmyoM\n\touCFf73ggbA0LrnztvDtFWvACRXHwaGjl6rMP9JI0v00/Gb+/o9fCYy4gZxeTFXL+SzR\n\tV0nQ==","X-Gm-Message-State":"AMCzsaW2BbaRQ3OCvMFkNsqoNg+c+KTZneFJvw0bbMEv5bA1c/kko5uy\n\tNIQjWj89WRCbSUOD4z8choRYMA==","X-Google-Smtp-Source":"AOwi7QBO9nhRv/nZ7oRLrXr0gxfI8rvWIONTzDuDgWBxXQIJ6O79Izpps11SZDfGXPg8C0gg6NAqxg==","X-Received":"by 10.99.110.7 with SMTP id j7mr720175pgc.241.1507927442950;\n\tFri, 13 Oct 2017 13:44:02 -0700 (PDT)","Date":"Fri, 13 Oct 2017 13:44:00 -0700","From":"Brian Norris <briannorris@chromium.org>","To":"Bjorn Helgaas <helgaas@kernel.org>","Subject":"Re: [PATCH v5 1/3] PCI: rockchip: Add support for pcie wake irq","Message-ID":"<20171013204358.GA3585@google.com>","References":"<20170911151029.25185-1-jeffy.chen@rock-chips.com>\n\t<20170911151029.25185-2-jeffy.chen@rock-chips.com>\n\t<20171013030441.GA25517@bhelgaas-glaptop.roam.corp.google.com>\n\t<2453698.N4jfPaHx71@aspire.rjw.lan>\n\t<59E10709.4020300@rock-chips.com>\n\t<20171013191906.GF25517@bhelgaas-glaptop.roam.corp.google.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20171013191906.GF25517@bhelgaas-glaptop.roam.corp.google.com>","User-Agent":"Mutt/1.5.21 (2010-09-15)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20171013_134423_933916_651C944D ","X-CRM114-Status":"GOOD (  23.09  )","X-Spam-Score":"-2.0 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.0 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno\n\ttrust [2607:f8b0:400e:c00:0:0:0:22e listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Heiko Stuebner <heiko@sntech.de>, linux-pm@vger.kernel.org,\n\tTony Lindgren <tony@atomide.com>, linux-pci@vger.kernel.org,\n\tshawn.lin@rock-chips.com, jeffy <jeffy.chen@rock-chips.com>,\n\t\"Rafael J. Wysocki\" <rjw@rjwysocki.net>, linux-kernel@vger.kernel.org,\n\tdianders@chromium.org, linux-rockchip@lists.infradead.org,\n\tbhelgaas@google.com, linux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}}]