xref: /linux/drivers/media/rc/img-ir/img-ir-raw.h (revision 2a2c74b2efcb1a0ca3fdcb5fbb96ad8de6a29177)
1 /*
2  * ImgTec IR Raw Decoder found in PowerDown Controller.
3  *
4  * Copyright 2010-2014 Imagination Technologies Ltd.
5  */
6 
7 #ifndef _IMG_IR_RAW_H_
8 #define _IMG_IR_RAW_H_
9 
10 struct img_ir_priv;
11 
12 #ifdef CONFIG_IR_IMG_RAW
13 
14 /**
15  * struct img_ir_priv_raw - Private driver data for raw decoder.
16  * @rdev:		Raw remote control device
17  * @timer:		Timer to echo samples to keep soft decoders happy.
18  * @last_status:	Last raw status bits.
19  */
20 struct img_ir_priv_raw {
21 	struct rc_dev		*rdev;
22 	struct timer_list	timer;
23 	u32			last_status;
24 };
25 
26 static inline bool img_ir_raw_enabled(struct img_ir_priv_raw *raw)
27 {
28 	return raw->rdev;
29 };
30 
31 void img_ir_isr_raw(struct img_ir_priv *priv, u32 irq_status);
32 void img_ir_setup_raw(struct img_ir_priv *priv);
33 int img_ir_probe_raw(struct img_ir_priv *priv);
34 void img_ir_remove_raw(struct img_ir_priv *priv);
35 
36 #else
37 
38 struct img_ir_priv_raw {
39 };
40 static inline bool img_ir_raw_enabled(struct img_ir_priv_raw *raw)
41 {
42 	return false;
43 };
44 static inline void img_ir_isr_raw(struct img_ir_priv *priv, u32 irq_status)
45 {
46 }
47 static inline void img_ir_setup_raw(struct img_ir_priv *priv)
48 {
49 }
50 static inline int img_ir_probe_raw(struct img_ir_priv *priv)
51 {
52 	return -ENODEV;
53 }
54 static inline void img_ir_remove_raw(struct img_ir_priv *priv)
55 {
56 }
57 
58 #endif /* CONFIG_IR_IMG_RAW */
59 
60 #endif /* _IMG_IR_RAW_H_ */
61