aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb/gp8psk.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-06 21:32:12 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-06 21:32:12 -0500
commit9e9bc9736756f25d6c47b4eba0ebf25b20a6f153 (patch)
tree647240f479c5f23910c3e6194d1c35b6ba54d75e /drivers/media/dvb/dvb-usb/gp8psk.c
parent3c0cb7c31c206aaedb967e44b98442bbeb17a6c4 (diff)
parente3c92215198cb6aa00ad38db2780faa6b72e0a3f (diff)
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (255 commits) [media] radio-aimslab.c: Fix gcc 4.5+ bug [media] cx25821: Fix compilation breakage due to BKL dependency [media] v4l2-compat-ioctl32: fix compile warning [media] zoran: fix compiler warning [media] tda18218: fix compile warning [media] ngene: fix compile warning [media] DVB: IR support for TechnoTrend CT-3650 [media] cx23885, cimax2.c: Fix case of two CAM insertion irq [media] ir-nec-decoder: fix repeat key issue [media] staging: se401 depends on USB [media] staging: usbvideo/vicam depends on USB [media] soc_camera: Add the ability to bind regulators to soc_camedra devices [media] V4L2: Add a v4l2-subdev (soc-camera) driver for OmniVision OV2640 sensor [media] v4l: soc-camera: switch to .unlocked_ioctl [media] v4l: ov772x: simplify pointer dereference [media] ov9640: fix OmniVision OV9640 sensor driver's priv data retrieving [media] ov9640: use macro to request OmniVision OV9640 sensor private data [media] ivtv-i2c: Fix two warnings [media] staging/lirc: Update lirc TODO files [media] cx88: Remove the obsolete i2c_adapter.id field ...
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)