aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/cec/cec-pin.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2017-10-31 09:55:09 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2018-03-22 08:00:59 -0400
commit22712b389e40ae0fa0526db8ca8b34bf8f787abf (patch)
tree67285882207129951bc9380ab55115f4384419b0 /drivers/media/cec/cec-pin.c
parentmedia: cec-pin: create cec_pin_start_timer() function (diff)
downloadlinux-dev-22712b389e40ae0fa0526db8ca8b34bf8f787abf.tar.xz
linux-dev-22712b389e40ae0fa0526db8ca8b34bf8f787abf.zip
media: cec-pin-error-inj: parse/show error injection
Add support to the CEC Pin framework to parse error injection commands and to show them. The next patch will do the actual implementation of this. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/cec/cec-pin.c')
-rw-r--r--drivers/media/cec/cec-pin.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/cec/cec-pin.c b/drivers/media/cec/cec-pin.c
index 67d6ea9f56b6..7920ea1c940b 100644
--- a/drivers/media/cec/cec-pin.c
+++ b/drivers/media/cec/cec-pin.c
@@ -771,6 +771,10 @@ static const struct cec_adap_ops cec_pin_adap_ops = {
.adap_transmit = cec_pin_adap_transmit,
.adap_status = cec_pin_adap_status,
.adap_free = cec_pin_adap_free,
+#ifdef CONFIG_CEC_PIN_ERROR_INJ
+ .error_inj_parse_line = cec_pin_error_inj_parse_line,
+ .error_inj_show = cec_pin_error_inj_show,
+#endif
};
struct cec_adapter *cec_pin_allocate_adapter(const struct cec_pin_ops *pin_ops,
@@ -785,6 +789,8 @@ struct cec_adapter *cec_pin_allocate_adapter(const struct cec_pin_ops *pin_ops,
hrtimer_init(&pin->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
pin->timer.function = cec_pin_timer;
init_waitqueue_head(&pin->kthread_waitq);
+ pin->tx_custom_low_usecs = CEC_TIM_CUSTOM_DEFAULT;
+ pin->tx_custom_high_usecs = CEC_TIM_CUSTOM_DEFAULT;
adap = cec_allocate_adapter(&cec_pin_adap_ops, priv, name,
caps | CEC_CAP_MONITOR_ALL | CEC_CAP_MONITOR_PIN,