diff options
Diffstat (limited to 'drivers/media/dvb/dvb-usb/dvb-usb.h')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb-usb.h | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb.h b/drivers/media/dvb/dvb-usb/dvb-usb.h index b4a1a98006c7..dd568396e594 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb.h +++ b/drivers/media/dvb/dvb-usb/dvb-usb.h | |||
@@ -10,8 +10,8 @@ | |||
10 | 10 | ||
11 | #include <linux/config.h> | 11 | #include <linux/config.h> |
12 | #include <linux/input.h> | 12 | #include <linux/input.h> |
13 | #include <linux/module.h> | ||
14 | #include <linux/usb.h> | 13 | #include <linux/usb.h> |
14 | #include <linux/firmware.h> | ||
15 | 15 | ||
16 | #include "dvb_frontend.h" | 16 | #include "dvb_frontend.h" |
17 | #include "dvb_demux.h" | 17 | #include "dvb_demux.h" |
@@ -94,7 +94,11 @@ struct dvb_usb_device; | |||
94 | * @usb_ctrl: which USB device-side controller is in use. Needed for firmware | 94 | * @usb_ctrl: which USB device-side controller is in use. Needed for firmware |
95 | * download. | 95 | * download. |
96 | * @firmware: name of the firmware file. | 96 | * @firmware: name of the firmware file. |
97 | * | 97 | * @download_firmware: called to download the firmware when the usb_ctrl is |
98 | * DEVICE_SPECIFIC. | ||
99 | * @no_reconnect: device doesn't do a reconnect after downloading the firmware, | ||
100 | so do the warm initialization right after it | ||
101 | |||
98 | * @size_of_priv: how many bytes shall be allocated for the private field | 102 | * @size_of_priv: how many bytes shall be allocated for the private field |
99 | * of struct dvb_usb_device. | 103 | * of struct dvb_usb_device. |
100 | * | 104 | * |
@@ -142,11 +146,14 @@ struct dvb_usb_properties { | |||
142 | int caps; | 146 | int caps; |
143 | int pid_filter_count; | 147 | int pid_filter_count; |
144 | 148 | ||
145 | #define CYPRESS_AN2135 0 | 149 | #define DEVICE_SPECIFIC 0 |
146 | #define CYPRESS_AN2235 1 | 150 | #define CYPRESS_AN2135 1 |
147 | #define CYPRESS_FX2 2 | 151 | #define CYPRESS_AN2235 2 |
152 | #define CYPRESS_FX2 3 | ||
148 | int usb_ctrl; | 153 | int usb_ctrl; |
149 | const char *firmware; | 154 | const char firmware[FIRMWARE_NAME_MAX]; |
155 | int (*download_firmware) (struct usb_device *, const struct firmware *); | ||
156 | int no_reconnect; | ||
150 | 157 | ||
151 | int size_of_priv; | 158 | int size_of_priv; |
152 | 159 | ||
@@ -326,5 +333,15 @@ extern int dvb_usb_pll_init_i2c(struct dvb_frontend *); | |||
326 | extern int dvb_usb_pll_set(struct dvb_frontend *, struct dvb_frontend_parameters *, u8[]); | 333 | extern int dvb_usb_pll_set(struct dvb_frontend *, struct dvb_frontend_parameters *, u8[]); |
327 | extern int dvb_usb_pll_set_i2c(struct dvb_frontend *, struct dvb_frontend_parameters *); | 334 | extern int dvb_usb_pll_set_i2c(struct dvb_frontend *, struct dvb_frontend_parameters *); |
328 | 335 | ||
336 | /* commonly used firmware download types and function */ | ||
337 | struct hexline { | ||
338 | u8 len; | ||
339 | u32 addr; | ||
340 | u8 type; | ||
341 | u8 data[255]; | ||
342 | u8 chk; | ||
343 | }; | ||
344 | extern int dvb_usb_get_hexline(const struct firmware *, struct hexline *, int *); | ||
345 | extern int usb_cypress_load_firmware(struct usb_device *udev, const struct firmware *fw, int type); | ||
329 | 346 | ||
330 | #endif | 347 | #endif |