Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932076Ab3HWTuA (ORCPT ); Fri, 23 Aug 2013 15:50:00 -0400 Received: from avon.wwwdotorg.org ([70.85.31.133]:60679 "EHLO avon.wwwdotorg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754474Ab3HWTt6 (ORCPT ); Fri, 23 Aug 2013 15:49:58 -0400 Message-ID: <5217BCE1.4080101@wwwdotorg.org> Date: Fri, 23 Aug 2013 13:49:53 -0600 From: Stephen Warren User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8 MIME-Version: 1.0 To: Linus Walleij CC: Tomasz Figa , Lars Poeschel , Lars Poeschel , Grant Likely , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , Mark Rutland , Ian Campbell , Kumar Gala , Pawel Moll , Javier Martinez Canillas , Enric Balletbo i Serra , Jean-Christophe PLAGNIOL-VILLARD , Santosh Shilimkar , Kevin Hilman , Balaji T K , Tony Lindgren , Jon Hunter Subject: Re: [PATCH v2] gpio: interrupt consistency check for OF GPIO IRQs References: <1377092334-770-1-git-send-email-larsi@wh2.tu-dresden.de> <1507189.CRWvzVJqTV@flatron> <521548E3.6010703@wwwdotorg.org> <52167A35.2010109@wwwdotorg.org> In-Reply-To: X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1682 Lines: 37 On 08/23/2013 12:38 PM, Linus Walleij wrote: > On Thu, Aug 22, 2013 at 10:53 PM, Stephen Warren wrote: >> On 08/21/2013 05:27 PM, Linus Walleij wrote: >>> On Thu, Aug 22, 2013 at 1:10 AM, Stephen Warren wrote: >>>>> On Wednesday 21 of August 2013 15:38:54 Lars Poeschel wrote: >>> >>>>>> To solve this dilemma, perform an interrupt consistency check >>>>>> when adding a GPIO chip: if the chip is both gpio-controller and >>>>>> interrupt-controller, walk all children of the device tree, >>>> >>>> It seems a little odd to solve this only for DT. What about the non-DT case? >>> >>> DT is the hardware configuration system that lets you request >>> the same resource in two ways, i.e. it allows one and the same >>> node to be both gpio-controller and interrupt-controller, and >>> start handing out the same line as both GPIO and IRQ >>> independently. >> >> Huh? What stops systems using board files and platform data from having >> this issue? > > It can't be stopped but I consider it a bug if they do, as the proper > way to handle such GPIO lines is the sequence: > > request_gpio(gpio); > request_irq(gpio_to_irq(gpio)); Back in the old days of ARM board files, there were many boards that didn't do this. I guess that doesn't make it any less of a bug, but it certainly implies to me that solving this in a way that caters to that bug being present will be a lot more useful. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/