mbox series

[0/4] cec-pin/cec-gpio: improve irq handling

Message ID 20230707112641.338232-1-hverkuil-cisco@xs4all.nl (mailing list archive)
Headers show
Series cec-pin/cec-gpio: improve irq handling | expand

Message

Hans Verkuil July 7, 2023, 11:26 a.m. UTC
The CEC interrupt is really only needed when the CEC device
is unconfigured and you want to monitor the CEC pin with
high precision.

The current code enables the irq for a short period when it
is first requested, and for a short while just before the
CEC device is configured. None of this is needed, so rework
the code to ensure it is only enabled when it is really needed.

In addition, the pin framework will now log the interrupt state
in the debugfs status file.

Hans Verkuil (4):
  cec-gpio: specify IRQF_NO_AUTOEN when requesting irq
  cec-pin: improve interrupt handling
  cec-gpio: drop the cec_gpio_free callback
  cec-pin: only enable interrupts when monitoring the CEC pin

 drivers/media/cec/core/cec-pin-priv.h         |  1 +
 drivers/media/cec/core/cec-pin.c              | 32 +++++++++++++------
 .../media/cec/platform/cec-gpio/cec-gpio.c    | 10 +-----
 3 files changed, 24 insertions(+), 19 deletions(-)