From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Subject: Re: [PATCH 3/5] gpio/omap: Add DT support to GPIO driver Date: Mon, 15 Apr 2013 10:53:10 -0600 Message-ID: <516C3076.3000107@wwwdotorg.org> References: <1329321854-24490-1-git-send-email-b-cousson@ti.com> <512D39DA.7020306@ti.com> <512D3AB1.1080202@wwwdotorg.org> <512D3EC2.6050408@ti.com> <20130302200524.D230F3E1571@localhost> <51391F41.5000303@ti.com> <514C79E1.4090106@wwwdotorg.org> <514CE0AB.6060207@ti.com> <515319D5.20105@wwwdotorg.org> <5155C902.7080207@wwwdotorg.org> <5165CB9D.1090202@wwwdotorg.org> <51671D7B.50603 03@wwwdotorg.org> <51673D70.3010503@wwwdotorg.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-omap-owner@vger.kernel.org To: Javier Martinez Canillas Cc: Linus Walleij , Jon Hunter , Grant Likely , Alexandre Courbot , Stephen Warren , Kevin Hilman , "devicetree-discuss@lists.ozlabs.org" , "linux-omap@vger.kernel.org" , Tarun Kanti DebBarma , "linux-arm-kernel@lists.infradead.org" List-Id: devicetree@vger.kernel.org On 04/13/2013 07:35 PM, Javier Martinez Canillas wrote: ... > Is the following inlined patch [1] what you were thinking that would > be the right approach? ... > diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c ... > +static int omap_gpio_irq_request(struct irq_data *d) > +{ > + struct gpio_bank *bank = irq_data_get_irq_chip_data(d); > + > + return omap_gpio_request(&bank->chip, d->hwirq); If you want the GPIO usage to be known to the GPIO subsystem, then wouldn't you call gpio_request() here rather than omap_gpio_request()? The above code will certainly do enough so that the OMAP GPIO HW is fully enabled as you need, but I thought the idea was to also prevent some other code successfully running gpio_request() on that same GPIO?