diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2017-07-11 09:30:42 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-07-18 18:57:18 +0300 |
commit | ea5c8ef296681b53480ebeeffd06083bb60e693d (patch) | |
tree | 672a2ad5ce04c93d6e5a6afff7eeb290147bf3f1 /drivers/media/Kconfig | |
parent | b8d62f50b1df2571afcf47107bbbe9cd60f8aafd (diff) | |
download | linux-ea5c8ef296681b53480ebeeffd06083bb60e693d.tar.xz |
media: cec-pin: add low-level pin hardware support
Add support for CEC hardware that relies on low-level pin polling or
GPIO interrupts.
One example is the Allwinner SoC. But any GPIO-based CEC implementation can
use this as well.
A GPIO implementation is very suitable as well for debugging: it can use
interrupts to detect state changes and report it. Userspace can then verify
if the bus traffic is correct. This also makes error injection possible.
The disadvantage is that it is hard to get the timings right since linux
isn't a hard realtime system.
In general on an idle system it works quite well, but under load the timer
will miss its mark every so often.
The debugfs file /sys/kernel/debug/cec/cecX/status gives some statistics
with respect to the timer overruns.
When the adapter is unconfigured and the low-level driver supports
interrupts, then the interrupt will be used to detect changes. This should
be quite accurate. But when the adapter is configured a hrtimer has to be
used.
The hrtimer implements a state machine where for each state the code will
read the bus or drive the bus and go on to the next state. It will re-arm
the timer with a delay based on the next state.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/Kconfig')
-rw-r--r-- | drivers/media/Kconfig | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig index 55d9c2b82b7e..94d4e7759127 100644 --- a/drivers/media/Kconfig +++ b/drivers/media/Kconfig @@ -8,6 +8,9 @@ config CEC_CORE config CEC_NOTIFIER bool +config CEC_PIN + bool + menuconfig MEDIA_SUPPORT tristate "Multimedia support" depends on HAS_IOMEM |