summaryrefslogtreecommitdiff
path: root/drivers/media/rc/nuvoton-cir.h
diff options
context:
space:
mode:
authorJarod Wilson <jarod@redhat.com>2011-03-01 18:38:02 +0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-02 20:12:24 +0300
commit3198ed161c9be9bbd15bb2e9c22561248cac6e6a (patch)
treef830f4d5733136eace1e919eb8a3cfcc1066437e /drivers/media/rc/nuvoton-cir.h
parente3bfeabbf5ba5da7f6cc5d53a83cb7765220c619 (diff)
downloadlinux-3198ed161c9be9bbd15bb2e9c22561248cac6e6a.tar.xz
[media] nuvoton-cir: fix wake from suspend
The CIR Wake FIFO is 67 bytes long, but the stock remote appears to only populate 65 of them. Limit comparison to 65 bytes, and wake from suspend works a whole lot better (it wasn't working at all for most folks). Fix based on comparison with the old lirc_wb677 driver from Nuvoton, debugging and testing done by Dave Treacy by way of the lirc mailing list. Reported-by: Dave Treacy <davetreacy@gmail.com> Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/rc/nuvoton-cir.h')
-rw-r--r--drivers/media/rc/nuvoton-cir.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/rc/nuvoton-cir.h b/drivers/media/rc/nuvoton-cir.h
index 1df82351cb03..048135eea702 100644
--- a/drivers/media/rc/nuvoton-cir.h
+++ b/drivers/media/rc/nuvoton-cir.h
@@ -305,8 +305,11 @@ struct nvt_dev {
#define CIR_WAKE_IRFIFOSTS_RX_EMPTY 0x20
#define CIR_WAKE_IRFIFOSTS_RX_FULL 0x10
-/* CIR Wake FIFO buffer is 67 bytes long */
-#define CIR_WAKE_FIFO_LEN 67
+/*
+ * The CIR Wake FIFO buffer is 67 bytes long, but the stock remote wakes
+ * the system comparing only 65 bytes (fails with this set to 67)
+ */
+#define CIR_WAKE_FIFO_CMP_BYTES 65
/* CIR Wake byte comparison tolerance */
#define CIR_WAKE_CMP_TOLERANCE 5