• Linus Walleij's avatar
    gpio: ftgpio: Support debounce timer · 36f3f19a
    Linus Walleij authored
    The FTGPIO010 has a debounce timer or rather prescaler that
    will affect interrupts fireing off the block. We can support
    this to get proper debounce on e.g. keypresses.
    Since the same prescaler is used across all GPIO lines of
    the silicon block, we need to bail out if the prescaler is
    already set and in use by another line.
    If the prescaler is already set to what we need, fine, we
    reuse it. This happens more often than not when the same
    debounce time is set for several GPIO keys, so we support
    that usecase easily with this code.
    Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
gpio-ftgpio010.c 8.75 KB