diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-24 14:21:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-24 14:21:08 -0400 |
commit | c328d54cd4ad120d76284e46dcca6c6cf996154a (patch) | |
tree | 104c023be66faa5fce6e0a56c0a6d13c62fd21e5 /drivers/media/video/tea5761.c | |
parent | 346ad4b7fe392571f19314f153db9151dbc1d82b (diff) | |
parent | b0166ab3a6ae6d7af8d9a21a7836154963c69a11 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (452 commits)
V4L/DVB (7731): tuner-xc2028: fix signal strength calculus
V4L/DVB (7730): tuner-xc2028: Fix SCODE load for MTS firmwares
V4L/DVB (7729): Fix VIDIOCGAP corruption in ivtv
V4L/DVB (7728): tea5761: bugzilla #10462: tea5761 autodetection code were broken
V4L/DVB (7726): cx23885: Enable cx23417 support on the HVR1800
V4L/DVB (7725): cx23885: Add generic cx23417 hardware encoder support
V4L/DVB (7723): pvrusb2: Clean up input selection list generation in V4L interface
V4L/DVB (7722): pvrusb2: Implement FM radio support for Gotview USB2.0 DVD 2
V4L/DVB (7721): pvrusb2: Restructure cx23416 firmware loading to have a common exit point
V4L/DVB (7720): pvrusb2: Fix bad error code on cx23416 firmware load failure
V4L/DVB (7719): pvrusb2: Implement input selection enforcement
V4L/DVB (7718): pvrusb2-dvb: update Kbuild selections
V4L/DVB (7717): pvrusb2-dvb: add DVB-T support for Hauppauge pvrusb2 model 73xxx
V4L/DVB (7716): pvrusb2: clean up global functions
V4L/DVB (7715): pvrusb2: Clean out all use of __FUNCTION__
V4L/DVB (7714): pvrusb2: Fix hang on module removal
V4L/DVB (7713): pvrusb2: Implement cleaner DVB kernel thread shutdown
V4L/DVB (7712): pvrusb2: Close connect/disconnect race
V4L/DVB (7711): pvrusb2: Fix race on module unload
V4L/DVB (7710): pvrusb2: Implement critical digital streaming quirk for onair devices
...
Diffstat (limited to 'drivers/media/video/tea5761.c')
-rw-r--r-- | drivers/media/video/tea5761.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/drivers/media/video/tea5761.c b/drivers/media/video/tea5761.c index 5326eeceaacd..b93cdef9ac73 100644 --- a/drivers/media/video/tea5761.c +++ b/drivers/media/video/tea5761.c | |||
@@ -14,12 +14,10 @@ | |||
14 | #include "tuner-i2c.h" | 14 | #include "tuner-i2c.h" |
15 | #include "tea5761.h" | 15 | #include "tea5761.h" |
16 | 16 | ||
17 | static int debug = 0; | 17 | static int debug; |
18 | module_param(debug, int, 0644); | 18 | module_param(debug, int, 0644); |
19 | MODULE_PARM_DESC(debug, "enable verbose debug messages"); | 19 | MODULE_PARM_DESC(debug, "enable verbose debug messages"); |
20 | 20 | ||
21 | #define PREFIX "tea5761" | ||
22 | |||
23 | struct tea5761_priv { | 21 | struct tea5761_priv { |
24 | struct tuner_i2c_props i2c_props; | 22 | struct tuner_i2c_props i2c_props; |
25 | 23 | ||
@@ -131,7 +129,7 @@ static void tea5761_status_dump(unsigned char *buffer) | |||
131 | 129 | ||
132 | frq = 1000 * (div * 32768 / 1000 + FREQ_OFFSET + 225) / 4; /* Freq in KHz */ | 130 | frq = 1000 * (div * 32768 / 1000 + FREQ_OFFSET + 225) / 4; /* Freq in KHz */ |
133 | 131 | ||
134 | printk(PREFIX "Frequency %d.%03d KHz (divider = 0x%04x)\n", | 132 | printk(KERN_INFO "tea5761: Frequency %d.%03d KHz (divider = 0x%04x)\n", |
135 | frq / 1000, frq % 1000, div); | 133 | frq / 1000, frq % 1000, div); |
136 | } | 134 | } |
137 | 135 | ||
@@ -249,14 +247,19 @@ int tea5761_autodetection(struct i2c_adapter* i2c_adap, u8 i2c_addr) | |||
249 | 247 | ||
250 | if (16 != (rc = tuner_i2c_xfer_recv(&i2c, buffer, 16))) { | 248 | if (16 != (rc = tuner_i2c_xfer_recv(&i2c, buffer, 16))) { |
251 | printk(KERN_WARNING "it is not a TEA5761. Received %i chars.\n", rc); | 249 | printk(KERN_WARNING "it is not a TEA5761. Received %i chars.\n", rc); |
252 | return EINVAL; | 250 | return -EINVAL; |
253 | } | 251 | } |
254 | 252 | ||
255 | if (!((buffer[13] != 0x2b) || (buffer[14] != 0x57) || (buffer[15] != 0x061))) { | 253 | if ((buffer[13] != 0x2b) || (buffer[14] != 0x57) || (buffer[15] != 0x061)) { |
256 | printk(KERN_WARNING "Manufacturer ID= 0x%02x, Chip ID = %02x%02x. It is not a TEA5761\n",buffer[13],buffer[14],buffer[15]); | 254 | printk(KERN_WARNING "Manufacturer ID= 0x%02x, Chip ID = %02x%02x." |
257 | return EINVAL; | 255 | " It is not a TEA5761\n", |
256 | buffer[13], buffer[14], buffer[15]); | ||
257 | return -EINVAL; | ||
258 | } | 258 | } |
259 | printk(KERN_WARNING "TEA5761 detected.\n"); | 259 | printk(KERN_WARNING "tea5761: TEA%02x%02x detected. " |
260 | "Manufacturer ID= 0x%02x\n", | ||
261 | buffer[14], buffer[15], buffer[13]); | ||
262 | |||
260 | return 0; | 263 | return 0; |
261 | } | 264 | } |
262 | 265 | ||
@@ -302,6 +305,7 @@ struct dvb_frontend *tea5761_attach(struct dvb_frontend *fe, | |||
302 | 305 | ||
303 | priv->i2c_props.addr = i2c_addr; | 306 | priv->i2c_props.addr = i2c_addr; |
304 | priv->i2c_props.adap = i2c_adap; | 307 | priv->i2c_props.adap = i2c_adap; |
308 | priv->i2c_props.name = "tea5761"; | ||
305 | 309 | ||
306 | memcpy(&fe->ops.tuner_ops, &tea5761_tuner_ops, | 310 | memcpy(&fe->ops.tuner_ops, &tea5761_tuner_ops, |
307 | sizeof(struct dvb_tuner_ops)); | 311 | sizeof(struct dvb_tuner_ops)); |