lkml.org 
[lkml]   [2009]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: GPIO support for HTC Dream
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 <hsweeten@visionengravers.com>
> >
> > 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


\
 
 \ /
  Last update: 2009-12-15 21:51    [W:0.710 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site