• Hans de Goede's avatar
    Input: axp20x-pek - revert "always register interrupt handlers" change · 8a78050e
    Hans de Goede authored
    The power button on Cherry Trail systems with an AXP288 PMIC is connected
    to both the power button pin of the PMIC as well as to a power button GPIO
    on the Cherry Trail SoC itself. This leads to double power button event
    reporting which is a problem.
    
    Since reporting power button presses through the PMIC is not supported on
    all PMICs used on Cherry Trail systems, we want to keep the GPIO
    power button events, so the axp20x-pek code checks for the presence of
    a GPIO power button and in that case does not register its input-device.
    
    On most systems the GPIO power button also can wake-up the system from
    suspend, so the axp20x-pek driver would also not register its interrupt
    handler. But on some systems there was a bug causing wakeup by the GPIO
    power button handler to not work.
    
    Commit 9747070c ("Input: axp20x-pek - always register interrupt
    handlers") was added as a work around for this registering the axp20x-pek
    interrupts, but not the input-device on Cherry Trail systems.
    
    In the mean time the root-cause of the GPIO power button wakeup events
    not working has been found and fixed by the "pinctrl: cherryview: Do not
    allow the same interrupt line to be used by 2 pins" patch,
    so this is no longer necessary.
    
    This reverts the workaround going back to only registering the
    interrupt handlers on systems where we also register the input-device.
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    Acked-by: default avatarChen-Yu Tsai <wens@csie.org>
    Link: https://lore.kernel.org/r/20220106111647.66520-1-hdegoede@redhat.comSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
    8a78050e
axp20x-pek.c 10.8 KB