• Tony Lindgren's avatar
    power: bq24190_charger: Check the interrupt status on resume · 35c3c196
    Tony Lindgren authored
    Some SoCs like omap3 can configure GPIO irqs to use Linux generic
    dedicated wakeirq support. If the dedicated wakeirq is configured,
    the SoC will use a always-on interrupt controller to produce wake-up
    events.
    
    If bq24190 is configured for dedicated wakeirq, we need to check the
    interrupt status on PM runtime resume. This is because the Linux
    generic wakeirq will call pm_runtime_resume() on the device on a
    wakeirq. And as the bq24190 interrupt is falling edge sensitive
    and only active for 250 us, there will be no device interrupt seen
    by the runtime SoC IRQ controller.
    
    Note that this can cause spurious interrupts on omap3 devices with
    bq24190 connected to gpio banks 2 - 5 as there's a glitch on those
    pins waking from off mode as listed in "Advisory 1.45". Devices
    with this issue should not configure the optional wakeirq interrupt
    in the dts file.
    Acked-by: default avatarMark Greer <mgreer@animalcreek.com>
    Acked-by: default avatarLiam Breck <kernel@networkimprov.net>
    Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
    Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
    35c3c196
bq24190_charger.c 40.7 KB