[media] nuvoton-cir: use IR_DEFAULT_TIMEOUT and consider SAMPLE_PERIOD
authorHeiner Kallweit <hkallweit1@gmail.com>
Wed, 30 Dec 2015 16:43:18 +0000 (14:43 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 25 Jan 2016 17:45:39 +0000 (15:45 -0200)
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>
drivers/media/rc/nuvoton-cir.h

index 0ad15d34e9c93ce8adedd5f114f84543776f3055..6a3de08a17c0468f09b1c407f9406cac732501a0 100644 (file)
@@ -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
This page took 0.026019 seconds and 5 git commands to generate.