Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933242AbZLOUr7 (ORCPT ); Tue, 15 Dec 2009 15:47:59 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932305AbZLOUr6 (ORCPT ); Tue, 15 Dec 2009 15:47:58 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:53270 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755117AbZLOUr4 (ORCPT ); Tue, 15 Dec 2009 15:47:56 -0500 Date: Tue, 15 Dec 2009 21:47:48 +0100 From: Pavel Machek To: H Hartley Sweeten Cc: Ryan Mallon , Daniel Walker , Iliyan Malchev , Brian Swetland , kernel list , Arve Hj?nnev?g , linux-arm-kernel Subject: Re: GPIO support for HTC Dream Message-ID: <20091215204748.GN24406@elf.ucw.cz> References: <4B203575.6050407@bluewatersys.com> <20091210172458.GJ19454@elf.ucw.cz> <4B2150B7.3040207@bluewatersys.com> <20091211221015.GB24456@elf.ucw.cz> <20091214064545.GK5114@elf.ucw.cz> <20091215194725.GH24406@elf.ucw.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Warning: Reading this can be dangerous to your mental health. User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1771 Lines: 49 Hi! > >> For completeness you should probably also add: > >> > >> static inline int irq_to_gpio(unsigned irq) > >> { > >> return -EINVAL; > >> } > > > > I'd say that would be overdoing it. > > I only mentioned that one because it is one of the functions listed in > Documentation/gpio.txt. I'm not sure if that means it's "required". You > make the call... Aha, sorry, I misparsed that. There's gpio_to_irq and irq_to_gpio. One does not seem to be required; as I'm stubbing the other one, I'd prefer to leave it alone. > >> Otherwise, looks good to me. Just test it to make sure it works :-). > >> > >> Since I have no way of compiling or testing this... > >> > >> Reviewed-by: H Hartley Sweeten > > > > I believe inlining that function would be bad change. Can I still use > > reviewed-by tag? > > The reason I suggest making it an inline in the header is you might > eventually want to change both gpio_to_irq and irq_to_gpio into macros > so that they can be used for static initializers. For right now both > are simple return -EINVAL but when gpio irq's are supported you might > find a need to use one or the other in a platform init... According to gpio.txt, those are functions, not macros... and I actually prefer functions, as they are harder to misuse. > Regardless, yes you can still use my reviesed-by tag. Thanks. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- 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/