• Bard Liao's avatar
    ASoC: rt5645: use polling to support HS button · 7ff6319e
    Bard Liao authored
    The IRQ pin will keep high when the headset button is pressed. And
    keep low when the headset button is released. So, we need irq trigger
    at both edges. However, some platform can't support it. Therefore,
    we polling the register to report the button release event once a
    button presse event is received.
    To support the headset button detection function for those can't
    support both edges trigger platforms, we also need to invert the
    polarity of jack detection irq since we need to keep the IRQ pin
    low in normal case.
    Signed-off-by: default avatarJohn Lin <john.lin@realtek.com>
    Signed-off-by: default avatarBard Liao <bardliao@realtek.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    7ff6319e
rt5645.c 114 KB