summaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/img-ir/img-ir-raw.h
diff options
context:
space:
mode:
authorJames Hogan2014-03-01 00:28:53 +0100
committerMauro Carvalho Chehab2014-03-11 19:13:00 +0100
commit3fed7dbe8b94ab45298d9e63b90c1c57a01b6d5b (patch)
treeca6f385a39c8d00472b878209232e4f8dfe80355 /drivers/media/rc/img-ir/img-ir-raw.h
parent[media] rc: img-ir: add base driver (diff)
downloadkernel-qcow2-linux-3fed7dbe8b94ab45298d9e63b90c1c57a01b6d5b.tar.gz
kernel-qcow2-linux-3fed7dbe8b94ab45298d9e63b90c1c57a01b6d5b.tar.xz
kernel-qcow2-linux-3fed7dbe8b94ab45298d9e63b90c1c57a01b6d5b.zip
[media] rc: img-ir: add raw driver
Add raw IR remote control input driver for the ImgTec Infrared decoder block's raw edge interrupts. Generic software protocol decoders are used to allow multiple protocols to be supported at a time, including those not supported by the hardware decoder. Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/rc/img-ir/img-ir-raw.h')
-rw-r--r--drivers/media/rc/img-ir/img-ir-raw.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/drivers/media/rc/img-ir/img-ir-raw.h b/drivers/media/rc/img-ir/img-ir-raw.h
new file mode 100644
index 000000000000..9802ffd51b9a
--- /dev/null
+++ b/drivers/media/rc/img-ir/img-ir-raw.h
@@ -0,0 +1,60 @@
+/*
+ * ImgTec IR Raw Decoder found in PowerDown Controller.
+ *
+ * Copyright 2010-2014 Imagination Technologies Ltd.
+ */
+
+#ifndef _IMG_IR_RAW_H_
+#define _IMG_IR_RAW_H_
+
+struct img_ir_priv;
+
+#ifdef CONFIG_IR_IMG_RAW
+
+/**
+ * struct img_ir_priv_raw - Private driver data for raw decoder.
+ * @rdev: Raw remote control device
+ * @timer: Timer to echo samples to keep soft decoders happy.
+ * @last_status: Last raw status bits.
+ */
+struct img_ir_priv_raw {
+ struct rc_dev *rdev;
+ struct timer_list timer;
+ u32 last_status;
+};
+
+static inline bool img_ir_raw_enabled(struct img_ir_priv_raw *raw)
+{
+ return raw->rdev;
+};
+
+void img_ir_isr_raw(struct img_ir_priv *priv, u32 irq_status);
+void img_ir_setup_raw(struct img_ir_priv *priv);
+int img_ir_probe_raw(struct img_ir_priv *priv);
+void img_ir_remove_raw(struct img_ir_priv *priv);
+
+#else
+
+struct img_ir_priv_raw {
+};
+static inline bool img_ir_raw_enabled(struct img_ir_priv_raw *raw)
+{
+ return false;
+};
+static inline void img_ir_isr_raw(struct img_ir_priv *priv, u32 irq_status)
+{
+}
+static inline void img_ir_setup_raw(struct img_ir_priv *priv)
+{
+}
+static inline int img_ir_probe_raw(struct img_ir_priv *priv)
+{
+ return -ENODEV;
+}
+static inline void img_ir_remove_raw(struct img_ir_priv *priv)
+{
+}
+
+#endif /* CONFIG_IR_IMG_RAW */
+
+#endif /* _IMG_IR_RAW_H_ */