From: 黄涛 Date: Tue, 8 Jan 2013 03:27:14 +0000 (+0800) Subject: rk: gpio: fix GPIOPullType define and no clear FLAG_IS_OUT when pull updown X-Git-Tag: firefly_0821_release~7989 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a0533e218945149b0bd7baa4f42b08de62b7a930;p=firefly-linux-kernel-4.4.55.git rk: gpio: fix GPIOPullType define and no clear FLAG_IS_OUT when pull updown --- 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;