]> git.baikalelectronics.ru Git - kernel.git/commit
media: cec: replace pin->cur_value by adap->cec_pin_is_high
authorHans Verkuil <hans.verkuil@cisco.com>
Sun, 20 Aug 2017 10:53:10 +0000 (06:53 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sat, 26 Aug 2017 12:35:10 +0000 (08:35 -0400)
commit6959c5d3f636d0bae6399afd69184dd858f5e4ed
tree4cd4c99a2eb10e773d7aa967286ae10ced76c4db
parentcd5596e260a45003737250c6ebdf192a73c39834
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>
drivers/media/cec/cec-api.c
drivers/media/cec/cec-core.c
drivers/media/cec/cec-pin.c
include/media/cec-pin.h
include/media/cec.h