Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5551926rdb; Wed, 13 Dec 2023 11:57:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IE/4LtiObjgo1fTBOk8Mkw2Y5OKs9SVrBOnQPC1mF40HIHeA0/rOqnH2lsoHMHgdOMecEUz X-Received: by 2002:a05:6a20:258b:b0:190:8c90:c310 with SMTP id k11-20020a056a20258b00b001908c90c310mr3927431pzd.42.1702497475145; Wed, 13 Dec 2023 11:57:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702497475; cv=none; d=google.com; s=arc-20160816; b=OJSnVKWY95MdsRrhY/icTfJBQH1O8CI4QMK3VuH2ZYpk5Gbp4N+hDwoL9fzLNTcpC+ w8EkYjtVqDdKruqFtdSovs44CqrjD2THXkC/33Tjqg1MmvZdJ4ntGstjbX3JC0/cC35q 3qhTXNkkFOp9vGAaIcRYqnbR0ipghCojqJ885L1aXi9wPXgbfQQ/3xph5RS6CuwY7tJv ++cWGE/wSmJp9PGDbj0HJ5ZAQ3vYIdTQ11mnOoOL6MiUlW231n2D5K/+gfB1cMiLjv1R HeOZDiR2lxN91/7cLmIEOPqciJThWFglSLjD2QjnAvdsSEad8xRoUdPyjwVZxnoRje1N uYXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=JdX4FwvuyD3xpGPCJBRxqmCkTEDQvcJ1LWObv14mXbw=; fh=yGV7T04G2/t2nC5LA4OFsdUrepO6lAio3emsLRImu3g=; b=a0v1fsNQkp3I9xqDrysoz0cNQU6XQn+LOv3R1I5yhmnoiJ+40Iw0qoTUZl4s2LGwJY 9MzYxk4J1uonFXWDOtc4kei7kdu3MhkjZPuqSiH/xbxch1xxdC9oB+0f4/o9g2EPCe30 vbSPoTKk3Jk/JOZ7ABRQZTfKL1tKyIJ93UJQvWuU3UXAnsNB6tv3YyHh6Ye+yfeF3Y5r BG9qvh7z/KRbDYnyh2kZnOt2cgC2WsvdLp30zExbpqTa341cT4mUjKCTM3Peph7BuLbF hU1nmDDLSbbXYbm64A25OGkB1iP55pO9KNg5FdBSrBCr4n48Vql1WEBdGS+zO3ZB1YAl 0E5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="T/X7bD8J"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id n190-20020a6327c7000000b00589fcc39ef1si10346843pgn.365.2023.12.13.11.57.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 11:57:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="T/X7bD8J"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id A81BB80BEF1F; Wed, 13 Dec 2023 11:57:52 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377931AbjLMT5k (ORCPT + 99 others); Wed, 13 Dec 2023 14:57:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229811AbjLMT5j (ORCPT ); Wed, 13 Dec 2023 14:57:39 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6BAFDD for ; Wed, 13 Dec 2023 11:57:45 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F1EAC433C8; Wed, 13 Dec 2023 19:57:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702497465; bh=nI+LIVGF1GW7NDDMlrV2VjRUQx18LLMDaUCPSY9bsk4=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=T/X7bD8Jdh2xNZJR9uEBE9z06LT3goHniJiJc9mJdPPiqHfM0zJc7/DNwrRy9wZiH 8rhNzHcJ6SZLYAP9uK2URisV21Mii3Zpo+2Z0FjpDu9HhrSvP+lxHe8o440jLyHuuR 6YTkIpYoySP0HztG3rLgKwr0gsOxJrlf8QCUDD6YsNFwrInY6yiM3VHhBCqmm4cy70 OtFEl4RuQNBLI4qB5J/QPoRjSiuaFAkRYXGSb2+fCZ+vximrVbCW00AGuHpZYMaBEZ j4+mT9CVm4BeHJ4rojA7e6HpiGKA/78QeRW5Jh8UR/EHwgSdNhYs/wkwLFCzbDhGok kqw5LVzRREbkQ== Date: Wed, 13 Dec 2023 13:57:43 -0600 From: Bjorn Helgaas To: Sherry Sun Cc: hongxing.zhu@nxp.com, l.stach@pengutronix.de, lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V2 1/4] PCI: imx6: Add pci host wakeup support on imx platforms. Message-ID: <20231213195743.GA1055303@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231213092850.1706042-2-sherry.sun@nxp.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 13 Dec 2023 11:57:52 -0800 (PST) Drop period at the end of subject line. It only adds the possibility of unnecessary line wrapping in git log. On Wed, Dec 13, 2023 at 05:28:47PM +0800, Sherry Sun wrote: > Add pci host wakeup feature for imx platforms. s/pci/PCI/ s/imx/i.MX/ (based on how nxp.com web pages refer to it) > Example of configuring the corresponding dts property under the PCI > node: > wake-gpios = <&gpio5 21 GPIO_ACTIVE_LOW>; Add newline between paragraphs or wrap into a single paragraph. > + /* host wakeup support */ > + imx6_pcie->host_wake_irq = -1; AFAIK, 0 is an invalid IRQ value. So why not drop this assignment since imx6_pcie->host_wake_irq is 0 by default since it was allocated with devm_kzalloc(), and test like this elsewhere: if (imx6_pcie->host_wake_irq) { enable_irq_wake(imx6_pcie->host_wake_irq) > + host_wake_gpio = devm_gpiod_get_optional(dev, "wake", GPIOD_IN); > + if (IS_ERR(host_wake_gpio)) > + return PTR_ERR(host_wake_gpio); > + > + if (host_wake_gpio != NULL) { if (host_wake_gpio) Bjorn