From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabio Estevam Subject: Re: [PATCH 2/2] PCI: imx6: Add reset-gpio-active-high boolean property to DT Date: Tue, 5 Apr 2016 12:46:53 -0300 Message-ID: References: <1459514508-8557-1-git-send-email-ynezz@true.cz> <1459514508-8557-3-git-send-email-ynezz@true.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <1459514508-8557-3-git-send-email-ynezz-knWk7/PSn+s@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: =?UTF-8?Q?Petr_=C5=A0tetiar?= Cc: "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" , Russell King , Kumar Gala , Ian Campbell , Mark Rutland , Pawel Moll , Rob Herring , Sascha Hauer , Shawn Guo , Richard Zhu , Lucas Stach , Bjorn Helgaas , "linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Tim Harvey , =?UTF-8?Q?Krzysztof_Ha=C5=82asa?= , Marcel Ziswiler , Stefan Agner List-Id: devicetree@vger.kernel.org On Fri, Apr 1, 2016 at 9:41 AM, Petr =C5=A0tetiar wrote= : > /* Some boards don't have PCIe reset GPIO. */ > if (gpio_is_valid(imx6_pcie->reset_gpio)) { > - gpio_set_value_cansleep(imx6_pcie->reset_gpio, 0); > + gpio_set_value_cansleep(imx6_pcie->reset_gpio, > + !!imx6_pcie->gpio_active_high= ); gpio_set_value_cansleep(imx6_pcie->reset_gpio, imx6_pcie->gpio_active_high); is = enough. > @@ -546,9 +549,14 @@ static int __init imx6_pcie_probe(struct platfor= m_device *pdev) > > /* Fetch GPIOs */ > imx6_pcie->reset_gpio =3D of_get_named_gpio(np, "reset-gpio",= 0); > + imx6_pcie->gpio_active_high =3D of_property_read_bool(np, > + "reset-gpio-active-hi= gh"); You need to document reset-gpio-active-high property in Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt. -- To unsubscribe from this list: send the line "unsubscribe devicetree" i= n the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html