• Igor Grinberg's avatar
    ARM - OMAP: ads7846: fix pendown debounce setting · 0a0d6285
    Igor Grinberg authored
    Commit 97ee9f01 (ARM: OMAP: fix the ads7846 init code) have enabled the
    pendown GPIO debounce time setting by the below sequence:
    
      gpio_request_one()
      gpio_set_debounce()
      gpio_free()
    
    It also revealed a bug in the OMAP GPIO handling code which prevented
    the GPIO debounce clock to be disabled and CORE transition to low power
    states.
    
    Commit c9c55d92 (gpio/omap: fix off-mode bug: clear debounce settings on
    free/reset) fixes the OMAP GPIO handling code by making sure that the
    GPIO debounce clock gets disabled if no GPIO is requested from current
    bank.
    
    While fixing the OMAP GPIO handling code (in the right way), the above
    commit makes the gpio_request->set_debounce->free sequence invalid as
    after freeing the GPIO, the debounce settings are lost.
    
    Fix the debounce settings by moving the debounce initialization to the
    actual GPIO requesting code - the ads7846 driver.
    Signed-off-by: default avatarIgor Grinberg <grinberg@compulab.co.il>
    Acked-by: default avatarTony Lindgren <tony@atomide.com>
    Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
    0a0d6285
common-board-devices.c 3.94 KB