aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb/gp8psk.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/dvb-usb/gp8psk.c')
-rw-r--r--drivers/media/dvb/dvb-usb/gp8psk.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/media/dvb/dvb-usb/gp8psk.c b/drivers/media/dvb/dvb-usb/gp8psk.c
index c821293dbc22..1cb3d9a66e02 100644
--- a/drivers/media/dvb/dvb-usb/gp8psk.c
+++ b/drivers/media/dvb/dvb-usb/gp8psk.c
@@ -24,6 +24,33 @@ MODULE_PARM_DESC(debug, "set debugging level (1=info,xfer=2,rc=4 (or-able))." DV
24 24
25DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); 25DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
26 26
27static int gp8psk_get_fw_version(struct dvb_usb_device *d, u8 *fw_vers)
28{
29 return (gp8psk_usb_in_op(d, GET_FW_VERS, 0, 0, fw_vers, 6));
30}
31
32static int gp8psk_get_fpga_version(struct dvb_usb_device *d, u8 *fpga_vers)
33{
34 return (gp8psk_usb_in_op(d, GET_FPGA_VERS, 0, 0, fpga_vers, 1));
35}
36
37static void gp8psk_info(struct dvb_usb_device *d)
38{
39 u8 fpga_vers, fw_vers[6];
40
41 if (!gp8psk_get_fw_version(d, fw_vers))
42 info("FW Version = %i.%02i.%i (0x%x) Build %4i/%02i/%02i",
43 fw_vers[2], fw_vers[1], fw_vers[0], GP8PSK_FW_VERS(fw_vers),
44 2000 + fw_vers[5], fw_vers[4], fw_vers[3]);
45 else
46 info("failed to get FW version");
47
48 if (!gp8psk_get_fpga_version(d, &fpga_vers))
49 info("FPGA Version = %i", fpga_vers);
50 else
51 info("failed to get FPGA version");
52}
53
27int gp8psk_usb_in_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen) 54int gp8psk_usb_in_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen)
28{ 55{
29 int ret = 0,try = 0; 56 int ret = 0,try = 0;
@@ -146,6 +173,7 @@ static int gp8psk_power_ctrl(struct dvb_usb_device *d, int onoff)
146 gp8psk_usb_out_op(d, CW3K_INIT, 1, 0, NULL, 0); 173 gp8psk_usb_out_op(d, CW3K_INIT, 1, 0, NULL, 0);
147 if (gp8psk_usb_in_op(d, BOOT_8PSK, 1, 0, &buf, 1)) 174 if (gp8psk_usb_in_op(d, BOOT_8PSK, 1, 0, &buf, 1))
148 return -EINVAL; 175 return -EINVAL;
176 gp8psk_info(d);
149 } 177 }
150 178
151 if (gp_product_id == USB_PID_GENPIX_8PSK_REV_1_WARM) 179 if (gp_product_id == USB_PID_GENPIX_8PSK_REV_1_WARM)