• Hans de Goede's avatar
    platform/x86: x86-android-tablets: Add support for PMIC interrupts · cd26465f
    Hans de Goede authored
    The Crystal Cove PMIC has a pin which can be used to connect the IRQ of
    an external charger IC. On some boards this is used so we need a way to
    look this up.
    
    Note that the Intel PMICs have 2 levels of interrupts and thus
    2 levels of IRQ domains all tied to a single fwnode.
    
    Level 1 is the irqchip which demultiplexes the actual PMIC interrupt into
    interrupts for the various MFD cells. Level 2 are the irqchips used in the
    cell drivers which themselves export IRQs, such as the crystal_cove_gpio
    driver, which de-multiplexes the level 2 interrupts for the GPIOs into
    individual per GPIO IRQs.
    
    The crystal_cove_charger driver registers an irqchip with a single IRQ for
    the charger driver to consume. Note the MFD cell IRQ cannot be consumed
    directly because the level 2 interrupts must be explicitly acked.
    
    To allow finding the right IRQ domain when looking up the IRQ for
    the charger, the crystal_cove_charger driver sets a DOMAIN_BUS_WIRED token
    on its IRQ domain.
    
    Add support for looking up the IRQ from the crystal_cove_charger driver.
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    Link: https://lore.kernel.org/r/20211229231431.437982-6-hdegoede@redhat.com
    cd26465f
x86-android-tablets.c 9.18 KB