From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Walleij Subject: Re: [RFC PATCH 0/3] If an IRQ is a GPIO, request and configure it Date: Fri, 5 Aug 2011 22:25:55 +0200 Message-ID: References: <1312498820-2275-1-git-send-email-swarren@nvidia.com> <20110805094017.GC20575@n2100.arm.linux.org.uk> <20110805103045.GG28651@trinity.fluff.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <20110805103045.GG28651@trinity.fluff.org> Sender: linux-mmc-owner@vger.kernel.org To: Ben Dooks Cc: Russell King - ARM Linux , Stephen Warren , alsa-devel@alsa-project.org, Mark Brown , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, ccross@android.com, olof@lixom.net, Thomas Gleixner , Chris Ball , Liam Girdwood , linux-arm-kernel@lists.infradead.org List-Id: linux-tegra@vger.kernel.org On Fri, Aug 5, 2011 at 12:30 PM, Ben Dooks wrote: > On Fri, Aug 05, 2011 at 10:40:17AM +0100, Russell King - ARM Linux wr= ote: >> Trying to go from IRQ to GPIO is not a good idea - most of the >> IRQ <-> GPIO macros we have today are just plain broken. =A0Many of = them >> just add or subtract a constant, which means non-GPIO IRQs have an >> apparant GPIO number too. =A0Couple this with the fact that all posi= tive >> GPIO numbers are valid, and this is a recipe for wrong GPIOs getting >> used and GPIOs being requested for non-GPIO IRQs. > > Yes, and there's a pile without these defined/ And I'm piling a few patches *deleting* irq_to_gpio() from platforms th= at define but actually don't use it, like U300 and SA1100. Linus Walleij From mboxrd@z Thu Jan 1 00:00:00 1970 From: linus.walleij@linaro.org (Linus Walleij) Date: Fri, 5 Aug 2011 22:25:55 +0200 Subject: [RFC PATCH 0/3] If an IRQ is a GPIO, request and configure it In-Reply-To: <20110805103045.GG28651@trinity.fluff.org> References: <1312498820-2275-1-git-send-email-swarren@nvidia.com> <20110805094017.GC20575@n2100.arm.linux.org.uk> <20110805103045.GG28651@trinity.fluff.org> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Fri, Aug 5, 2011 at 12:30 PM, Ben Dooks wrote: > On Fri, Aug 05, 2011 at 10:40:17AM +0100, Russell King - ARM Linux wrote: >> Trying to go from IRQ to GPIO is not a good idea - most of the >> IRQ <-> GPIO macros we have today are just plain broken. ?Many of them >> just add or subtract a constant, which means non-GPIO IRQs have an >> apparant GPIO number too. ?Couple this with the fact that all positive >> GPIO numbers are valid, and this is a recipe for wrong GPIOs getting >> used and GPIOs being requested for non-GPIO IRQs. > > Yes, and there's a pile without these defined/ And I'm piling a few patches *deleting* irq_to_gpio() from platforms that define but actually don't use it, like U300 and SA1100. Linus Walleij