Lines Matching refs:buf
103 unsigned char *buf,
162 buf[0]=lo1n-1;
163 buf[1]=lo1a | (sel<<4);
164 buf[2]=0x86; // LOGC
165 buf[3]=0x0f; //reserved
166 buf[4]=0x1f;
167 buf[5]=(lo2n-1) | (lo2a<<5);
169 buf[6]=0xe4;
171 buf[6]=0xf4; // set PKEN per rev 1.2
172 buf[7]=8+xogc;
173 buf[8]=0xc3; //reserved
174 buf[9]=0x4e; //reserved
175 buf[10]=0xec; //reserved
176 buf[11]=(lo2num&0xff);
177 buf[12]=(lo2num>>8) |0x80; // Lo2RST
186 unsigned char buf[2];
189 buf[0]=0x0e;
190 tuner_i2c_xfer_send(&priv->i2c_props,buf,1);
191 tuner_i2c_xfer_recv(&priv->i2c_props,buf,1);
192 tuner_dbg("mt2032 Reg.E=0x%02x\n",buf[0]);
193 lock=buf[0] &0x06;
198 tuner_dbg("mt2032: pll wait 1ms for lock (0x%2x)\n",buf[0]);
207 unsigned char buf[2];
210 buf[0]=0x0f;
211 tuner_i2c_xfer_send(&priv->i2c_props,buf,1);
212 tuner_i2c_xfer_recv(&priv->i2c_props,buf,1);
213 tuner_dbg("mt2032 Reg.F=0x%02x\n",buf[0]);
214 tad1=buf[0]&0x07;
233 buf[0]=0x0f;
234 buf[1]=sel;
235 tuner_i2c_xfer_send(&priv->i2c_props,buf,2);
245 unsigned char buf[21];
252 buf[0]=0;
253 ret=tuner_i2c_xfer_send(&priv->i2c_props,buf,1);
254 tuner_i2c_xfer_recv(&priv->i2c_props,buf,21);
256 buf[0]=0;
257 ret=mt2032_compute_freq(fe,rfin,if1,if2,from,to,&buf[1],&sel,priv->xogc);
262 buf[0]=0;
263 ret=tuner_i2c_xfer_send(&priv->i2c_props,buf,4);
264 buf[5]=5;
265 ret=tuner_i2c_xfer_send(&priv->i2c_props,buf+5,4);
266 buf[11]=11;
267 ret=tuner_i2c_xfer_send(&priv->i2c_props,buf+11,3);
280 buf[0]=7;
281 buf[1]=0x80 +8+priv->xogc; // set LINT to re-init PLLs
282 tuner_i2c_xfer_send(&priv->i2c_props,buf,2);
284 buf[1]=8+priv->xogc;
285 tuner_i2c_xfer_send(&priv->i2c_props,buf,2);
291 buf[0]=2;
292 buf[1]=0x20; // LOGC for optimal phase noise
293 ret=tuner_i2c_xfer_send(&priv->i2c_props,buf,2);
375 unsigned char buf[21];
379 buf[1]=2; // Index to register 2
380 buf[2]=0xff;
381 buf[3]=0x0f;
382 buf[4]=0x1f;
383 ret=tuner_i2c_xfer_send(&priv->i2c_props,buf+1,4);
385 buf[5]=6; // Index register 6
386 buf[6]=0xe4;
387 buf[7]=0x8f;
388 buf[8]=0xc3;
389 buf[9]=0x4e;
390 buf[10]=0xec;
391 ret=tuner_i2c_xfer_send(&priv->i2c_props,buf+5,6);
393 buf[12]=13; // Index register 13
394 buf[13]=0x32;
395 ret=tuner_i2c_xfer_send(&priv->i2c_props,buf+12,2);
402 buf[0]=0x0e;
403 tuner_i2c_xfer_send(&priv->i2c_props,buf,1);
404 tuner_i2c_xfer_recv(&priv->i2c_props,buf,1);
405 xok=buf[0]&0x01;
415 buf[0]=0x07;
416 buf[1]=0x88 + xogc;
417 ret=tuner_i2c_xfer_send(&priv->i2c_props,buf,2);
431 unsigned char buf[2];
433 buf[0] = 6;
434 buf[1] = antenna ? 0x11 : 0x10;
435 tuner_i2c_xfer_send(&priv->i2c_props, buf, 2);
445 unsigned char buf[6];
479 buf[0]=1;
480 buf[1]= 4*div1b + num1;
481 if(freq<275*1000*1000) buf[1] = buf[1]|0x80;
483 buf[2]=div1a;
484 buf[3]=32*div2b + num2/256;
485 buf[4]=num2-(num2/256)*256;
486 buf[5]=div2a;
487 if(num2!=0) buf[5]=buf[5]|0x40;
490 tuner_dbg("bufs is: %*ph\n", 6, buf);
492 ret=tuner_i2c_xfer_send(&priv->i2c_props,buf,6);
569 unsigned char buf[2];
571 buf[0] = 6;
572 buf[1] = 0x10;
573 tuner_i2c_xfer_send(&priv->i2c_props, buf, 2); /* power */
575 buf[0] = 0x0f;
576 buf[1] = 0x0f;
577 tuner_i2c_xfer_send(&priv->i2c_props, buf, 2); /* m1lo */
579 buf[0] = 0x0d;
580 tuner_i2c_xfer_send(&priv->i2c_props, buf, 1);
581 tuner_i2c_xfer_recv(&priv->i2c_props, buf, 1);
583 tuner_dbg("mt2050: sro is %x\n", buf[0]);
596 unsigned char buf[21];
610 memset(buf,0,sizeof(buf));
614 tuner_i2c_xfer_send(&priv->i2c_props,buf,1);
615 tuner_i2c_xfer_recv(&priv->i2c_props,buf,21);
617 tuner_dbg("MT20xx hexdump: %*ph\n", 21, buf);
619 company_code = buf[0x11] << 8 | buf[0x12];
621 company_code,buf[0x13],buf[0x14]);
624 if (buf[0x13] < ARRAY_SIZE(microtune_part) &&
625 NULL != microtune_part[buf[0x13]])
626 name = microtune_part[buf[0x13]];
627 switch (buf[0x13]) {