• Andre Przywara's avatar
    mfd: axp20x: Allow AXP 806 chips without interrupt lines · 3efc465f
    Andre Przywara authored
    Currently the AXP chip requires to have its IRQ line connected to some
    interrupt controller, and will fail probing when this is not the case.
    
    On a new Allwinner SoC (H616) there is no NMI pin anymore, and at
    least one board does not connect the AXP's IRQ pin to anything else,
    so the interrupt functionality of the AXP chip is simply not available.
    
    Check whether the interrupt line number returned by the platform code is
    valid, before trying to register the irqchip. If not, we skip this
    registration, to avoid the driver to bail out completely.
    Also we need to skip the power key functionality, as this relies on
    a valid IRQ as well.
    Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
    Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
    3efc465f
axp20x.c 34.2 KB