• Laxman Dewangan's avatar
    regmap: irq: Add support to call client specific pre/post interrupt service · ccc12561
    Laxman Dewangan authored
    Regmap irq implements the generic interrupt service routine which
    is common for most of devices. Some devices, like MAX77620, MAX20024
    needs the special handling before and after servicing the interrupt
    as generic. For the example, MAX77620 programming guidelines for
    interrupt servicing says:
    1. When interrupt occurs from PMIC, mask the PMIC interrupt by setting
       GLBLM.
    2. Read IRQTOP and service the interrupt accordingly.
    3. Once all interrupts has been checked and serviced, the interrupt
       service routine un-masks the hardware interrupt line by clearing
       GLBLM.
    
    The step (2) is implemented in regmap irq as generic routine. For
    step (1) and (3), add callbacks from regmap irq to client driver
    to handle chip specific configurations.
    Signed-off-by: default avatarLaxman Dewangan <ldewangan@nvidia.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    ccc12561
regmap-irq.c 20.7 KB