From: pavel@ucw.cz (Pavel Machek)
To: linux-arm-kernel@lists.infradead.org
Subject: GPIO support for HTC Dream
Date: Tue, 15 Dec 2009 20:47:25 +0100 [thread overview]
Message-ID: <20091215194725.GH24406@elf.ucw.cz> (raw)
In-Reply-To: <BD79186B4FD85F4B8E60E381CAEE19090200E9E6@mi8nycmail19.Mi8.com>
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.
> > diff --git a/arch/arm/mach-msm/board-dream.h b/arch/arm/mach-msm/board-dream.h
> > index 4f345a5..dbd78b9 100644
> > --- a/arch/arm/mach-msm/board-dream.h
> > +++ b/arch/arm/mach-msm/board-dream.h
> > @@ -1,5 +1,58 @@
> >
> > -#define TROUT_CPLD_BASE 0xE8100000
> > -#define TROUT_CPLD_START 0x98000000
> > -#define TROUT_CPLD_SIZE SZ_4K
> > +#define MSM_SMI_BASE 0x00000000
> > +#define MSM_SMI_SIZE 0x00800000
...
> > +#define DREAM_CPLD_BASE 0xE8100000
> > +#define DREAM_CPLD_START 0x98000000
> > +#define DREAM_CPLD_SIZE SZ_4K
> > +
>
> This header might need to be a separate patch. The only thing in it
> related to the rest of this is DREAM_CPLD_BASE.
Yep.
> > +#ifndef __ASM_ARCH_MSM_GPIO_H
> > +#define __ASM_ARCH_MSM_GPIO_H
> > +
> > +extern int gpio_to_irq(unsigned gpio);
>
> This should probably be an inline as mentioned above.
>
> 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.
> And, nitpick, move both of them after the gpio_cansleep below.
I'll do the move.
> > +#define DREAM_GPIO_CABLE_IN1 (83)
> > +#define DREAM_GPIO_CABLE_IN2 (49)
> > +
> > +#define DREAM_GPIO_START (128)
>
> Nitpick. Tab align these three with the ones below.
Ok.
> > +#define DREAM_GPIO_SDMC_CD_N (DREAM_GPIO_VIRTUAL_BASE + 0)
> > +#define DREAM_GPIO_END (DREAM_GPIO_SDMC_CD_N)
> > +#define DREAM_GPIO_BANK1_FIRST_INT_SOURCE (DREAM_GPIO_SDMC_CD_N)
> > +#define DREAM_GPIO_BANK1_LAST_INT_SOURCE (DREAM_GPIO_SDMC_CD_N)
> > +
> > +#endif
>
> 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?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2009-12-15 19:47 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-08 10:28 GPIO support for HTC Dream Pavel Machek
2009-12-08 20:22 ` Ryan Mallon
2009-12-08 21:37 ` Pavel Machek
2009-12-08 21:53 ` Ryan Mallon
2009-12-10 16:26 ` Pavel Machek
2009-12-08 21:56 ` Arve Hjønnevåg
2009-12-09 11:32 ` Pavel Machek
2009-12-08 21:46 ` Pavel Machek
2009-12-08 22:03 ` Joe Perches
2009-12-09 11:46 ` Pavel Machek
2009-12-08 22:10 ` Ryan Mallon
2009-12-09 23:40 ` Ryan Mallon
2009-12-10 17:24 ` Pavel Machek
2009-12-10 17:41 ` Mark Brown
2009-12-10 19:49 ` Ryan Mallon
2009-12-10 23:14 ` H Hartley Sweeten
2009-12-11 19:58 ` Pavel Machek
2009-12-11 22:10 ` Pavel Machek
2009-12-11 22:40 ` Arve Hjønnevåg
2009-12-11 23:12 ` H Hartley Sweeten
2009-12-16 22:53 ` Pavel Machek
2009-12-16 23:03 ` Daniel Walker
2009-12-11 23:04 ` H Hartley Sweeten
2009-12-14 6:45 ` Pavel Machek
2009-12-14 17:54 ` Daniel Walker
2009-12-14 18:12 ` H Hartley Sweeten
2009-12-15 6:40 ` Arve Hjønnevåg
2009-12-15 19:12 ` Pavel Machek
2009-12-15 20:07 ` Daniel Walker
2009-12-15 21:21 ` Pavel Machek
2009-12-15 20:48 ` Jamie Lokier
2009-12-15 21:07 ` Brian Swetland
2009-12-14 19:00 ` H Hartley Sweeten
2009-12-15 19:47 ` Pavel Machek [this message]
2009-12-15 20:15 ` H Hartley Sweeten
2009-12-15 20:47 ` Pavel Machek
2009-12-15 21:16 ` [patch] " Pavel Machek
2009-12-25 17:10 ` Pavel Machek
2009-12-25 23:49 ` Daniel Walker
2009-12-26 8:51 ` Pavel Machek
2009-12-15 20:24 ` Ryan Mallon
2009-12-15 20:44 ` Pavel Machek
2009-12-15 6:48 ` Arve Hjønnevåg
2009-12-11 23:28 ` Russell King - ARM Linux
2009-12-11 23:50 ` H Hartley Sweeten
2009-12-14 6:24 ` Pavel Machek
2009-12-10 16:57 ` Pavel Machek
2009-12-08 22:45 ` Russell King - ARM Linux
2009-12-09 0:39 ` Arve Hjønnevåg
2009-12-09 11:37 ` Pavel Machek
2009-12-09 11:42 ` Arve Hjønnevåg
2009-12-10 16:27 ` Pavel Machek
2009-12-09 16:18 ` Daniel Walker
2009-12-13 21:29 ` Pavel Machek
2009-12-13 21:38 ` Brian Swetland
2009-12-15 19:09 ` Pavel Machek
2009-12-14 17:40 ` Daniel Walker
2009-12-15 19:10 ` Pavel Machek
2009-12-09 11:41 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091215194725.GH24406@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).