summaryrefslogtreecommitdiffstats
path: root/drivers/media/rc
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2015-12-30 17:43:18 +0100
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-01-25 18:45:39 +0100
commitf2c2ba0e251d0b5211ce0397081b087ac623136f (patch)
treeca8b4d3e5071d6d1905b59fb0c57d05515881a73 /drivers/media/rc
parent[media] nuvoton-cir: fix clearing wake fifo (diff)
downloadlinux-f2c2ba0e251d0b5211ce0397081b087ac623136f.tar.xz
linux-f2c2ba0e251d0b5211ce0397081b087ac623136f.zip
[media] nuvoton-cir: use IR_DEFAULT_TIMEOUT and consider SAMPLE_PERIOD
Switch to using the recently introduced IR default timeout value (IR_DEFAULT_TIMEOUT) and consider the value of SAMPLE_PERIOD when calculating the limit count register value. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/rc')
-rw-r--r--drivers/media/rc/nuvoton-cir.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/rc/nuvoton-cir.h b/drivers/media/rc/nuvoton-cir.h
index 0ad15d34e9c9..6a3de08a17c0 100644
--- a/drivers/media/rc/nuvoton-cir.h
+++ b/drivers/media/rc/nuvoton-cir.h
@@ -157,8 +157,8 @@ struct nvt_dev {
/* total length of CIR and CIR WAKE */
#define CIR_IOREG_LENGTH 0x0f
-/* RX limit length, 8 high bits for SLCH, 8 low bits for SLCL (0x7d0 = 2000) */
-#define CIR_RX_LIMIT_COUNT 0x7d0
+/* RX limit length, 8 high bits for SLCH, 8 low bits for SLCL */
+#define CIR_RX_LIMIT_COUNT (IR_DEFAULT_TIMEOUT / US_TO_NS(SAMPLE_PERIOD))
/* CIR Regs */
#define CIR_IRCON 0x00