From: 黄涛 Date: Thu, 26 May 2011 08:53:11 +0000 (+0800) Subject: rk29: gpio: disable debounce by default, default handler set to level X-Git-Tag: firefly_0821_release~10264 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=97363ae6d85d367b5484b2694bda95d70a6413c5;p=firefly-linux-kernel-4.4.55.git rk29: gpio: disable debounce by default, default handler set to level enable debounce may halt cpu on wfi, disable it by default. gpio default interrupt type is level-sensitive, set_irq_handler to handle_level_irq. --- diff --git a/arch/arm/mach-rk29/gpio.c b/arch/arm/mach-rk29/gpio.c index 8c5172a5cf52..0e1025d5a718 100755 --- a/arch/arm/mach-rk29/gpio.c +++ b/arch/arm/mach-rk29/gpio.c @@ -183,7 +183,8 @@ static int GPIOSetPinDirection(struct gpio_chip *chip, unsigned int mask,eGPIOPi local_irq_save(flags); rk29_gpio_bitOp(gpioRegBase,GPIO_SWPORT_DDR,mask,direction); - rk29_gpio_bitOp(gpioRegBase,GPIO_DEBOUNCE,mask,1); + /* Enable debounce may halt cpu on wfi, disable it by default */ + //rk29_gpio_bitOp(gpioRegBase,GPIO_DEBOUNCE,mask,1); local_irq_restore(flags); return 0; @@ -555,7 +556,7 @@ static void __init rk29_gpio_irq_setup(void) for (j = 0; j < 32; j++) { lockdep_set_class(&irq_desc[pin+j].lock, &gpio_lock_class); set_irq_chip(pin+j, &rk29gpio_irqchip); - set_irq_handler(pin+j, handle_edge_irq); + set_irq_handler(pin+j, handle_level_irq); set_irq_flags(pin+j, IRQF_VALID); }