[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091215204457.GM24406@elf.ucw.cz>
Date: Tue, 15 Dec 2009 21:44:57 +0100
From: Pavel Machek <pavel@....cz>
To: Ryan Mallon <ryan@...ewatersys.com>
Cc: H Hartley Sweeten <hartleys@...ionengravers.com>,
Daniel Walker <dwalker@...eaurora.org>,
Iliyan Malchev <malchev@...gle.com>,
Brian Swetland <swetland@...gle.com>,
kernel list <linux-kernel@...r.kernel.org>,
Arve Hj?nnev?g <arve@...roid.com>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>
Subject: Re: GPIO support for HTC Dream
On Wed 2009-12-16 09:24:21, Ryan Mallon wrote:
> Pavel Machek wrote:
> > Hi!
> >
> >>> +int gpio_to_irq(unsigned gpio)
> >>> +{
> >>> + return -EINVAL;
> >>> +}
> >> This should probably just be an inline function in
> >> arch/arm/mach-msm/include/mach/gpio.h
> >
> > Well, it is not performance critical in any way and it is likely to
> > change in future. I'd leave it here.
>
> If this function eventually does do something interesting, it would be
> useful to have it as a macro in arch/arm/mach-msm/include/mach/gpio.h
> since it can be used for static/define declarations, ie:
>
> #define SOME_GPIO_IRQ gpio_to_irq(SOME_GPIO)
gpio_to_irq is defined as a function in Doc*/gpio.txt.
> >> static inline int irq_to_gpio(unsigned irq)
> >> {
> >> return -EINVAL;
> >> }
> >
> > I'd say that would be overdoing it.
>
> You should implement this if you have gpio_to_irq because it is part of
> the API, see include/linux/gpio.h
I'm implementing it. I just don't want to implement two inline
functions instead of one normal function.
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists