diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2017-08-20 13:53:10 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-08-26 15:35:10 +0300 |
commit | 28e11b15b6606c3308f87f7c9c4c9e404eddde6d (patch) | |
tree | 4cd4c99a2eb10e773d7aa967286ae10ced76c4db /drivers/media/cec/cec-core.c | |
parent | 152b0a9a3d62f90e6784a5d35ffc3f552f1c2c54 (diff) | |
download | linux-28e11b15b6606c3308f87f7c9c4c9e404eddde6d.tar.xz |
media: cec: replace pin->cur_value by adap->cec_pin_is_high
The current CEC pin value (0 or 1) was part of the cec_pin struct,
but that assumes that CEC pin monitoring can only be used with
a driver that uses the low-level CEC pin framework.
But hardware that has both a high-level API and can monitor the
CEC pin at low-level at the same time does not need to depend on
the cec pin framework.
To support such devices remove the cur_value field from struct cec_pin
and add a cec_pin_is_high field to cec_adapter. This also makes it
possible to drop the '#ifdef CONFIG_CEC_PIN' in cec-api.c.
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-core.c')
-rw-r--r-- | drivers/media/cec/cec-core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/cec/cec-core.c b/drivers/media/cec/cec-core.c index e9db90997b0a..648136e552d5 100644 --- a/drivers/media/cec/cec-core.c +++ b/drivers/media/cec/cec-core.c @@ -227,6 +227,7 @@ struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops, return ERR_PTR(-ENOMEM); strlcpy(adap->name, name, sizeof(adap->name)); adap->phys_addr = CEC_PHYS_ADDR_INVALID; + adap->cec_pin_is_high = true; adap->log_addrs.cec_version = CEC_OP_CEC_VERSION_2_0; adap->log_addrs.vendor_id = CEC_VENDOR_ID_NONE; adap->capabilities = caps; |