]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ARM: OMAP: Move gpio.h to include/linux/platform_data
authorTony Lindgren <tony@atomide.com>
Thu, 30 Aug 2012 22:37:24 +0000 (15:37 -0700)
committerTony Lindgren <tony@atomide.com>
Thu, 13 Sep 2012 01:06:30 +0000 (18:06 -0700)
This way we can remove includes of plat/gpio.h which won't work
with the single zImage support.

Note that we also remove the cpu_class_is_omap2() check
in gpio-omap.c as the drivers should not call it as we need to
make it local to arch/arm/mach-omap2 for single zImage support.

While at it, arrange the related includes in the standard way.

Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: linux-mtd@lists.infradead.org
Cc: alsa-devel@alsa-project.org
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
28 files changed:
arch/arm/mach-omap1/board-ams-delta.c
arch/arm/mach-omap1/board-osk.c
arch/arm/mach-omap1/gpio15xx.c
arch/arm/mach-omap1/gpio16xx.c
arch/arm/mach-omap1/gpio7xx.c
arch/arm/mach-omap1/include/mach/gpio.h
arch/arm/mach-omap1/leds-h2p2-debug.c
arch/arm/mach-omap1/leds.c
arch/arm/mach-omap2/board-am3517evm.c
arch/arm/mach-omap2/board-cm-t35.c
arch/arm/mach-omap2/board-zoom-display.c
arch/arm/mach-omap2/board-zoom-peripherals.c
arch/arm/mach-omap2/gpio.c
arch/arm/mach-omap2/hsmmc.c
arch/arm/mach-omap2/include/mach/gpio.h
arch/arm/mach-omap2/msdi.c
arch/arm/mach-omap2/omap_hwmod_2420_data.c
arch/arm/mach-omap2/omap_hwmod_2430_data.c
arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
arch/arm/mach-omap2/omap_hwmod_44xx_data.c
arch/arm/mach-omap2/pm24xx.c
arch/arm/mach-omap2/pm34xx.c
arch/arm/plat-omap/debug-leds.c
drivers/gpio/gpio-omap.c
drivers/mtd/nand/ams-delta.c
include/linux/platform_data/gpio-omap.h [moved from arch/arm/plat-omap/include/plat/gpio.h with 94% similarity]
sound/soc/omap/sdp3430.c

index c162369e9f779577147d6944faf60d73e72b6cc4..6f192c4900b13e9a7937fa4e3d5656cdcd0b0439 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/export.h>
 #include <linux/omapfb.h>
 #include <linux/io.h>
+#include <linux/platform_data/gpio-omap.h>
 
 #include <media/soc_camera.h>
 
index 569b6872a2f646778c1999d0734064316b63d3c9..3b2d9071022a02d057391bef03312c3fb9cf67a7 100644 (file)
@@ -39,6 +39,7 @@
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/physmap.h>
 #include <linux/i2c/tps65010.h>
+#include <linux/platform_data/gpio-omap.h>
 #include <linux/platform_data/omap1_bl.h>
 
 #include <asm/mach-types.h>
index ebef15e5e7b7f70ddc94bcf45083fd8173ba7fef..98e6f39224a4ee42449b847f997889b0842cb4c6 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include <linux/gpio.h>
+#include <linux/platform_data/gpio-omap.h>
 
 #define OMAP1_MPUIO_VBASE              OMAP1_MPUIO_BASE
 #define OMAP1510_GPIO_BASE             0xFFFCE000
index 2a48cd2e1754329bb0698729178e9adc381715d0..33f419236b1725e4f277837754ce353336cc6384 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include <linux/gpio.h>
+#include <linux/platform_data/gpio-omap.h>
 
 #define OMAP1610_GPIO1_BASE            0xfffbe400
 #define OMAP1610_GPIO2_BASE            0xfffbec00
index acf12b73eace0a07c5567d199c96d73e506fcb7a..958ce9acee954c871fd67bcef67763c5a8021cce 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include <linux/gpio.h>
+#include <linux/platform_data/gpio-omap.h>
 
 #define OMAP7XX_GPIO1_BASE             0xfffbc000
 #define OMAP7XX_GPIO2_BASE             0xfffbc800
