Other Parts Discussed in Thread: TPS65217, AM3354, TPS65218
Tool/software: Linux
Hello,
I'm using a custom board based on am3354 with a 4.9.69 kernel and a tps65217 pmic.
I'm trying to generated an event when I press the power button.
I followed the documentation, but if I add the following line in my dts file, I can see /dev/input/event0 but no event is generated when I press the button.
tps65217-pwrbutton { compatible = "ti,tps65217-pwrbutton"; interrupts = <2>; };
However if I change interrupts from 2 to 7 (which is the NMI the PMIC is connected to)
tps65217-pwrbutton { compatible = "ti,tps65217-pwrbutton"; interrupts = <7>; };
I can see events on /dev/input/event0 each time I press the button which seems fine.
But in fact the interrupt is never cleared (checked with a scope), so the driver keeps reading the PMIC status register and end up using most of the CPU power...
Did I miss something? Or should I patch the driver to read the INT register on the PMIC to clear the interrupt?
I also tried adding
interrupt-parent = <&intc>; interrupts = <7>; /* NNMI */
in the &tps block, but if I do that, tps65217-irq drivers masks all interrupts in the PMIC, and I couldn't find how to enable back the Power Button one.
Thanks for your help,
Antoine