aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb/dvb-usb.h
diff options
context:
space:
mode:
authorPatrick Boettcher <pb@linuxtv.org>2006-01-09 12:25:04 -0500
committerMauro Carvalho Chehab <mchehab@brturbo.com.br>2006-01-09 12:25:04 -0500
commitd3707add6158803b6463292178cd1a041857b91b (patch)
tree29fead33cb3cdb3ed5d3819475e717467967f6c9 /drivers/media/dvb/dvb-usb/dvb-usb.h
parente142e5107f1e4103dad16e391a41166e15b66a9c (diff)
DVB (2420): Makes integration of future devices easier
- To make the integration of future devices easier - modified the dvb-usb-part to allow a device-specific firmware download - added an option to specify whether a device reconnects after a firmware download or not. Signed-off-by: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/dvb-usb.h')
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb.h b/drivers/media/dvb/dvb-usb/dvb-usb.h
index b4a1a98006c7..cd510fba60ee 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb.h
+++ b/drivers/media/dvb/dvb-usb/dvb-usb.h
@@ -12,6 +12,7 @@
12#include <linux/input.h> 12#include <linux/input.h>
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/usb.h> 14#include <linux/usb.h>
15#include <linux/firmware.h>
15 16
16#include "dvb_frontend.h" 17#include "dvb_frontend.h"
17#include "dvb_demux.h" 18#include "dvb_demux.h"
@@ -94,7 +95,11 @@ struct dvb_usb_device;
94 * @usb_ctrl: which USB device-side controller is in use. Needed for firmware 95 * @usb_ctrl: which USB device-side controller is in use. Needed for firmware
95 * download. 96 * download.
96 * @firmware: name of the firmware file. 97 * @firmware: name of the firmware file.
97 * 98 * @download_firmware: called to download the firmware when the usb_ctrl is
99 * DEVICE_SPECIFIC.
100 * @no_reconnect: device doesn't do a reconnect after downloading the firmware,
101 so do the warm initialization right after it
102
98 * @size_of_priv: how many bytes shall be allocated for the private field 103 * @size_of_priv: how many bytes shall be allocated for the private field
99 * of struct dvb_usb_device. 104 * of struct dvb_usb_device.
100 * 105 *
@@ -142,11 +147,14 @@ struct dvb_usb_properties {
142 int caps; 147 int caps;
143 int pid_filter_count; 148 int pid_filter_count;
144 149
145#define CYPRESS_AN2135 0 150#define DEVICE_SPECIFIC 0
146#define CYPRESS_AN2235 1 151#define CYPRESS_AN2135 1
147#define CYPRESS_FX2 2 152#define CYPRESS_AN2235 2
153#define CYPRESS_FX2 3
148 int usb_ctrl; 154 int usb_ctrl;
149 const char *firmware; 155 const char firmware[FIRMWARE_NAME_MAX];
156 int (*download_firmware) (struct usb_device *, const struct firmware *);
157 int no_reconnect;
150 158
151 int size_of_priv; 159 int size_of_priv;
152 160
@@ -326,5 +334,14 @@ extern int dvb_usb_pll_init_i2c(struct dvb_frontend *);
326extern int dvb_usb_pll_set(struct dvb_frontend *, struct dvb_frontend_parameters *, u8[]); 334extern int dvb_usb_pll_set(struct dvb_frontend *, struct dvb_frontend_parameters *, u8[]);
327extern int dvb_usb_pll_set_i2c(struct dvb_frontend *, struct dvb_frontend_parameters *); 335extern int dvb_usb_pll_set_i2c(struct dvb_frontend *, struct dvb_frontend_parameters *);
328 336
337/* commonly used firmware download types and function */
338struct hexline {
339 u8 len;
340 u32 addr;
341 u8 type;
342 u8 data[255];
343 u8 chk;
344};
345extern int dvb_usb_get_hexline(const struct firmware *, struct hexline *, int *);
329 346
330#endif 347#endif