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 @@ #include <linux/config.h> #include <linux/input.h> -#include <linux/module.h> #include <linux/usb.h> +#include <linux/firmware.h> #include "dvb_frontend.h" #include "dvb_demux.h" @@ -94,7 +94,11 @@ struct dvb_usb_device; * @usb_ctrl: which USB device-side controller is in use. Needed for firmware * download. * @firmware: name of the firmware file. - * + * @download_firmware: called to download the firmware when the usb_ctrl is + * DEVICE_SPECIFIC. + * @no_reconnect: device doesn't do a reconnect after downloading the firmware, + so do the warm initialization right after it + * @size_of_priv: how many bytes shall be allocated for the private field * of struct dvb_usb_device. * @@ -142,11 +146,14 @@ struct dvb_usb_properties { int caps; int pid_filter_count; -#define CYPRESS_AN2135 0 -#define CYPRESS_AN2235 1 -#define CYPRESS_FX2 2 +#define DEVICE_SPECIFIC 0 +#define CYPRESS_AN2135 1 +#define CYPRESS_AN2235 2 +#define CYPRESS_FX2 3 int usb_ctrl; - const char *firmware; + const char firmware[FIRMWARE_NAME_MAX]; + int (*download_firmware) (struct usb_device *, const struct firmware *); + int no_reconnect; int size_of_priv; @@ -326,5 +333,15 @@ extern int dvb_usb_pll_init_i2c(struct dvb_frontend *); extern int dvb_usb_pll_set(struct dvb_frontend *, struct dvb_frontend_parameters *, u8[]); extern int dvb_usb_pll_set_i2c(struct dvb_frontend *, struct dvb_frontend_parameters *); +/* commonly used firmware download types and function */ +struct hexline { + u8 len; + u32 addr; + u8 type; + u8 data[255]; + u8 chk; +}; +extern int dvb_usb_get_hexline(const struct firmware *, struct hexline *, int *); +extern int usb_cypress_load_firmware(struct usb_device *udev, const struct firmware *fw, int type); #endif |