summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2018-05-22 07:33:14 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-05-28 16:25:45 -0400
commit00f6f92dbbeb3b98d38b26449be0df46b2e6d6a4 (patch)
tree288c457888589971474f62906ef89a79322f9377 /drivers/media
parent736781584931f4069c5a9f09af50490c70bd26a7 (diff)
downloadlinux-00f6f92dbbeb3b98d38b26449be0df46b2e6d6a4.tar.bz2
media: adv7511: fix incorrect clear of CEC receive interrupt
If a CEC message was received and the RX interrupt was set, but not yet processed, and a new transmit was issues, then the transmit code would inadvertently clear the RX interrupt and after that no new messages would ever be received. Instead it should only clear TX interrupts since register 0x97 is a clear-on-write register. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/i2c/adv7511.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/i2c/adv7511.c b/drivers/media/i2c/adv7511.c
index d4b191c5ac47..5731751d3f2a 100644
--- a/drivers/media/i2c/adv7511.c
+++ b/drivers/media/i2c/adv7511.c
@@ -831,8 +831,8 @@ static int adv7511_cec_adap_transmit(struct cec_adapter *adap, u8 attempts,
*/
adv7511_cec_write_and_or(sd, 0x12, ~0x70, max(1, attempts - 1) << 4);
- /* blocking, clear cec tx irq status */
- adv7511_wr_and_or(sd, 0x97, 0xc7, 0x38);
+ /* clear cec tx irq status */
+ adv7511_wr(sd, 0x97, 0x38);
/* write data */
for (i = 0; i < len; i++)