From mboxrd@z Thu Jan 1 00:00:00 1970 From: "George G. Davis" Subject: Re: [PATCH] net: fec: dt: convert phy-reset-gpios to use GPIOD API Date: Tue, 31 May 2016 14:33:01 -0400 Message-ID: <20160531183301.GA56552@gandalf.middle.earth.net> References: <1464715071-56012-1-git-send-email-george_davis@mentor.com> <20160531182450.GA20696@gandalf.middle.earth.net> <20160531182642.GY19428@n2100.arm.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Return-path: Received: from relay1.mentorg.com ([192.94.38.131]:46685 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755738AbcEaSdD (ORCPT ); Tue, 31 May 2016 14:33:03 -0400 Content-Disposition: inline In-Reply-To: <20160531182642.GY19428@n2100.arm.linux.org.uk> Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org To: Russell King - ARM Linux Cc: Fabio Estevam , "linux-gpio@vger.kernel.org" , linux-kernel , "devicetree@vger.kernel.org" , "netdev@vger.kernel.org" , Fugang Duan , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Shawn Guo , Sascha Hauer , Linus Walleij , Alexandre Courbot Hello Russell, On Tue, May 31, 2016 at 07:26:42PM +0100, Russell King - ARM Linux wrote: > On Tue, May 31, 2016 at 02:24:50PM -0400, George G. Davis wrote: > > Hello Fabio, > > > > On Tue, May 31, 2016 at 02:26:54PM -0300, Fabio Estevam wrote: > > > On Tue, May 31, 2016 at 2:17 PM, George G. Davis > > > wrote: > > > > Convert the i.MX FEC driver and DT files to use the GPIOD API > > > > which automatically handles GPIO polarity. > > > > > > > > Signed-off-by: George G. Davis > > > > > > In order to avoid breaking old dtb's a property called > > > 'phy-reset-active-high' has been introduced. > > > > > > Check: 962d8cdc3133435a ("net: fec: Rename "phy-reset-active-low" > > > property") and 64f10f6ebf5a6d3ae ("net: fec: Add > > > "phy-reset-active-low" property to DT"). > > > > The GPIOD API handles GPIO active assertion levels as defined by the > > DT binding. So the phy-reset-active-high and/or phy-reset-active-low > > property is not needed when using the GPIOD API - just define > > GPIO_ACTIVE_LOW or GPIO_ACTIVE_HIGH as required for the board and the > > GPIOD API will handle active assert/deassert level as needed. > > You must retain compatibility with _existing_ DT files. Hence, > while you can convert to using the gpiod API, you still need to > be compatible with the old way of specifying this - iow, you must > support the old properties in the code. Sigh, thanks for the ClueBat. Got it. I'll rework the patch to retain compatibility with existing DT files. -- Regards, George