media: adv7511: fix clearing of the CEC receive buffer
authorHans Verkuil <hverkuil@xs4all.nl>
Tue, 15 May 2018 08:50:05 +0000 (04:50 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 25 May 2018 22:37:20 +0000 (18:37 -0400)
commit3c785e48786f9f7ef19a69433ba4c6ce83c949fa
tree5bd77b74365e672839f180c8eafdfa82c33cc32b
parent72c7caa4864255d1f927fd1ab52122a8dbd30f38
media: adv7511: fix clearing of the CEC receive buffer

The CEC receive buffer was not always cleared correctly. The
datasheet was a bit confusing since sometimes it mentioned that the
bit in CEC register 0x4a had to be toggled, and sometimes it suggested
it was a 'Clear-on-write' bit. But it really needs to be toggled.

The patch also enables/disables the CEC irqs after the other irq are
enabled/disabled instead of doing it before. It may not matter, but it
feels more logical to do it in that order, and the implementation that
we (Cisco) have used until now and that is known to be reliable also
did it in that order.

Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/i2c/adv7511.c