Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755656Ab2HJImE (ORCPT ); Fri, 10 Aug 2012 04:42:04 -0400 Received: from mail-vc0-f174.google.com ([209.85.220.174]:46692 "EHLO mail-vc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752606Ab2HJIl6 (ORCPT ); Fri, 10 Aug 2012 04:41:58 -0400 MIME-Version: 1.0 In-Reply-To: <20120810083508.GA16251@avionic-0098.mockup.avionic-design.de> References: <1343044770-6591-1-git-send-email-thierry.reding@avionic-design.de> <20120809202054.GA24503@avionic-0098.mockup.avionic-design.de> <20120810083508.GA16251@avionic-0098.mockup.avionic-design.de> Date: Fri, 10 Aug 2012 10:41:58 +0200 Message-ID: Subject: Re: [PATCH v2] gpio: Add Avionic Design N-bit GPIO expander support From: Linus Walleij To: Thierry Reding , Russell King - ARM Linux Cc: Grant Likely , Arnd Bergmann , linux-kernel@vger.kernel.org, devicetree-discuss@lists.ozlabs.org, Linus Walleij , Rob Herring , Wolfram Sang Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1871 Lines: 51 On Fri, Aug 10, 2012 at 10:35 AM, Thierry Reding wrote: >> Consult the following article on LWN: >> http://lwn.net/Articles/470820/ >> >> Then grep your gitlog and you'll see we got rid of it from ARM. > > Then why is there still the following in arch/arm/include/asm/irq.h? > > /* > * Use this value to indicate lack of interrupt > * capability > */ > #ifndef NO_IRQ > #define NO_IRQ ((unsigned int)(-1)) > #endif That's a question for Russell but I think it's basically there for old platforms, on a "don't use it"-basis. (Maybe a comment could be good.) As you see non-sparse platforms can redefine NO_IRQS in their file, but in practice things like the VIC and GIC drivers have been switched over to using irqdomain which in turn does *not* allow IRQ 0 to be used, so most platforms are indirectly disallowed to use IRQ 0 anyway. In fact I think some of them are just broken now. >> If this driver is for some other arch like openrisc I might accept >> it but please reconsider. > > There's nothing in the driver that makes it ARM specific, so it could be > used on other platforms just as well. The linked article makes it clear that the direction for the entire kernel is to get rid of NO_IRQ and !irq is used all over the place. > But as I also said in my previous > mail, in this particular case the value for the interrupt comes from the > call to irq_of_parse_and_map(), which will return 0 on failure, > regardless of the architecture, so there is actually no problem. OK cool. Yours, Linus Walleij -- 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/