Merge tag 'perf-core-for-mingo-20160803' of git://git.kernel.org/pub/scm/linux/kernel...
[deliverable/linux.git] / drivers / media / rc / img-ir / img-ir-raw.h
1 /*
2 * ImgTec IR Raw Decoder found in PowerDown Controller.
3 *
4 * Copyright 2010-2014 Imagination Technologies Ltd.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11
12 #ifndef _IMG_IR_RAW_H_
13 #define _IMG_IR_RAW_H_
14
15 struct img_ir_priv;
16
17 #ifdef CONFIG_IR_IMG_RAW
18
19 /**
20 * struct img_ir_priv_raw - Private driver data for raw decoder.
21 * @rdev: Raw remote control device
22 * @timer: Timer to echo samples to keep soft decoders happy.
23 * @last_status: Last raw status bits.
24 */
25 struct img_ir_priv_raw {
26 struct rc_dev *rdev;
27 struct timer_list timer;
28 u32 last_status;
29 };
30
31 static inline bool img_ir_raw_enabled(struct img_ir_priv_raw *raw)
32 {
33 return raw->rdev;
34 };
35
36 void img_ir_isr_raw(struct img_ir_priv *priv, u32 irq_status);
37 void img_ir_setup_raw(struct img_ir_priv *priv);
38 int img_ir_probe_raw(struct img_ir_priv *priv);
39 void img_ir_remove_raw(struct img_ir_priv *priv);
40
41 #else
42
43 struct img_ir_priv_raw {
44 };
45 static inline bool img_ir_raw_enabled(struct img_ir_priv_raw *raw)
46 {
47 return false;
48 };
49 static inline void img_ir_isr_raw(struct img_ir_priv *priv, u32 irq_status)
50 {
51 }
52 static inline void img_ir_setup_raw(struct img_ir_priv *priv)
53 {
54 }
55 static inline int img_ir_probe_raw(struct img_ir_priv *priv)
56 {
57 return -ENODEV;
58 }
59 static inline void img_ir_remove_raw(struct img_ir_priv *priv)
60 {
61 }
62
63 #endif /* CONFIG_IR_IMG_RAW */
64
65 #endif /* _IMG_IR_RAW_H_ */
This page took 0.047006 seconds and 5 git commands to generate.