summaryrefslogtreecommitdiffstats
path: root/include/media/cec-pin.h
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2017-08-15 16:07:25 +0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-09-23 13:43:04 +0200
commit333ef6bd10c3ffdaf6da94e34dc6cae675ed27fc (patch)
tree0f01c42950d43741dcac85bb4a31397cd3fb5e56 /include/media/cec-pin.h
parentmedia: cec-core.rst/cec-ioc-receive.rst: clarify CEC_TX_STATUS_ERROR (diff)
downloadlinux-333ef6bd10c3ffdaf6da94e34dc6cae675ed27fc.tar.xz
linux-333ef6bd10c3ffdaf6da94e34dc6cae675ed27fc.zip
media: cec: add CEC_EVENT_PIN_HPD_LOW/HIGH events
Add support for two new low-level events: PIN_HPD_LOW and PIN_HPD_HIGH. This is specifically meant for use with the upcoming cec-gpio driver and makes it possible to trace when the HPD pin changes. Some HDMI sinks do strange things with the HPD and this makes it easy to debug this. Note that this also moves the initialization of a devnode mutex and list to the allocate_adapter function: if the HPD is high, then as soon as the HPD interrupt is created an interrupt occurs and cec_queue_pin_hpd_event() is called which requires that the devnode mutex and list are initialized. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'include/media/cec-pin.h')
-rw-r--r--include/media/cec-pin.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/media/cec-pin.h b/include/media/cec-pin.h
index f09cc9579d53..ea84b9c9e0c3 100644
--- a/include/media/cec-pin.h
+++ b/include/media/cec-pin.h
@@ -97,6 +97,9 @@ enum cec_pin_state {
* @free: optional. Free any allocated resources. Called when the
* adapter is deleted.
* @status: optional, log status information.
+ * @read_hpd: read the HPD pin. Return true if high, false if low or
+ * an error if negative. If NULL or -ENOTTY is returned,
+ * then this is not supported.
*
* These operations are used by the cec pin framework to manipulate
* the CEC pin.
@@ -109,6 +112,7 @@ struct cec_pin_ops {
void (*disable_irq)(struct cec_adapter *adap);
void (*free)(struct cec_adapter *adap);
void (*status)(struct cec_adapter *adap, struct seq_file *file);
+ int (*read_hpd)(struct cec_adapter *adap);
};
#define CEC_NUM_PIN_EVENTS 128