index e737706a8fe1105932f85433d8ac0e97e12d1b37..ebf86c0f4f463f578c249bca9012a07590afccef 100644 (file)
@@ -1,5 +1,3 @@
 /*
  * arch/arm/mach-omap1/include/mach/gpio.h
  */
-
-#include <plat/gpio.h>
index f6b14a14a95727c92dd697a7f7c63c9a8e4fda9a..7f4bba9fa02edac0f86f8b335c85fd67edb73f99 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/kernel_stat.h>
 #include <linux/sched.h>
 #include <linux/io.h>
+#include <linux/platform_data/gpio-omap.h>
 
 #include <mach/hardware.h>
 #include <asm/leds.h>
index ae6dd93b8ddce87e755e954695092555c4514083..7b1a3833165de05a7de5929cf2b96ad58c7c8e93 100644 (file)
@@ -6,6 +6,7 @@
 #include <linux/gpio.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/platform_data/gpio-omap.h>
 
 #include <asm/leds.h>
 #include <asm/mach-types.h>
index 00abda1380223f7c2277019fbd9c6c0bd1195d6f..029ebdf70c4389badc726b521e24a99c025dab15 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/can/platform/ti_hecc.h>
 #include <linux/davinci_emac.h>
 #include <linux/mmc/host.h>
+#include <linux/platform_data/gpio-omap.h>
 
 #include <mach/hardware.h>
 #include <mach/am35xx.h>
index ea3410953d2cadcee32968230b9e4f5e65f309e8..34cb90471d960dd9cce251b0531fbb622283005e 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/input/matrix_keypad.h>
 #include <linux/delay.h>
 #include <linux/gpio.h>
+#include <linux/platform_data/gpio-omap.h>
 
 #include <linux/i2c/at24.h>
 #include <linux/i2c/twl.h>
index 28187f134fffdc319c9f662a4d198f9284b5f23c..d64f35fd75f5662fefa22c8da5671b15781e475b 100644 (file)
@@ -18,6 +18,8 @@
 #include <video/omapdss.h>
 #include <mach/board-zoom.h>
 
+#include <plat/cpu.h>
+
 #define LCD_PANEL_RESET_GPIO_PROD      96
 #define LCD_PANEL_RESET_GPIO_PILOT     55
 #define LCD_PANEL_QVGA_GPIO            56
index 00f73b7792e08f33d7d39515d74166c661132a39..ae5d36bc443f9675a7840b88e2253e5bcb8e2f28 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/regulator/fixed.h>
 #include <linux/wl12xx.h>
 #include <linux/mmc/host.h>
+#include <linux/platform_data/gpio-omap.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
index 9ad7d489b0deb8d2166b0288450fdba087dc450b..7b52bdfc59c9b29b4d9936ecb6b7cd6e4f7b3ff4 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/slab.h>
 #include <linux/interrupt.h>
 #include <linux/of.h>
+#include <linux/platform_data/gpio-omap.h>
 
 #include <plat/omap_hwmod.h>
 #include <plat/omap_device.h>
index a9675d8d182254744327415ecf42e45a88fbdcb2..80399d7409526b3680c6e044d527deef05845fb8 100644 (file)
@@ -15,6 +15,8 @@
 #include <linux/delay.h>
 #include <linux/gpio.h>
 #include <mach/hardware.h>
+#include <linux/platform_data/gpio-omap.h>
+
 #include <plat/mmc.h>
 #include <plat/omap-pm.h>
 #include <plat/mux.h>
index be4d290d57ee4534ca43d19f68523e28f3e5870d..5621cc59c9f4e9731b15d69504b13e6cf1004fd7 100644 (file)
@@ -1,5 +1,3 @@
 /*
  * arch/arm/mach-omap2/include/mach/gpio.h
  */
-
-#include <plat/gpio.h>
index fb5bc6cf3773a531417d6f8da1293c5d351f543e..9e57b4aadb0694bedc233599ddeb30c8d45a2567 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <linux/kernel.h>
 #include <linux/err.h>
