From: ccross@google.com (Colin Cross)
To: linux-arm-kernel@lists.infradead.org
Subject: PLEA: Please fix mach/gpio.h includes (was: Re: [RFC PATCH 2/2] GPIO: add gpiolib and irqchip for CSR SiRFprimaII GPIO controller)
Date: Tue, 26 Jul 2011 11:32:22 -0700 [thread overview]
Message-ID: <CAMbhsRRr5FPtu-kUbcLO56=rsHkb2XNDf21-G3pymPBTcmYmRQ@mail.gmail.com> (raw)
In-Reply-To: <20110726104628.GP9653@n2100.arm.linux.org.uk>
On Tue, Jul 26, 2011 at 3:46 AM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Tue, Jul 26, 2011 at 11:09:28AM +0100, Russell King - ARM Linux wrote:
>> Hmm, yet another trivial gpio implementation. ?We have 24 others just like
>> this. ?Well, mainline does... I have just one. ?Patches after the merge
>> window closes.
>
> As an additional note to this: we _really_ need to get on top of the
> includes of mach/gpio.h rather than linux/gpio.h - there are around 139
> files in mainline (this morning) which include mach/gpio.h directly.
>
> There's one which includes both asm/gpio.h and mach/gpio.h, which is
> silly when you look at what asm/gpio.h contains - maybe one attempt
> to include mach/gpio.h wasn't enough!
>
> These includes get in the way of consolidating stuff out of mach/gpio.h
> into asm/gpio.h - moving stuff out of mach/gpio.h could take it out of
> view of these files, thereby causing build errors.
>
> What is even less clear is whether changing these mach/gpio.h includes
> to linux/gpio.h is correct or not.
>
> So, what I'd like all platform and all soc maintainers to do is to:
>
> ? ? ? ?grep -rl '<mach/gpio.h>' arch/arm drivers
>
> and investigate their files from that list which they're responsible for,
> and submit patches to _me_ to fix these includes up (preferably to use
> linux/gpio.h). ?I'd also like them to do a better job at spotting these
> while reviewing patches on the list to help reduce new occurances of
> this.
>
> Thanks.
Tegra has four uses of mach/gpio.h:
arch/arm/mach-tegra/board-trimslice-pinmux.c
arch/arm/mach-tegra/board-paz00.c
arch/arm/mach-tegra/board-trimslice.c
drivers/mmc/host/sdhci-tegra.c
Each of these files calls tegra_gpio_enable/tegra_gpio_disable, which
flip the pin in/out of gpio mode. Including linux/gpio.h and
mach/gpio.h was deliberate, so that when linux/gpio.h stops causing
mach/gpio.h to be included, the tegra gpio apis are still available.
Should I move the tegra gpio apis to a separate include and drop
mach/gpio.h?
next prev parent reply other threads:[~2011-07-26 18:32 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-26 8:13 [RFC PATCH 0/2] add pinmux and gpio for CSR SiRFprimaII Barry Song
2011-07-26 8:13 ` [RFC PATCH 1/2] ARM: CSR: Add pinmux support for SiRFprimaII Barry Song
2011-07-26 8:13 ` [RFC PATCH 2/2] GPIO: add gpiolib and irqchip for CSR SiRFprimaII GPIO controller Barry Song
2011-07-26 10:09 ` Russell King - ARM Linux
2011-07-26 10:46 ` PLEA: Please fix mach/gpio.h includes (was: Re: [RFC PATCH 2/2] GPIO: add gpiolib and irqchip for CSR SiRFprimaII GPIO controller) Russell King - ARM Linux
2011-07-26 18:32 ` Colin Cross [this message]
2011-07-26 18:39 ` Russell King - ARM Linux
2011-07-26 19:10 ` Nicolas Pitre
2011-07-27 2:08 ` Barry Song
2011-07-27 2:51 ` Nicolas Pitre
2011-07-29 15:58 ` Linus Walleij
2011-08-09 7:22 ` Barry Song
2011-08-09 13:15 ` Arnd Bergmann
2011-08-11 2:25 ` Barry Song
2011-08-11 8:30 ` Russell King - ARM Linux
2011-09-19 9:10 ` Linus Walleij
2011-09-19 15:53 ` Arnd Bergmann
2011-08-08 9:09 ` [RFC PATCH 2/2] GPIO: add gpiolib and irqchip for CSR SiRFprimaII GPIO controller Barry Song
2011-08-08 9:32 ` Linus Walleij
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='CAMbhsRRr5FPtu-kUbcLO56=rsHkb2XNDf21-G3pymPBTcmYmRQ@mail.gmail.com' \
--to=ccross@google.com \
--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).