]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/glsdk-u-boot.git/commitdiff
omap: gpio: generic changes after changing API
authorSanjeev Premi <premi@ti.com>
Thu, 8 Sep 2011 14:48:39 +0000 (10:48 -0400)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Tue, 13 Sep 2011 06:25:15 +0000 (08:25 +0200)
This patch contains the generic changes required after
change to generic API in the previous patch.

Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
arch/arm/cpu/armv7/omap4/clocks.c
doc/README.omap3

index eda960ca76cd4386dcd3e27fdf76ab767a7a980b..4f0e0cd881f95bc0a7756446c5d1990efe666ee0 100644 (file)
@@ -31,6 +31,7 @@
  */
 #include <common.h>
 #include <asm/omap_common.h>
+#include <asm/gpio.h>
 #include <asm/arch/clocks.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/utils.h>
@@ -481,8 +482,8 @@ static void do_scale_tps62361(u32 reg, u32 volt_mv)
         * VSEL1 is grounded on board. So the following selects
         * VSEL1 = 0 and VSEL0 = 1
         */
-       omap_set_gpio_direction(TPS62361_VSEL0_GPIO, 0);
-       omap_set_gpio_dataout(TPS62361_VSEL0_GPIO, 1);
+       gpio_direction_output(TPS62361_VSEL0_GPIO, 0);
+       gpio_set_value(TPS62361_VSEL0_GPIO, 1);
 
        temp = TPS62361_I2C_SLAVE_ADDR |
            (reg << PRM_VC_VAL_BYPASS_REGADDR_SHIFT) |
index 460950dfd0efff64ddd69377d54f31ae0e6bcbff..1768cdd3592407936bec1d72c2bb0e6ed07acaa4 100644 (file)
@@ -98,24 +98,24 @@ gpio
 
 To set a bit :
 
-       if (!omap_request_gpio(N)) {
-               omap_set_gpio_direction(N, 0);
-               omap_set_gpio_dataout(N, 1);
+       if (!gpio_request(N, "")) {
+               gpio_direction_output(N, 0);
+               gpio_set_value(N, 1);
        }
 
 To clear a bit :
 
-       if (!omap_request_gpio(N)) {
-               omap_set_gpio_direction(N, 0);
-               omap_set_gpio_dataout(N, 0);
+       if (!gpio_request(N, "")) {
+               gpio_direction_output(N, 0);
+               gpio_set_value(N, 0);
        }
 
 To read a bit :
 
-       if (!omap_request_gpio(N)) {
-               omap_set_gpio_direction(N, 1);
-               val = omap_get_gpio_datain(N);
-               omap_free_gpio(N);
+       if (!gpio_request(N, "")) {
+               gpio_direction_input(N);
+               val = gpio_get_value(N);
+               gpio_free(N);
        }
        if (val)
                printf("GPIO N is set\n");