]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
media: linux/cec.h: add pin monitoring API support
authorHans Verkuil <hans.verkuil@cisco.com>
Tue, 11 Jul 2017 06:30:38 +0000 (03:30 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 18 Jul 2017 15:48:37 +0000 (12:48 -0300)
Add support for low-level CEC pin monitoring. This adds a new monitor
mode, a new capability and two new events.

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>
include/uapi/linux/cec.h

index 44579a24f95d637836d528d803a05c2c27323234..bba73f33c8aa3466ef6a30911d9603e225aca9da 100644 (file)
@@ -318,6 +318,7 @@ static inline int cec_is_unconfigured(__u16 log_addr_mask)
 #define CEC_MODE_FOLLOWER              (0x1 << 4)
 #define CEC_MODE_EXCL_FOLLOWER         (0x2 << 4)
 #define CEC_MODE_EXCL_FOLLOWER_PASSTHRU        (0x3 << 4)
+#define CEC_MODE_MONITOR_PIN           (0xd << 4)
 #define CEC_MODE_MONITOR               (0xe << 4)
 #define CEC_MODE_MONITOR_ALL           (0xf << 4)
 #define CEC_MODE_FOLLOWER_MSK          0xf0
@@ -338,6 +339,8 @@ static inline int cec_is_unconfigured(__u16 log_addr_mask)
 #define CEC_CAP_MONITOR_ALL    (1 << 5)
 /* Hardware can use CEC only if the HDMI HPD pin is high. */
 #define CEC_CAP_NEEDS_HPD      (1 << 6)
+/* Hardware can monitor CEC pin transitions */
+#define CEC_CAP_MONITOR_PIN    (1 << 7)
 
 /**
  * struct cec_caps - CEC capabilities structure.
@@ -405,6 +408,8 @@ struct cec_log_addrs {
  * didn't empty the message queue in time
  */
 #define CEC_EVENT_LOST_MSGS            2
+#define CEC_EVENT_PIN_LOW              3
+#define CEC_EVENT_PIN_HIGH             4
 
 #define CEC_EVENT_FL_INITIAL_STATE     (1 << 0)