diff options
Diffstat (limited to 'drivers/media/dvb/dvb-usb/dvb-usb.h')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb-usb.h | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb.h b/drivers/media/dvb/dvb-usb/dvb-usb.h index 34f7b3ba8cc7..76a80968482a 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb.h +++ b/drivers/media/dvb/dvb-usb/dvb-usb.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/usb.h> | 14 | #include <linux/usb.h> |
15 | #include <linux/firmware.h> | 15 | #include <linux/firmware.h> |
16 | #include <linux/mutex.h> | 16 | #include <linux/mutex.h> |
17 | #include <media/ir-core.h> | 17 | #include <media/rc-core.h> |
18 | 18 | ||
19 | #include "dvb_frontend.h" | 19 | #include "dvb_frontend.h" |
20 | #include "dvb_demux.h" | 20 | #include "dvb_demux.h" |
@@ -75,17 +75,17 @@ struct dvb_usb_device_description { | |||
75 | struct usb_device_id *warm_ids[DVB_USB_ID_MAX_NUM]; | 75 | struct usb_device_id *warm_ids[DVB_USB_ID_MAX_NUM]; |
76 | }; | 76 | }; |
77 | 77 | ||
78 | static inline u8 rc5_custom(struct ir_scancode *key) | 78 | static inline u8 rc5_custom(struct rc_map_table *key) |
79 | { | 79 | { |
80 | return (key->scancode >> 8) & 0xff; | 80 | return (key->scancode >> 8) & 0xff; |
81 | } | 81 | } |
82 | 82 | ||
83 | static inline u8 rc5_data(struct ir_scancode *key) | 83 | static inline u8 rc5_data(struct rc_map_table *key) |
84 | { | 84 | { |
85 | return key->scancode & 0xff; | 85 | return key->scancode & 0xff; |
86 | } | 86 | } |
87 | 87 | ||
88 | static inline u8 rc5_scan(struct ir_scancode *key) | 88 | static inline u8 rc5_scan(struct rc_map_table *key) |
89 | { | 89 | { |
90 | return key->scancode & 0xffff; | 90 | return key->scancode & 0xffff; |
91 | } | 91 | } |
@@ -159,9 +159,9 @@ struct dvb_usb_adapter_properties { | |||
159 | 159 | ||
160 | /** | 160 | /** |
161 | * struct dvb_rc_legacy - old properties of remote controller | 161 | * struct dvb_rc_legacy - old properties of remote controller |
162 | * @rc_key_map: a hard-wired array of struct ir_scancode (NULL to disable | 162 | * @rc_map_table: a hard-wired array of struct rc_map_table (NULL to disable |
163 | * remote control handling). | 163 | * remote control handling). |
164 | * @rc_key_map_size: number of items in @rc_key_map. | 164 | * @rc_map_size: number of items in @rc_map_table. |
165 | * @rc_query: called to query an event event. | 165 | * @rc_query: called to query an event event. |
166 | * @rc_interval: time in ms between two queries. | 166 | * @rc_interval: time in ms between two queries. |
167 | */ | 167 | */ |
@@ -170,8 +170,8 @@ struct dvb_rc_legacy { | |||
170 | #define REMOTE_NO_KEY_PRESSED 0x00 | 170 | #define REMOTE_NO_KEY_PRESSED 0x00 |
171 | #define REMOTE_KEY_PRESSED 0x01 | 171 | #define REMOTE_KEY_PRESSED 0x01 |
172 | #define REMOTE_KEY_REPEAT 0x02 | 172 | #define REMOTE_KEY_REPEAT 0x02 |
173 | struct ir_scancode *rc_key_map; | 173 | struct rc_map_table *rc_map_table; |
174 | int rc_key_map_size; | 174 | int rc_map_size; |
175 | int (*rc_query) (struct dvb_usb_device *, u32 *, int *); | 175 | int (*rc_query) (struct dvb_usb_device *, u32 *, int *); |
176 | int rc_interval; | 176 | int rc_interval; |
177 | }; | 177 | }; |
@@ -180,18 +180,22 @@ struct dvb_rc_legacy { | |||
180 | * struct dvb_rc properties of remote controller, using rc-core | 180 | * struct dvb_rc properties of remote controller, using rc-core |
181 | * @rc_codes: name of rc codes table | 181 | * @rc_codes: name of rc codes table |
182 | * @protocol: type of protocol(s) currently used by the driver | 182 | * @protocol: type of protocol(s) currently used by the driver |
183 | * @allowed_protos: protocol(s) supported by the driver | ||
184 | * @driver_type: Used to point if a device supports raw mode | ||
185 | * @change_protocol: callback to change protocol | ||
183 | * @rc_query: called to query an event event. | 186 | * @rc_query: called to query an event event. |
184 | * @rc_interval: time in ms between two queries. | 187 | * @rc_interval: time in ms between two queries. |
185 | * @rc_props: remote controller properties | ||
186 | * @bulk_mode: device supports bulk mode for RC (disable polling mode) | 188 | * @bulk_mode: device supports bulk mode for RC (disable polling mode) |
187 | */ | 189 | */ |
188 | struct dvb_rc { | 190 | struct dvb_rc { |
189 | char *rc_codes; | 191 | char *rc_codes; |
190 | u64 protocol; | 192 | u64 protocol; |
193 | u64 allowed_protos; | ||
194 | enum rc_driver_type driver_type; | ||
195 | int (*change_protocol)(struct rc_dev *dev, u64 rc_type); | ||
191 | char *module_name; | 196 | char *module_name; |
192 | int (*rc_query) (struct dvb_usb_device *d); | 197 | int (*rc_query) (struct dvb_usb_device *d); |
193 | int rc_interval; | 198 | int rc_interval; |
194 | struct ir_dev_props rc_props; | ||
195 | bool bulk_mode; /* uses bulk mode */ | 199 | bool bulk_mode; /* uses bulk mode */ |
196 | }; | 200 | }; |
197 | 201 | ||
@@ -385,7 +389,8 @@ struct dvb_usb_adapter { | |||
385 | * | 389 | * |
386 | * @i2c_adap: device's i2c_adapter if it uses I2CoverUSB | 390 | * @i2c_adap: device's i2c_adapter if it uses I2CoverUSB |
387 | * | 391 | * |
388 | * @rc_input_dev: input device for the remote control. | 392 | * @rc_dev: rc device for the remote control (rc-core mode) |
393 | * @input_dev: input device for the remote control (legacy mode) | ||
389 | * @rc_query_work: struct work_struct frequent rc queries | 394 | * @rc_query_work: struct work_struct frequent rc queries |
390 | * @last_event: last triggered event | 395 | * @last_event: last triggered event |
391 | * @last_state: last state (no, pressed, repeat) | 396 | * @last_state: last state (no, pressed, repeat) |
@@ -418,7 +423,8 @@ struct dvb_usb_device { | |||
418 | struct dvb_usb_adapter adapter[MAX_NO_OF_ADAPTER_PER_DEVICE]; | 423 | struct dvb_usb_adapter adapter[MAX_NO_OF_ADAPTER_PER_DEVICE]; |
419 | 424 | ||
420 | /* remote control */ | 425 | /* remote control */ |
421 | struct input_dev *rc_input_dev; | 426 | struct rc_dev *rc_dev; |
427 | struct input_dev *input_dev; | ||
422 | char rc_phys[64]; | 428 | char rc_phys[64]; |
423 | struct delayed_work rc_query_work; | 429 | struct delayed_work rc_query_work; |
424 | u32 last_event; | 430 | u32 last_event; |