]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[ARM] S3C24XX: GPIO: Remove pin specific input and output defines
authorBen Dooks <ben-linux@fluff.org>
Wed, 13 May 2009 20:46:15 +0000 (21:46 +0100)
committerBen Dooks <ben-linux@fluff.org>
Sun, 17 May 2009 21:21:26 +0000 (22:21 +0100)
The use of S3C2410_GP[A-Z]x_INP and S3C2410_GP[A-Z]x_OUTP are
very rare and are taking up large amounts of space in the
regs-gpio.h header.

The GPIO layer has had generic input and out defines called
S3C2410_GPIO_INPUT and S3C2410_GPIO_OUTPUT for a while which work
for all S3C24XX GPIOs.

Do the following replacements:

   S3C2410_GP[A-Z][0-9]*_\OUTP => S3C2410_GPIO_OUTPUT
   S3C2410_GP[A-Z][0-9]*_\INP  => /S3C2410_GPIO_INPUT
   S3C2410_GPA[0-9]*_OUT       => S3C2410_GPIO_OUTPUT

to remove any usages of these and prepare the header for
the removal of these.

The following command was used to acheive this:

find . -type f -writable ! -name regs-gpio.h ! -name "*~" | xargs sed -i~ -e 's/S3C2410_GP[A-Z][0-9]*_\OUTP/S3C2410_GPIO_OUTPUT/g' -e 's/S3C2410_GP[A-Z][0-9]*_\INP/S3C2410_GPIO_INPUT/g' -e 's/S3C2410_GPA[0-9]*_OUT/S3C2410_GPIO_OUTPUT/g'

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
arch/arm/mach-s3c2410/h1940-bluetooth.c
arch/arm/mach-s3c2410/mach-amlm5900.c
arch/arm/mach-s3c2410/mach-bast.c
arch/arm/mach-s3c2410/mach-vr1000.c
arch/arm/mach-s3c2410/usb-simtec.c
arch/arm/mach-s3c2440/mach-nexcoder.c
arch/arm/mach-s3c2440/mach-osiris.c
arch/arm/plat-s3c24xx/common-smdk.c

index 5a6bc56f186b2c1a9aa3259c7a81f2960aa8bc66..1f332b38f15b30b8a9513b9397b1eeb97ce6d5fb 100644 (file)
@@ -89,7 +89,7 @@ static int __init h1940bt_probe(struct platform_device *pdev)
        /* Configures BT serial port GPIOs */
        s3c2410_gpio_cfgpin(S3C2410_GPH0, S3C2410_GPH0_nCTS0);
        s3c2410_gpio_pullup(S3C2410_GPH0, 1);
-       s3c2410_gpio_cfgpin(S3C2410_GPH1, S3C2410_GPH1_OUTP);
+       s3c2410_gpio_cfgpin(S3C2410_GPH1, S3C2410_GPIO_OUTPUT);
        s3c2410_gpio_pullup(S3C2410_GPH1, 1);
        s3c2410_gpio_cfgpin(S3C2410_GPH2, S3C2410_GPH2_TXD0);
        s3c2410_gpio_pullup(S3C2410_GPH2, 1);
index 6d6995afeb439013d19833cc1f360c986a270b32..79428ed789b28e09e4218da559749f5e244f698e 100644 (file)
@@ -224,7 +224,7 @@ static void amlm5900_init_pm(void)
        } else {
                enable_irq_wake(IRQ_EINT9);
                /* configure the suspend/resume status pin */
-               s3c2410_gpio_cfgpin(S3C2410_GPF2, S3C2410_GPF2_OUTP);
+               s3c2410_gpio_cfgpin(S3C2410_GPF2, S3C2410_GPIO_OUTPUT);
                s3c2410_gpio_pullup(S3C2410_GPF2, 0);
        }
 }
index 4389c160f7d08f920d884b3f974ea2474d44fa09..10ba91b7744e43be23274b66747f9676e19b1b4c 100644 (file)
@@ -213,7 +213,7 @@ static int bast_pm_suspend(struct sys_device *sd, pm_message_t state)
 {
        /* ensure that an nRESET is not generated on resume. */
        s3c2410_gpio_setpin(S3C2410_GPA21, 1);
-       s3c2410_gpio_cfgpin(S3C2410_GPA21, S3C2410_GPA21_OUT);
+       s3c2410_gpio_cfgpin(S3C2410_GPA21, S3C2410_GPIO_OUTPUT);
 
        return 0;
 }
