• Russell King's avatar
    gpio: gpio-omap: configure edge detection for level IRQs for idle wakeup · e6818d29
    Russell King authored
    The GPIO block can enter idle independently of the CPU power management
    calls via smart-idle.  When the GPIO block enters idle, level detection
    stops working due to clocks being shut off, and an alternative form of
    edge detection is used.  However, this needs the edge detection
    registers set to mark the appropriate edges.
    
    Arrange to configure the edge detection enables along with the level
    detection to ensure that any transition to active interrupt state that
    occurs while the block is idle is detected as a wake-up event.
    
    Since we enable the edge detection when configuring the IRQ, both
    omap2_gpio_enable_level_quirk() nor omap2_gpio_disable_level_quirk()
    become redundant, which also means OMAP_GPIO_QUIRK_IDLE_REMOVE_TRIGGER
    can be removed. This can be now done without regressions as patch
    "gpio: gpio-omap: fix level interrupt idling" allows level interrupts
    to idle on omap4 without a workaround.
    
    Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
    Cc: Grygorii Strashko <grygorii.strashko@ti.com>
    Cc: Keerthy <j-keerthy@ti.com>
    Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
    Cc: Tero Kristo <t-kristo@ti.com>
    Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
    [tony@atomide.com: update description for the fix dependency]
    Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
    Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    e6818d29
gpio-omap.c 44.7 KB