linux/drivers/media
Hans Verkuil ea5c8ef296 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>
2017-07-18 12:57:18 -03:00
..
cec media: cec-pin: add low-level pin hardware support 2017-07-18 12:57:18 -03:00
common [media] b2c2: constify nxt200x_config structure 2017-04-17 12:18:18 -03:00
dvb-core Linux v4.13-rc1 2017-07-17 11:17:36 -03:00
dvb-frontends media: dvb-frontends/stv0367: Improve DVB-C/T frontend status 2017-06-25 10:48:45 -03:00
firewire
i2c media: ov6650: convert to standalone v4l2 subdevice 2017-07-18 12:14:31 -03:00
mmc
pci Linux v4.13-rc1 2017-07-17 11:17:36 -03:00
platform media: vimc: set id_table for platform drivers 2017-07-17 11:26:56 -03:00
radio Linux v4.13-rc1 2017-07-17 11:17:36 -03:00
rc [media] rc-core: cleanup rc_register_device pt2 2017-06-13 13:55:01 -03:00
spi
tuners media: tw5864, fc0011: better handle WARN_ON() 2017-06-24 16:19:27 -03:00
usb media: dvb-usb-v2: lmedm04: remove unnecessary variable in lme2510_stream_restart() 2017-06-24 18:46:05 -03:00
v4l2-core media: tuner-core: Remove unused #define PREFIX 2017-06-24 09:37:01 -03:00
Kconfig media: cec-pin: add low-level pin hardware support 2017-07-18 12:57:18 -03:00
Makefile [media] cec: select CEC_CORE instead of depend on it 2017-06-04 15:23:33 -03:00
media-device.c [media] media: Rename graph and pipeline structs and functions 2017-01-27 16:13:24 -02:00
media-devnode.c media: utilize new cdev_device_add helper function 2017-03-21 06:44:33 +01:00
media-entity.c [media] media: entity: Catch unbalanced media_pipeline_stop calls 2017-06-23 09:23:36 -03:00