index 61a1ea9c5c5cd46bf58ed1d78a3deda89003b0d3..7e002f9473bb3d325eac3eacd6704ed82b14420a 100644 (file)
@@ -355,7 +355,7 @@ static struct clk *vr1000_clocks[] __initdata = {
 
 static void vr1000_power_off(void)
 {
-       s3c2410_gpio_cfgpin(S3C2410_GPB9, S3C2410_GPB9_OUTP);
+       s3c2410_gpio_cfgpin(S3C2410_GPB9, S3C2410_GPIO_OUTPUT);
        s3c2410_gpio_setpin(S3C2410_GPB9, 1);
 }
 
index 8331e8d97e20511e8926225df9fa1c5e7439718b..b209749b78ebb1e778c0711389aa760895c0877f 100644 (file)
@@ -109,7 +109,7 @@ int usb_simtec_init(void)
        printk("USB Power Control, (c) 2004 Simtec Electronics\n");
        s3c_device_usb.dev.platform_data = &usb_simtec_info;
 
-       s3c2410_gpio_cfgpin(S3C2410_GPB4, S3C2410_GPB4_OUTP);
+       s3c2410_gpio_cfgpin(S3C2410_GPB4, S3C2410_GPIO_OUTPUT);
        s3c2410_gpio_setpin(S3C2410_GPB4, 1);
        return 0;
 }
index 7aeaa972d7f5856bb46e9a6156190dd6f065c693..3d4c61e1fa49607d1cd27fc644470106fcf46295 100644 (file)
@@ -121,15 +121,15 @@ static void __init nexcoder_sensorboard_init(void)
 {
        // Initialize SCCB bus
        s3c2410_gpio_setpin(S3C2410_GPE14, 1); // IICSCL
-       s3c2410_gpio_cfgpin(S3C2410_GPE14, S3C2410_GPE14_OUTP);
+       s3c2410_gpio_cfgpin(S3C2410_GPE14, S3C2410_GPIO_OUTPUT);
        s3c2410_gpio_setpin(S3C2410_GPE15, 1); // IICSDA
-       s3c2410_gpio_cfgpin(S3C2410_GPE15, S3C2410_GPE15_OUTP);
+       s3c2410_gpio_cfgpin(S3C2410_GPE15, S3C2410_GPIO_OUTPUT);
 
        // Power up the sensor board
        s3c2410_gpio_setpin(S3C2410_GPF1, 1);
-       s3c2410_gpio_cfgpin(S3C2410_GPF1, S3C2410_GPF1_OUTP); // CAM_GPIO7 => nLDO_PWRDN
+       s3c2410_gpio_cfgpin(S3C2410_GPF1, S3C2410_GPIO_OUTPUT); // CAM_GPIO7 => nLDO_PWRDN
        s3c2410_gpio_setpin(S3C2410_GPF2, 0);
-       s3c2410_gpio_cfgpin(S3C2410_GPF2, S3C2410_GPF2_OUTP); // CAM_GPIO6 => CAM_PWRDN
+       s3c2410_gpio_cfgpin(S3C2410_GPF2, S3C2410_GPIO_OUTPUT); // CAM_GPIO6 => CAM_PWRDN
 }
 
 static void __init nexcoder_map_io(void)
index c8a46685ce381611430e50d7069293667b3914a1..e05f9557ed56f9139343fd17df2be24014c71a1b 100644 (file)
@@ -292,7 +292,7 @@ static int osiris_pm_suspend(struct sys_device *sd, pm_message_t state)
 
        /* ensure that an nRESET is not generated on resume. */
        s3c2410_gpio_setpin(S3C2410_GPA21, 1);
-       s3c2410_gpio_cfgpin(S3C2410_GPA21, S3C2410_GPA21_OUT);
+       s3c2410_gpio_cfgpin(S3C2410_GPA21, S3C2410_GPIO_OUTPUT);
 
        return 0;
 }
index 1a8347cec20a3da803ecaf5c7f8dba269a2270ee..ef4c8fde169f2ad7ed3cb342b0af6d2bdc5efe79 100644 (file)
@@ -184,10 +184,10 @@ void __init smdk_machine_init(void)
 {
        /* Configure the LEDs (even if we have no LED support)*/
 
-       s3c2410_gpio_cfgpin(S3C2410_GPF4, S3C2410_GPF4_OUTP);
-       s3c2410_gpio_cfgpin(S3C2410_GPF5, S3C2410_GPF5_OUTP);
-       s3c2410_gpio_cfgpin(S3C2410_GPF6, S3C2410_GPF6_OUTP);
-       s3c2410_gpio_cfgpin(S3C2410_GPF7, S3C2410_GPF7_OUTP);
+       s3c2410_gpio_cfgpin(S3C2410_GPF4, S3C2410_GPIO_OUTPUT);
+       s3c2410_gpio_cfgpin(S3C2410_GPF5, S3C2410_GPIO_OUTPUT);
+       s3c2410_gpio_cfgpin(S3C2410_GPF6, S3C2410_GPIO_OUTPUT);
+       s3c2410_gpio_cfgpin(S3C2410_GPF7, S3C2410_GPIO_OUTPUT);
 
        s3c2410_gpio_setpin(S3C2410_GPF4, 1);
        s3c2410_gpio_setpin(S3C2410_GPF5, 1);