+#include <linux/platform_data/gpio-omap.h>
 
 #include <plat/omap_hwmod.h>
 #include <plat/omap_device.h>
index 50cfab61b0e21bb6fc3ff00e769bd38570c3761b..5b49ebfd4df6c664fc74cfcd02ab2c51910a3469 100644 (file)
@@ -18,7 +18,6 @@
 #include <plat/dma.h>
 #include <plat/serial.h>
 #include <plat/i2c.h>
-#include <plat/gpio.h>
 #include <plat/mcspi.h>
 #include <plat/dmtimer.h>
 #include <plat/l3_2xxx.h>
index 58b5bc196d32c4de29054ead6137321d921c1b5a..1fd66f0ba2de9eecaa8eb9eb954bb2e5a9366b91 100644 (file)
@@ -18,7 +18,6 @@
 #include <plat/dma.h>
 #include <plat/serial.h>
 #include <plat/i2c.h>
-#include <plat/gpio.h>
 #include <plat/mcbsp.h>
 #include <plat/mcspi.h>
 #include <plat/dmtimer.h>
index afad69c6ba6e92f80817189bd5e53dcaf70293db..c6416c930232ae980cac08e5f0e8eb00f9ba43f8 100644 (file)
@@ -10,7 +10,7 @@
  */
 #include <plat/omap_hwmod.h>
 #include <plat/serial.h>
-#include <plat/gpio.h>
+#include <linux/platform_data/gpio-omap.h>
 #include <plat/dma.h>
 #include <plat/dmtimer.h>
 #include <plat/mcspi.h>
index c9e38200216b2985cb3ef997e530891b8e3b19dd..5820c737389bc65e2138e5f8daaacfe2759018c9 100644 (file)
@@ -15,6 +15,7 @@
  * XXX these should be marked initdata for multi-OMAP kernels
  */
 #include <linux/power/smartreflex.h>
+#include <linux/platform_data/gpio-omap.h>
 
 #include <plat/omap_hwmod.h>
 #include <mach/irqs.h>
@@ -24,7 +25,6 @@
 #include <plat/l3_3xxx.h>
 #include <plat/l4_3xxx.h>
 #include <plat/i2c.h>
-#include <plat/gpio.h>
 #include <plat/mmc.h>
 #include <plat/mcbsp.h>
 #include <plat/mcspi.h>
index 242aee498ceb21466e33ee04035ed63147e4a615..fe987f80c715c45e35c1fe7bd7b6d0b349da3722 100644 (file)
  */
 
 #include <linux/io.h>
+#include <linux/platform_data/gpio-omap.h>
 #include <linux/power/smartreflex.h>
 
 #include <plat/omap_hwmod.h>
 #include <plat/cpu.h>
 #include <plat/i2c.h>
-#include <plat/gpio.h>
 #include <plat/dma.h>
 #include <plat/mcspi.h>
 #include <plat/mcbsp.h>
index de1caf15ab78720e2a4fb154b8b0183fbc52daa8..2708a8b7a39bd641e436a5aa768efc2e07e5b077 100644 (file)
@@ -29,6 +29,7 @@
 #include <linux/irq.h>
 #include <linux/time.h>
 #include <linux/gpio.h>
+#include <linux/platform_data/gpio-omap.h>
 
 #include <asm/mach/time.h>
 #include <asm/mach/irq.h>
index 05bd8f02723f2966bfc559ae30b9c33feee9feb3..90480f7599749e3913ce7bd9fcb95f6eea2249c1 100644 (file)
@@ -28,6 +28,8 @@
 #include <linux/clk.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
+#include <linux/platform_data/gpio-omap.h>
+
 #include <trace/events/power.h>
 
 #include <asm/suspend.h>
index 39407cbe34c65ab0308a5b1585ad896d5c5f3c2f..195aaae658726bf6903f9df739cb90878ede1462 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/platform_device.h>
 #include <linux/leds.h>
 #include <linux/io.h>
+#include <linux/platform_data/gpio-omap.h>
 
 #include <mach/hardware.h>
 #include <asm/leds.h>
