aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@starflyer.(none)>2006-01-03 02:18:01 -0500
committerDave Airlie <airlied@linux.ie>2006-01-03 02:18:01 -0500
commit97f2aab6698f3ab2552c41c1024a65ffd0763a6d (patch)
treebb6e3b2949459f54f884c710fc74d40eef00d834 /drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
parentd985c1088146607532093d9eaaaf99758f6a4d21 (diff)
parent88026842b0a760145aa71d69e74fbc9ec118ca44 (diff)
drm: merge in Linus mainline
Diffstat (limited to 'drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c')
-rw-r--r--drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c128
1 files changed, 64 insertions, 64 deletions
diff --git a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
index fd53d6010502..104df610dbe1 100644
--- a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
+++ b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
@@ -225,8 +225,8 @@ static int ttusb_i2c_msg(struct ttusb *ttusb,
225 225
226 err = ttusb_result(ttusb, b, 0x20); 226 err = ttusb_result(ttusb, b, 0x20);
227 227
228 /* check if the i2c transaction was successful */ 228 /* check if the i2c transaction was successful */
229 if ((snd_len != b[5]) || (rcv_len != b[6])) return -EREMOTEIO; 229 if ((snd_len != b[5]) || (rcv_len != b[6])) return -EREMOTEIO;
230 230
231 if (rcv_len > 0) { 231 if (rcv_len > 0) {
232 232
@@ -489,27 +489,27 @@ static int ttusb_send_diseqc(struct dvb_frontend* fe,
489 489
490static int lnbp21_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage) 490static int lnbp21_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage)
491{ 491{
492 struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv; 492 struct ttusb* ttusb = (struct ttusb*) fe->dvb->priv;
493 int ret; 493 int ret;
494 u8 data[1]; 494 u8 data[1];
495 struct i2c_msg msg = { .addr = 0x08, .flags = 0, .buf = data, .len = sizeof(data) }; 495 struct i2c_msg msg = { .addr = 0x08, .flags = 0, .buf = data, .len = sizeof(data) };
496 496
497 switch(voltage) { 497 switch(voltage) {
498 case SEC_VOLTAGE_OFF: 498 case SEC_VOLTAGE_OFF:
499 data[0] = 0x00; 499 data[0] = 0x00;
500 break; 500 break;
501 case SEC_VOLTAGE_13: 501 case SEC_VOLTAGE_13:
502 data[0] = 0x44; 502 data[0] = 0x44;
503 break; 503 break;
504 case SEC_VOLTAGE_18: 504 case SEC_VOLTAGE_18:
505 data[0] = 0x4c; 505 data[0] = 0x4c;
506 break; 506 break;
507 default: 507 default:
508 return -EINVAL; 508 return -EINVAL;
509 }; 509 };
510 510
511 ret = i2c_transfer(&ttusb->i2c_adap, &msg, 1); 511 ret = i2c_transfer(&ttusb->i2c_adap, &msg, 1);
512 return (ret != 1) ? -EIO : 0; 512 return (ret != 1) ? -EIO : 0;
513} 513}
514 514
515static int ttusb_update_lnb(struct ttusb *ttusb) 515static int ttusb_update_lnb(struct ttusb *ttusb)
@@ -1184,45 +1184,45 @@ static struct tda1004x_config philips_tdm1316l_config = {
1184}; 1184};
1185 1185
1186static u8 alps_bsbe1_inittab[] = { 1186static u8 alps_bsbe1_inittab[] = {
1187 0x01, 0x15, 1187 0x01, 0x15,
1188 0x02, 0x30, 1188 0x02, 0x30,
1189 0x03, 0x00, 1189 0x03, 0x00,
1190 0x04, 0x7d, /* F22FR = 0x7d, F22 = f_VCO / 128 / 0x7d = 22 kHz */ 1190 0x04, 0x7d, /* F22FR = 0x7d, F22 = f_VCO / 128 / 0x7d = 22 kHz */
1191 0x05, 0x35, /* I2CT = 0, SCLT = 1, SDAT = 1 */ 1191 0x05, 0x35, /* I2CT = 0, SCLT = 1, SDAT = 1 */
1192 0x06, 0x40, /* DAC not used, set to high impendance mode */ 1192 0x06, 0x40, /* DAC not used, set to high impendance mode */
1193 0x07, 0x00, /* DAC LSB */ 1193 0x07, 0x00, /* DAC LSB */
1194 0x08, 0x40, /* DiSEqC off, LNB power on OP2/LOCK pin on */ 1194 0x08, 0x40, /* DiSEqC off, LNB power on OP2/LOCK pin on */
1195 0x09, 0x00, /* FIFO */ 1195 0x09, 0x00, /* FIFO */
1196 0x0c, 0x51, /* OP1 ctl = Normal, OP1 val = 1 (LNB Power ON) */ 1196 0x0c, 0x51, /* OP1 ctl = Normal, OP1 val = 1 (LNB Power ON) */
1197 0x0d, 0x82, /* DC offset compensation = ON, beta_agc1 = 2 */ 1197 0x0d, 0x82, /* DC offset compensation = ON, beta_agc1 = 2 */
1198 0x0e, 0x23, /* alpha_tmg = 2, beta_tmg = 3 */ 1198 0x0e, 0x23, /* alpha_tmg = 2, beta_tmg = 3 */
1199 0x10, 0x3f, // AGC2 0x3d 1199 0x10, 0x3f, // AGC2 0x3d
1200 0x11, 0x84, 1200 0x11, 0x84,
1201 0x12, 0xb9, 1201 0x12, 0xb9,
1202 0x15, 0xc9, // lock detector threshold 1202 0x15, 0xc9, // lock detector threshold
1203 0x16, 0x00, 1203 0x16, 0x00,
1204 0x17, 0x00, 1204 0x17, 0x00,
1205 0x18, 0x00, 1205 0x18, 0x00,
1206 0x19, 0x00, 1206 0x19, 0x00,
1207 0x1a, 0x00, 1207 0x1a, 0x00,
1208 0x1f, 0x50, 1208 0x1f, 0x50,
1209 0x20, 0x00, 1209 0x20, 0x00,
1210 0x21, 0x00, 1210 0x21, 0x00,
1211 0x22, 0x00, 1211 0x22, 0x00,
1212 0x23, 0x00, 1212 0x23, 0x00,
1213 0x28, 0x00, // out imp: normal out type: parallel FEC mode:0 1213 0x28, 0x00, // out imp: normal out type: parallel FEC mode:0
1214 0x29, 0x1e, // 1/2 threshold 1214 0x29, 0x1e, // 1/2 threshold
1215 0x2a, 0x14, // 2/3 threshold 1215 0x2a, 0x14, // 2/3 threshold
1216 0x2b, 0x0f, // 3/4 threshold 1216 0x2b, 0x0f, // 3/4 threshold
1217 0x2c, 0x09, // 5/6 threshold 1217 0x2c, 0x09, // 5/6 threshold
1218 0x2d, 0x05, // 7/8 threshold 1218 0x2d, 0x05, // 7/8 threshold
1219 0x2e, 0x01, 1219 0x2e, 0x01,
1220 0x31, 0x1f, // test all FECs 1220 0x31, 0x1f, // test all FECs
1221 0x32, 0x19, // viterbi and synchro search 1221 0x32, 0x19, // viterbi and synchro search
1222 0x33, 0xfc, // rs control 1222 0x33, 0xfc, // rs control
1223 0x34, 0x93, // error control 1223 0x34, 0x93, // error control
1224 0x0f, 0x92, 1224 0x0f, 0x92,
1225 0xff, 0xff 1225 0xff, 0xff
1226}; 1226};
1227 1227
1228static u8 alps_bsru6_inittab[] = { 1228static u8 alps_bsru6_inittab[] = {
@@ -1350,7 +1350,7 @@ static int ttusb_novas_grundig_29504_491_pll_set(struct dvb_frontend *fe, struct
1350 u32 div; 1350 u32 div;
1351 struct i2c_msg msg = {.addr = 0x61,.flags = 0,.buf = buf,.len = sizeof(buf) }; 1351 struct i2c_msg msg = {.addr = 0x61,.flags = 0,.buf = buf,.len = sizeof(buf) };
1352 1352
1353 div = params->frequency / 125; 1353 div = params->frequency / 125;
1354 1354
1355 buf[0] = (div >> 8) & 0x7f; 1355 buf[0] = (div >> 8) & 0x7f;
1356 buf[1] = div & 0xff; 1356 buf[1] = div & 0xff;
@@ -1487,7 +1487,7 @@ static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *i
1487 1487
1488 udev = interface_to_usbdev(intf); 1488 udev = interface_to_usbdev(intf);
1489 1489
1490 if (intf->altsetting->desc.bInterfaceNumber != 1) return -ENODEV; 1490 if (intf->altsetting->desc.bInterfaceNumber != 1) return -ENODEV;
1491 1491
1492 if (!(ttusb = kmalloc(sizeof(struct ttusb), GFP_KERNEL))) 1492 if (!(ttusb = kmalloc(sizeof(struct ttusb), GFP_KERNEL)))
1493 return -ENOMEM; 1493 return -ENOMEM;