From a0533e218945149b0bd7baa4f42b08de62b7a930 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=BB=84=E6=B6=9B?= Date: Tue, 8 Jan 2013 11:27:14 +0800 Subject: [PATCH] rk: gpio: fix GPIOPullType define and no clear FLAG_IS_OUT when pull updown --- arch/arm/mach-rk29/include/mach/gpio.h | 9 ++++----- arch/arm/plat-rk/include/plat/gpio.h | 9 ++++----- drivers/gpio/gpiolib.c | 2 -- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/arch/arm/mach-rk29/include/mach/gpio.h b/arch/arm/mach-rk29/include/mach/gpio.h index a0f0309cbe8f..32c581519485 100755 --- a/arch/arm/mach-rk29/include/mach/gpio.h +++ b/arch/arm/mach-rk29/include/mach/gpio.h @@ -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 { diff --git a/arch/arm/plat-rk/include/plat/gpio.h b/arch/arm/plat-rk/include/plat/gpio.h index f4a35ec889de..76cfb23f1584 100644 --- a/arch/arm/plat-rk/include/plat/gpio.h +++ b/arch/arm/plat-rk/include/plat/gpio.h @@ -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 { diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 95a097256c97..482dec010e53 100755 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -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; -- 2.34.1