diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-07-31 18:07:55 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-02 15:43:45 -0400 |
commit | 6520342ba9a8f81f3f0f1e33439462ee60468558 (patch) | |
tree | 58d281cc3009b7850588eff785a8d1d8897f0eea /drivers/media/dvb/dvb-usb/dvb-usb.h | |
parent | f72a27b8ed4458bb9f7203408441d27382bc93f4 (diff) |
V4L/DVB: dvb-usb: add support for rc-core mode
Allows dvb-usb drivers to use rc-core, instead of the legacy
implementation.
No driver were ported yet to rc-core, so, some small adjustments
may be needed, when starting to migrate the drivers.
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.h | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb.h b/drivers/media/dvb/dvb-usb/dvb-usb.h index 76f972493768..bcfbf9adc373 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/rc-map.h> | 17 | #include <media/ir-core.h> |
18 | 18 | ||
19 | #include "dvb_frontend.h" | 19 | #include "dvb_frontend.h" |
20 | #include "dvb_demux.h" | 20 | #include "dvb_demux.h" |
@@ -177,6 +177,34 @@ struct dvb_rc_legacy { | |||
177 | }; | 177 | }; |
178 | 178 | ||
179 | /** | 179 | /** |
180 | * struct dvb_rc properties of remote controller, using rc-core | ||
181 | * @rc_codes: name of rc codes table | ||
182 | * @rc_query: called to query an event event. | ||
183 | * @rc_interval: time in ms between two queries. | ||
184 | * @rc_props: remote controller properties | ||
185 | * @bulk_mode: device supports bulk mode for RC (disable polling mode) | ||
186 | */ | ||
187 | struct dvb_rc { | ||
188 | char *rc_codes; | ||
189 | char *module_name; | ||
190 | int (*rc_query) (struct dvb_usb_device *d); | ||
191 | int rc_interval; | ||
192 | struct ir_dev_props rc_props; | ||
193 | bool bulk_mode; /* uses bulk mode */ | ||
194 | }; | ||
195 | |||
196 | /** | ||
197 | * enum dvb_usb_mode - Specifies if it is using a legacy driver or a new one | ||
198 | * based on rc-core | ||
199 | * This is initialized/used only inside dvb-usb-remote.c. | ||
200 | * It shouldn't be set by the drivers. | ||
201 | */ | ||
202 | enum dvb_usb_mode { | ||
203 | DVB_RC_LEGACY, | ||
204 | DVB_RC_CORE, | ||
205 | }; | ||
206 | |||
207 | /** | ||
180 | * struct dvb_usb_device_properties - properties of a dvb-usb-device | 208 | * struct dvb_usb_device_properties - properties of a dvb-usb-device |
181 | * @usb_ctrl: which USB device-side controller is in use. Needed for firmware | 209 | * @usb_ctrl: which USB device-side controller is in use. Needed for firmware |
182 | * download. | 210 | * download. |
@@ -238,8 +266,10 @@ struct dvb_usb_device_properties { | |||
238 | int (*identify_state) (struct usb_device *, struct dvb_usb_device_properties *, | 266 | int (*identify_state) (struct usb_device *, struct dvb_usb_device_properties *, |
239 | struct dvb_usb_device_description **, int *); | 267 | struct dvb_usb_device_description **, int *); |
240 | 268 | ||
241 | union { | 269 | struct { |
270 | enum dvb_usb_mode mode; /* Drivers shouldn't touch on it */ | ||
242 | struct dvb_rc_legacy legacy; | 271 | struct dvb_rc_legacy legacy; |
272 | struct dvb_rc core; | ||
243 | } rc; | 273 | } rc; |
244 | 274 | ||
245 | struct i2c_algorithm *i2c_algo; | 275 | struct i2c_algorithm *i2c_algo; |