Lines Matching +full:0 +full:xf100

47 	struct i2c_msg msgs[2] = {{.addr = adr,  .flags = 0,  in i2c_io()
51 return (i2c_transfer(adapter, msgs, 2) == 2) ? 0 : -1; in i2c_io()
56 struct i2c_msg msg = {.addr = adr, .flags = 0, in i2c_write()
59 return (i2c_transfer(adap, &msg, 1) == 1) ? 0 : -1; in i2c_write()
74 return (i2c_transfer(adapter, msgs, 1) == 1) ? 0 : -1; in i2c_read()
80 u8 msg[2] = {reg >> 8, reg & 0xff}; in i2c_read_reg16()
81 struct i2c_msg msgs[2] = {{.addr = adr, .flags = 0, in i2c_read_reg16()
85 return (i2c_transfer(adapter, msgs, 2) == 2) ? 0 : -1; in i2c_read_reg16()
91 struct i2c_msg msgs[2] = {{.addr = adr, .flags = 0, in i2c_read_regs()
96 return (i2c_transfer(adapter, msgs, 2) == 2) ? 0 : -1; in i2c_read_regs()
110 /* tuner 1+2: i2c adapter #0, tuner 3+4: i2c adapter #1 */ in i2c_adapter_from_chan()
112 return &chan->dev->channel[0].i2c_adapter; in i2c_adapter_from_chan()
145 return 0; in tuner_attach_stv6110()
153 u8 adr = 4 + ((chan->number & 1) ? 0x63 : 0x60); in tuner_attach_stv6111()
163 return 0; in tuner_attach_stv6111()
175 status = chan->gate_ctrl(fe, 0); in drxk_gate_ctrl()
189 fe = dvb_attach(tda18271c2dd_attach, chan->fe, i2c, 0x60); in tuner_attach_tda18271()
191 chan->fe->ops.i2c_gate_ctrl(chan->fe, 0); in tuner_attach_tda18271()
197 return 0; in tuner_attach_tda18271()
206 u8 subaddr = 0x00; in tuner_tda18212_ping()
212 if (i2c_read_regs(i2c, adr, subaddr, tda_id, sizeof(tda_id)) < 0) in tuner_tda18212_ping()
214 if (i2c_read_regs(i2c, adr, subaddr, tda_id, sizeof(tda_id)) < 0) in tuner_tda18212_ping()
218 chan->fe->ops.i2c_gate_ctrl(chan->fe, 0); in tuner_tda18212_ping()
220 return 0; in tuner_tda18212_ping()
238 u8 addr = (chan->number & 1) ? 0x63 : 0x60; in tuner_attach_tda18212()
253 chan->i2c_client[0] = client; in tuner_attach_tda18212()
256 return 0; in tuner_attach_tda18212()
290 (chan->number & 1) == 0 ? STV090x_DEMODULATOR_0 in demod_attach_stv0900()
301 if (!dvb_attach(lnbh24_attach, chan->fe, i2c, 0, in demod_attach_stv0900()
302 0, chan->dev->card_info->lnb[chan->number])) { in demod_attach_stv0900()
309 return 0; in demod_attach_stv0900()
313 .adr = 0x68,
317 .tsspeed = 0x28,
321 .i2c_address = 0x0c << 1,
334 cfg.adr = 0x6c; in demod_attach_stv0910()
347 lnbcfg.i2c_address = (((chan->number & 1) ? 0x0d : 0x0c) << 1); in demod_attach_stv0910()
349 lnbcfg.i2c_address = (((chan->number & 1) ? 0x09 : 0x08) << 1); in demod_attach_stv0910()
358 return 0; in demod_attach_stv0910()
363 .demod_address = 0x1f,
365 .if_khz = 0,
370 .demod_address = 0x1e,
372 .if_khz = 0,
395 return 0; in demod_attach_stv0367()
405 cfg.i2c_addr = ((chan->number & 1) ? 0x6d : 0x6c) << 1; in demod_attach_cxd28xx()
423 return 0; in demod_attach_cxd28xx()
439 if (i2c_read_reg16(i2c, 0x68+port/2, 0xf100, &val) < 0) in port_has_stv0900()
440 return 0; in port_has_stv0900()
448 if (i2c_read(i2c, 0x29+port, &val) < 0) in port_has_drxk()
449 return 0; in port_has_drxk()
457 if (i2c_read_reg16(i2c, 0x1e, 0xf000, &val) < 0) in port_has_stv0367()
458 return 0; in port_has_stv0367()
459 if (val != 0x60) in port_has_stv0367()
460 return 0; in port_has_stv0367()
461 if (i2c_read_reg16(i2c, 0x1f, 0xf000, &val) < 0) in port_has_stv0367()
462 return 0; in port_has_stv0367()
463 if (val != 0x60) in port_has_stv0367()
464 return 0; in port_has_stv0367()
471 u8 probe[4] = { 0xe0, 0x00, 0x00, 0x00 }, data[4]; in ngene_port_has_cxd2099()
472 struct i2c_msg msgs[2] = {{ .addr = 0x40, .flags = 0, in ngene_port_has_cxd2099()
474 { .addr = 0x40, .flags = I2C_M_RD, in ngene_port_has_cxd2099()
478 return 0; in ngene_port_has_cxd2099()
480 if (data[0] == 0x02 && data[1] == 0x2b && data[3] == 0x43) in ngene_port_has_cxd2099()
493 memset(&config, 0, sizeof(config)); in demod_attach_drxk()
496 config.adr = 0x29 + (chan->number ^ 2); in demod_attach_drxk()
506 return 0; in demod_attach_drxk()
525 u8 addr = 0x10; in init_xo2()
529 res = i2c_read_regs(i2c, addr, 0x04, data, 2); in init_xo2()
530 if (res < 0) in init_xo2()
533 if (data[0] != 0x01) { in init_xo2()
538 i2c_read_reg(i2c, addr, 0x08, &val); in init_xo2()
539 if (val != 0) { in init_xo2()
540 i2c_write_reg(i2c, addr, 0x08, 0x00); in init_xo2()
544 i2c_write_reg(i2c, addr, 0x08, 0x04); in init_xo2()
547 i2c_write_reg(i2c, addr, 0x08, 0x07); in init_xo2()
550 * speed: 0=55,1=75,2=90,3=104 MBit/s in init_xo2()
556 i2c_write_reg(i2c, addr, 0x09, 1); in init_xo2()
558 i2c_write_reg(i2c, addr, 0x0a, 0x01); in init_xo2()
559 i2c_write_reg(i2c, addr, 0x0b, 0x01); in init_xo2()
563 i2c_write_reg(i2c, addr, 0x08, 0x87); in init_xo2()
565 return 0; in init_xo2()
570 u8 probe[1] = { 0x00 }, data[4]; in port_has_xo2()
571 u8 addr = 0x10; in port_has_xo2()
576 return 0; in port_has_xo2()
577 if (data[0] == 'D' && data[1] == 'F') { in port_has_xo2()
582 if (data[0] == 'C' && data[1] == 'I') { in port_has_xo2()
587 return 0; in port_has_xo2()
601 u8 sony_osc24 = 0; in cineS2_probe()
602 struct i2c_msg i2c_msg = { .flags = 0, .buf = buf }; in cineS2_probe()
659 if (rc < 0 || chan->number < 2) in cineS2_probe()
665 buf[0] = 0xf1; in cineS2_probe()
668 buf[1] = 0x5c; in cineS2_probe()
669 buf[2] = 0xc2; in cineS2_probe()
672 buf[1] = 0x61; in cineS2_probe()
673 buf[2] = 0xcc; in cineS2_probe()
694 return 0; in cineS2_probe()
700 .serial_mpeg = 0x00, /* PARALLEL */
705 0xc0 >> 1
716 0xb2 >> 1, &chan->i2c_adapter); in demod_attach_lg330x()
723 &m780_tunerconfig, 0); in demod_attach_lg330x()
725 return (chan->fe) ? 0 : -ENODEV; in demod_attach_lg330x()
741 return 0; in demod_attach_drxd()
757 return 0; in tuner_attach_dtt7520x()
764 #define MICNG_EE_START 0x0100
765 #define MICNG_EE_END 0x0FF0
767 #define MICNG_EETAG_END0 0x0000
768 #define MICNG_EETAG_END1 0xFFFF
770 /* 0x0001 - 0x000F reserved for housekeeping */
771 /* 0xFFFF - 0xFFFE reserved for housekeeping */
776 #define MICNG_EETAG_DRXD1_OSCDEVIATION 0x1000 /* 2 Bytes data */
777 #define MICNG_EETAG_DRXD2_OSCDEVIATION 0x1001 /* 2 Bytes data */
779 #define MICNG_EETAG_MT2060_1_1STIF 0x1100 /* 2 Bytes data */
780 #define MICNG_EETAG_MT2060_2_1STIF 0x1101 /* 2 Bytes data */
784 #define MICNG_EETAG_OEM_FIRST 0xC000
785 #define MICNG_EETAG_OEM_LAST 0xFFEF
791 u8 m[3] = {(reg >> 8), (reg & 0xff), data}; in i2c_write_eeprom()
792 struct i2c_msg msg = {.addr = adr, .flags = 0, .buf = m, in i2c_write_eeprom()
799 return 0; in i2c_write_eeprom()
806 u8 msg[2] = {(reg >> 8), (reg & 0xff)}; in i2c_read_eeprom()
807 struct i2c_msg msgs[2] = {{.addr = adr, .flags = 0, in i2c_read_eeprom()
816 return 0; in i2c_read_eeprom()
823 int status = 0; in ReadEEProm()
824 u16 Addr = MICNG_EE_START, Length, tag = 0; in ReadEEProm()
828 if (i2c_read_eeprom(adapter, 0x50, Addr, EETag, sizeof(EETag))) in ReadEEProm()
830 tag = (EETag[0] << 8) | EETag[1]; in ReadEEProm()
845 if (Length > 0) { in ReadEEProm()
847 status = i2c_read_eeprom(adapter, 0x50, Addr, data, Length); in ReadEEProm()
850 #if 0 in ReadEEProm()
863 int status = 0; in WriteEEProm()
866 u16 tag = 0; in WriteEEProm()
870 if (i2c_read_eeprom(adapter, 0x50, Addr, EETag, sizeof(EETag))) in WriteEEProm()
872 tag = (EETag[0] << 8) | EETag[1]; in WriteEEProm()
892 for (i = 0; i < Length; i++, Addr++) { in WriteEEProm()
893 status = i2c_write_eeprom(adapter, 0x50, Addr, data[i]); in WriteEEProm()
904 status = i2c_read_eeprom(adapter, 0x50, Addr, &Tmp, 1); in WriteEEProm()
923 u32 len = 0; in eeprom_read_ushort()
931 *data = (buf[0] << 8) | buf[1]; in eeprom_read_ushort()
932 return 0; in eeprom_read_ushort()
939 buf[0] = data >> 8; in eeprom_write_ushort()
940 buf[1] = data & 0xff; in eeprom_write_ushort()
949 u16 data = 0; in osc_deviation()
955 eeprom_write_ushort(adap, 0x1000 + chan->number, data); in osc_deviation()
957 if (eeprom_read_ushort(adap, 0x1000 + chan->number, &data)) in osc_deviation()
958 data = 0; in osc_deviation()
977 .address = 0x68,
998 .address = 0x69,
1014 .addr = 0x60,
1020 .addr = 0x63,
1033 .lnb = {0x0b, 0x08},
1047 .lnb = {0x0b, 0x08},
1062 .lnb = {0x0a, 0x08, 0x0b, 0x09},
1077 .lnb = {0x0a, 0x08, 0x0b, 0x09},
1093 .lnb = {0x0a, 0x08, 0x0b, 0x09},
1103 /* Channel 0 is analog, which is currently unsupported */
1110 .avf = { 0 },
1118 .index = 0,
1119 .demod_address = 0x70,
1120 .demod_revision = 0xa2,
1121 .demoda_address = 0x00,
1122 .pll_address = 0x60,
1130 .demod_address = 0x71,
1131 .demod_revision = 0xa2,
1132 .demoda_address = 0x00,
1133 .pll_address = 0x60,
1165 NGENE_ID(0x18c3, 0xab04, ngene_info_cineS2),
1166 NGENE_ID(0x18c3, 0xab05, ngene_info_cineS2v5),
1167 NGENE_ID(0x18c3, 0xabc3, ngene_info_cineS2),
1168 NGENE_ID(0x18c3, 0xabc4, ngene_info_cineS2),
1169 NGENE_ID(0x18c3, 0xdb01, ngene_info_satixS2),
1170 NGENE_ID(0x18c3, 0xdb02, ngene_info_satixS2v2),
1171 NGENE_ID(0x18c3, 0xdd00, ngene_info_cineS2v5),
1172 NGENE_ID(0x18c3, 0xdd10, ngene_info_duoFlex),
1173 NGENE_ID(0x18c3, 0xdd20, ngene_info_duoFlex),
1174 NGENE_ID(0x1461, 0x062e, ngene_info_m780),
1175 NGENE_ID(0x153b, 0x1167, ngene_info_terratec),
1176 {0}
1198 return 0; in ngene_slot_reset()