]> www.infradead.org Git - users/dwmw2/linux.git/commit
usb: typec: tcpci: support edge irq
authorEmanuele Ghidoli <emanuele.ghidoli@toradex.com>
Thu, 5 Sep 2024 06:53:28 +0000 (08:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Sep 2024 13:35:11 +0000 (15:35 +0200)
commit77e85107a7717ecb755cf77a2752a2aadd28c4e3
tree772cb3ffa7be822d2a95dad6fde3b5bb7e5f8a69
parent7793472be315c5bddbb5cabb55e61ea9a7dca755
usb: typec: tcpci: support edge irq

TCPCI USB PHY - PTN5110 could be used with SOCs that only support
the edge-triggered GPIO interrupts such as TI's K3 device AM69.
Move the interrupt configuration to the firmware which would
allow to accommodate edge triggered interrupts for such SOCs.
In order to support the edge interrupts, register irq line in advance
and keep track of occurrence during port registering.

When the edge interrupts are used, it is observed that some of the
interrupts are missed when tcpci_irq() is serving the current
interrupt. Therefore, check the status register at the end of
tcpci_irq() and re-run the function if the status is not clear
i.e. pending interrupt.

Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Signed-off-by: Parth Pancholi <parth.pancholi@toradex.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Link: https://lore.kernel.org/r/20240905065328.7116-1-parth105105@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tcpm/tcpci.c