index e6efd77668f0fb5ccab3a917629b07134885ee73..64fbce30c50299f66fa98293611a01d042b0b0a9 100644 (file)
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/irqdomain.h>
+#include <linux/gpio.h>
+#include <linux/platform_data/gpio-omap.h>
 
-#include <mach/hardware.h>
-#include <asm/irq.h>
-#include <mach/irqs.h>
-#include <asm/gpio.h>
 #include <asm/mach/irq.h>
 
 #define OFF_MODE       1
@@ -385,13 +383,16 @@ static int _set_gpio_triggering(struct gpio_bank *bank, int gpio,
 static int gpio_irq_type(struct irq_data *d, unsigned type)
 {
        struct gpio_bank *bank = irq_data_get_irq_chip_data(d);
-       unsigned gpio;
+       unsigned gpio = 0;
        int retval;
        unsigned long flags;
 
-       if (!cpu_class_is_omap2() && d->irq > IH_MPUIO_BASE)
+#ifdef CONFIG_ARCH_OMAP1
+       if (d->irq > IH_MPUIO_BASE)
                gpio = OMAP_MPUIO(d->irq - IH_MPUIO_BASE);
-       else
+#endif
+
+       if (!gpio)
                gpio = irq_to_gpio(bank, d->irq);
 
        if (type & ~IRQ_TYPE_SENSE_MASK)
index 861ca8f7e47d2d62ff0b3929100117f0f7036543..78a524b49357ba81214702645d3c29f0941c4b47 100644 (file)
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/nand.h>
 #include <linux/mtd/partitions.h>
+#include <linux/gpio.h>
+#include <linux/platform_data/gpio-omap.h>
+
 #include <asm/io.h>
-#include <mach/hardware.h>
 #include <asm/sizes.h>
-#include <linux/gpio.h>
+
 #include <plat/board-ams-delta.h>
 
+#include <mach/hardware.h>
+
 /*
  * MTD structure for E3 (Delta)
  */
similarity index 94%
rename from arch/arm/plat-omap/include/plat/gpio.h
rename to include/linux/platform_data/gpio-omap.h
index 50fb7cc000ea73fb07f535e704dd406c3ed31e6e..e8741c2678d586497d05dd3cfff9b74f89b015e6 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/arm/plat-omap/include/mach/gpio.h
- *
  * OMAP GPIO handling defines and functions
  *
  * Copyright (C) 2003-2005 Nokia Corporation
 #define OMAP4_GPIO_CLEARDATAOUT                0x0190
 #define OMAP4_GPIO_SETDATAOUT          0x0194
 
+#define OMAP_MAX_GPIO_LINES            192
+
 #define OMAP_MPUIO(nr)         (OMAP_MAX_GPIO_LINES + (nr))
 #define OMAP_GPIO_IS_MPUIO(nr) ((nr) >= OMAP_MAX_GPIO_LINES)
 
@@ -213,16 +213,5 @@ extern void omap2_gpio_prepare_for_idle(int off_mode);
 extern void omap2_gpio_resume_after_idle(void);
 extern void omap_set_gpio_debounce(int gpio, int enable);
 extern void omap_set_gpio_debounce_time(int gpio, int enable);
-/*-------------------------------------------------------------------------*/
-
-/*
- * Wrappers for "new style" GPIO calls, using the new infrastructure
- * which lets us plug in FPGA, I2C, and other implementations.
- *
- * The original OMAP-specific calls should eventually be removed.
- */
-
-#include <linux/errno.h>
-#include <asm-generic/gpio.h>
 
 #endif
index 0e283226e2bf8deecf215b54ef22c700c72fff0d..78e14198aa1140a6a790c1d5da1f34f685a67664 100644 (file)
@@ -34,6 +34,7 @@
 #include <mach/hardware.h>
 #include <mach/gpio.h>
 #include <plat/mcbsp.h>
+#include <linux/platform_data/gpio-omap.h>
 
 /* Register descriptions for twl4030 codec part */
 #include <linux/mfd/twl4030-audio.h>