aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-11-17 11:53:11 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-12-29 05:16:50 -0500
commitca86674b8a93ea11c4bb6f4dd0113b1adf1fa841 (patch)
tree1f51d1aafa28121856b033516a00998a632e2864 /include
parent6bda96447cef24fbf97a798b1ea664224d5fdc25 (diff)
[media] Rename all public generic RC functions from ir_ to rc_
Those functions are not InfraRed specific. So, rename them to properly reflect it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/media/rc-core.h49
1 files changed, 29 insertions, 20 deletions
diff --git a/include/media/rc-core.h b/include/media/rc-core.h
index eedb2f0575a4..170581b4fa84 100644
--- a/include/media/rc-core.h
+++ b/include/media/rc-core.h
@@ -13,8 +13,8 @@
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 */ 14 */
15 15
16#ifndef _IR_CORE 16#ifndef _RC_CORE
17#define _IR_CORE 17#define _RC_CORE
18 18
19#include <linux/spinlock.h> 19#include <linux/spinlock.h>
20#include <linux/kfifo.h> 20#include <linux/kfifo.h>
@@ -120,6 +120,32 @@ struct rc_dev {
120 int (*s_carrier_report) (struct rc_dev *dev, int enable); 120 int (*s_carrier_report) (struct rc_dev *dev, int enable);
121}; 121};
122 122
123#define to_rc_dev(d) container_of(d, struct rc_dev, dev)
124
125/*
126 * From rc-main.c
127 * Those functions can be used on any type of Remote Controller. They
128 * basically creates an input_dev and properly reports the device as a
129 * Remote Controller, at sys/class/rc.
130 */
131
132struct rc_dev *rc_allocate_device(void);
133void rc_free_device(struct rc_dev *dev);
134int rc_register_device(struct rc_dev *dev);
135void rc_unregister_device(struct rc_dev *dev);
136
137void rc_repeat(struct rc_dev *dev);
138void rc_keydown(struct rc_dev *dev, int scancode, u8 toggle);
139void rc_keydown_notimeout(struct rc_dev *dev, int scancode, u8 toggle);
140void rc_keyup(struct rc_dev *dev);
141u32 rc_g_keycode_from_table(struct rc_dev *dev, u32 scancode);
142
143/*
144 * From rc-raw.c
145 * The Raw interface is specific to InfraRed. It may be a good idea to
146 * split it later into a separate header.
147 */
148
123enum raw_event_type { 149enum raw_event_type {
124 IR_SPACE = (1 << 0), 150 IR_SPACE = (1 << 0),
125 IR_PULSE = (1 << 1), 151 IR_PULSE = (1 << 1),
@@ -127,16 +153,6 @@ enum raw_event_type {
127 IR_STOP_EVENT = (1 << 3), 153 IR_STOP_EVENT = (1 << 3),
128}; 154};
129 155
130#define to_rc_dev(d) container_of(d, struct rc_dev, dev)
131
132
133void ir_repeat(struct rc_dev *dev);
134void ir_keydown(struct rc_dev *dev, int scancode, u8 toggle);
135void ir_keydown_notimeout(struct rc_dev *dev, int scancode, u8 toggle);
136void ir_keyup(struct rc_dev *dev);
137u32 ir_g_keycode_from_table(struct rc_dev *dev, u32 scancode);
138
139/* From ir-raw-event.c */
140struct ir_raw_event { 156struct ir_raw_event {
141 union { 157 union {
142 u32 duration; 158 u32 duration;
@@ -168,11 +184,6 @@ static inline void init_ir_raw_event(struct ir_raw_event *ev)
168 184
169#define IR_MAX_DURATION 0xFFFFFFFF /* a bit more than 4 seconds */ 185#define IR_MAX_DURATION 0xFFFFFFFF /* a bit more than 4 seconds */
170 186
171struct rc_dev *rc_allocate_device(void);
172void rc_free_device(struct rc_dev *dev);
173int rc_register_device(struct rc_dev *dev);
174void rc_unregister_device(struct rc_dev *dev);
175
176void ir_raw_event_handle(struct rc_dev *dev); 187void ir_raw_event_handle(struct rc_dev *dev);
177int ir_raw_event_store(struct rc_dev *dev, struct ir_raw_event *ev); 188int ir_raw_event_store(struct rc_dev *dev, struct ir_raw_event *ev);
178int ir_raw_event_store_edge(struct rc_dev *dev, enum raw_event_type type); 189int ir_raw_event_store_edge(struct rc_dev *dev, enum raw_event_type type);
@@ -189,7 +200,6 @@ static inline void ir_raw_event_reset(struct rc_dev *dev)
189 ir_raw_event_handle(dev); 200 ir_raw_event_handle(dev);
190} 201}
191 202
192
193/* extract mask bits out of data and pack them into the result */ 203/* extract mask bits out of data and pack them into the result */
194static inline u32 ir_extract_bits(u32 data, u32 mask) 204static inline u32 ir_extract_bits(u32 data, u32 mask)
195{ 205{
@@ -207,5 +217,4 @@ static inline u32 ir_extract_bits(u32 data, u32 mask)
207 return value; 217 return value;
208} 218}
209 219
210 220#endif /* _RC_CORE */
211#endif /* _IR_CORE */