aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb/dvb-usb.h
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2010-10-29 15:08:23 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-12-29 05:16:37 -0500
commitd8b4b5822f51e2142b731b42c81e3f03eec475b2 (patch)
treefce9a9b7ca5031adc95fbd6be118352fb2527da5 /drivers/media/dvb/dvb-usb/dvb-usb.h
parent4c7b355df6e7f05304e05f6b7a286e59a5f1cc54 (diff)
[media] ir-core: make struct rc_dev the primary interface
This patch merges the ir_input_dev and ir_dev_props structs into a single struct called rc_dev. The drivers and various functions in rc-core used by the drivers are also changed to use rc_dev as the primary interface when dealing with rc-core. This means that the input_dev is abstracted away from the drivers which is necessary if we ever want to support multiple input devs per rc device. The new API is similar to what the input subsystem uses, i.e: rc_device_alloc() rc_device_free() rc_device_register() rc_device_unregister() [mchehab@redhat.com: Fix compilation on mceusb and cx231xx, due to merge conflicts] Signed-off-by: David Härdeman <david@hardeman.nu> Acked-by: Jarod Wilson <jarod@redhat.com> Tested-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/dvb-usb.h')
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb.h b/drivers/media/dvb/dvb-usb/dvb-usb.h
index 34f7b3ba8cc7..83aa9826560f 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb.h
+++ b/drivers/media/dvb/dvb-usb/dvb-usb.h
@@ -180,18 +180,20 @@ 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 * @change_protocol: callback to change protocol
183 * @rc_query: called to query an event event. 185 * @rc_query: called to query an event event.
184 * @rc_interval: time in ms between two queries. 186 * @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) 187 * @bulk_mode: device supports bulk mode for RC (disable polling mode)
187 */ 188 */
188struct dvb_rc { 189struct dvb_rc {
189 char *rc_codes; 190 char *rc_codes;
190 u64 protocol; 191 u64 protocol;
192 u64 allowed_protos;
193 int (*change_protocol)(struct rc_dev *dev, u64 ir_type);
191 char *module_name; 194 char *module_name;
192 int (*rc_query) (struct dvb_usb_device *d); 195 int (*rc_query) (struct dvb_usb_device *d);
193 int rc_interval; 196 int rc_interval;
194 struct ir_dev_props rc_props;
195 bool bulk_mode; /* uses bulk mode */ 197 bool bulk_mode; /* uses bulk mode */
196}; 198};
197 199
@@ -385,7 +387,8 @@ struct dvb_usb_adapter {
385 * 387 *
386 * @i2c_adap: device's i2c_adapter if it uses I2CoverUSB 388 * @i2c_adap: device's i2c_adapter if it uses I2CoverUSB
387 * 389 *
388 * @rc_input_dev: input device for the remote control. 390 * @rc_dev: rc device for the remote control (rc-core mode)
391 * @input_dev: input device for the remote control (legacy mode)
389 * @rc_query_work: struct work_struct frequent rc queries 392 * @rc_query_work: struct work_struct frequent rc queries
390 * @last_event: last triggered event 393 * @last_event: last triggered event
391 * @last_state: last state (no, pressed, repeat) 394 * @last_state: last state (no, pressed, repeat)
@@ -418,7 +421,8 @@ struct dvb_usb_device {
418 struct dvb_usb_adapter adapter[MAX_NO_OF_ADAPTER_PER_DEVICE]; 421 struct dvb_usb_adapter adapter[MAX_NO_OF_ADAPTER_PER_DEVICE];
419 422
420 /* remote control */ 423 /* remote control */
421 struct input_dev *rc_input_dev; 424 struct rc_dev *rc_dev;
425 struct input_dev *input_dev;
422 char rc_phys[64]; 426 char rc_phys[64];
423 struct delayed_work rc_query_work; 427 struct delayed_work rc_query_work;
424 u32 last_event; 428 u32 last_event;