On Wed, Dec 26, 2018 at 12:49:53PM -0500, Brian Masney wrote: > Sorry but I should have been a little clearer that this is not > completely working yet for IRQs setup as a hierarchy, which is why I > haven't send out an official v1 patch series yet. /proc/interrupts > shows 0 interrupts fired for volume up/down after I press the buttons. > The wrong interrupt is fired. It's firing the virq associated with > the parent domain (54 on spmi-gpio) instead of the virq associated > with the child domain (110 on spmi-arb), which is why gpio-keys does not > see the interrupts. I reattached my original message since the > debugging the I included there may be useful. I tracked down the issue but I'm not exactly sure how to fix this yet. The initial device probing of spmi/spmi-pmic-arb.c and mfd/qcom-spmi-pmic.c triggers the function call qpnpint_irq_domain_alloc() in spmi-pmic-arb.c, which associates the hwirq with the Linux virq. There is no IRQ hierarchy setup at this point since pinctrl-spmi-gpio.c is not initialized yet. This is when Linux virq 54 is assigned to the pin for the volume up button. Further along in the boot process, gpio-keys is initialized, which calls the alloc functions for the IRQ domains pinctrl-spmi-gpio.c and spmi-pmic-arb.c. This is when Linux virq 110 is assigned for the volume up button. The hwirq for the volume up button is now associated with two Linux virqs (54 and 110). Later, when a hardware interrupt occurs, irq_find_mapping() returns the first virq (54). Brian