]> git.baikalelectronics.ru Git - kernel.git/commit
[media] img-ir/hw: Always read data to clear buffer
authorDylan Rajaratnam <dylan.rajaratnam@imgtec.com>
Mon, 17 Nov 2014 12:17:45 +0000 (09:17 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 4 Dec 2014 17:28:53 +0000 (15:28 -0200)
commit8c871ad64a79854ef7c3556a27d59c081acaf733
tree39f6dbb45ab98a1b0141aa103810fcca504dcb2d
parentcf6a6d4548f545ebd52ac08344bf98cc194b5630
[media] img-ir/hw: Always read data to clear buffer

A problem was found on Polaris where if the unit it booted via the power
button on the infrared remote then the next button press on the remote
would return the key code used to power on the unit.

The sequence is:
 - The polaris powered off but with the powerdown controller (PDC) block
   still powered.
 - Press power key on remote, IR block receives the key.
 - Kernel starts, IR code is in IMG_IR_DATA_x but neither IMG_IR_RXDVAL
   or IMG_IR_RXDVALD2 are set.
 - Wait any amount of time.
 - Press any key.
 - IMG_IR_RXDVAL or IMG_IR_RXDVALD2 is set but IMG_IR_DATA_x is
   unchanged since the powerup key data was never read.

This is worked around by always reading the IMG_IR_DATA_x in
img_ir_set_decoder(), rather than only when the IMG_IR_RXDVAL or
IMG_IR_RXDVALD2 bit is set.

Signed-off-by: Dylan Rajaratnam <dylan.rajaratnam@imgtec.com>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: <stable@vger.kernel.org> # v3.15+
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/rc/img-ir/img-ir-hw.c