rk: gpio: fix GPIOPullType define and no clear FLAG_IS_OUT when pull updown
author黄涛 <huangtao@rock-chips.com>
Tue, 8 Jan 2013 03:27:14 +0000 (11:27 +0800)
committer黄涛 <huangtao@rock-chips.com>
Tue, 8 Jan 2013 03:27:35 +0000 (11:27 +0800)
arch/arm/mach-rk29/include/mach/gpio.h
arch/arm/plat-rk/include/plat/gpio.h
drivers/gpio/gpiolib.c

index a0f0309cbe8fdee3ec4a9489f56574c73f76596b..32c581519485db472fe313a91bce6eaa7cb7d9a7 100755 (executable)
@@ -31,11 +31,10 @@ typedef enum eGPIOPinDirection
 
 typedef enum GPIOPullType {
        PullDisable = 0,
-       PullEnable,
-       GPIONormal,  //PullEnable, please do not use it
-       GPIOPullUp,     //PullEnable, please do not use it
-       GPIOPullDown,//PullEnable, please do not use it
-       GPIONOInit,//PullEnable, please do not use it
+       PullEnable = 1,
+       GPIONormal = PullDisable,
+       GPIOPullUp = 1,
+       GPIOPullDown = 2,
 }eGPIOPullType_t;
 
 typedef enum GPIOIntType {
index f4a35ec889ded84b31096a81f243469cce797223..76cfb23f158459e605e59db06b602240cb60c348 100644 (file)
@@ -284,11 +284,10 @@ typedef enum eGPIOPinDirection
 
 typedef enum GPIOPullType {
        PullDisable = 0,
-       PullEnable,
-       GPIONormal,  //PullEnable, please do not use it
-       GPIOPullUp,     //PullEnable, please do not use it
-       GPIOPullDown,//PullEnable, please do not use it
-       GPIONOInit,//PullEnable, please do not use it
+       PullEnable = 1,
+       GPIONormal = PullDisable,
+       GPIOPullUp = 1,
+       GPIOPullDown = 2,
 }eGPIOPullType_t;
 
 typedef enum GPIOIntType {
index 95a097256c97f7f37d9d26975c56bce16da8edd6..482dec010e5332107508a0c4d17985c765d336a3 100755 (executable)
@@ -1529,8 +1529,6 @@ int gpio_pull_updown(unsigned gpio, unsigned value)
                }
        }
        status = chip->pull_updown(chip, gpio,value);
-       if (status == 0)
-               clear_bit(FLAG_IS_OUT, &desc->flags);
        
 lose:
        return status;