Skip to content
  • Damien Riegel's avatar
    Input: tca8418 - enable interrupt after it has been requested · 8f75bc33
    Damien Riegel authored
    
    
    Currently, enabling keypad interrupts is one of the first operations
    done on the keypad, even before the interrupt is requested, so there is
    a small time window where the keypad can fire interrupts but the driver
    is not yet ready to handle them. It's fine for level interrupts because
    they will be handled anyway, but not so much for edge ones.
    
    This commit modifies and moves the function in charge of configuring the
    keypad. Enabling interrupts is now the last thing done on the keypad,
    and after the interrupt has been requested by the driver.
    
    Writing to the config register was also used to determine if the device
    was indeed present on the bus or not, this has been replaced by reading
    the lock/event count register to keep the same functionality.
    
    Signed-off-by: default avatarDamien Riegel <damien.riegel@savoirfairelinux.com>
    Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
    8f75bc33