Lines Matching refs:buf

104 			       unsigned char *buf,
163 buf[0]=lo1n-1;
164 buf[1]=lo1a | (sel<<4);
165 buf[2]=0x86; // LOGC
166 buf[3]=0x0f; //reserved
167 buf[4]=0x1f;
168 buf[5]=(lo2n-1) | (lo2a<<5);
170 buf[6]=0xe4;
172 buf[6]=0xf4; // set PKEN per rev 1.2
173 buf[7]=8+xogc;
174 buf[8]=0xc3; //reserved
175 buf[9]=0x4e; //reserved
176 buf[10]=0xec; //reserved
177 buf[11]=(lo2num&0xff);
178 buf[12]=(lo2num>>8) |0x80; // Lo2RST
187 unsigned char buf[2];
190 buf[0]=0x0e;
191 tuner_i2c_xfer_send(&priv->i2c_props,buf,1);
192 tuner_i2c_xfer_recv(&priv->i2c_props,buf,1);
193 tuner_dbg("mt2032 Reg.E=0x%02x\n",buf[0]);
194 lock=buf[0] &0x06;
199 tuner_dbg("mt2032: pll wait 1ms for lock (0x%2x)\n",buf[0]);
208 unsigned char buf[2];
211 buf[0]=0x0f;
212 tuner_i2c_xfer_send(&priv->i2c_props,buf,1);
213 tuner_i2c_xfer_recv(&priv->i2c_props,buf,1);
214 tuner_dbg("mt2032 Reg.F=0x%02x\n",buf[0]);
215 tad1=buf[0]&0x07;
234 buf[0]=0x0f;
235 buf[1]=sel;
236 tuner_i2c_xfer_send(&priv->i2c_props,buf,2);
246 unsigned char buf[21];
253 buf[0]=0;
254 ret=tuner_i2c_xfer_send(&priv->i2c_props,buf,1);
255 tuner_i2c_xfer_recv(&priv->i2c_props,buf,21);
257 buf[0]=0;
258 ret=mt2032_compute_freq(fe,rfin,if1,if2,from,to,&buf[1],&sel,priv->xogc);
263 buf[0]=0;
264 ret=tuner_i2c_xfer_send(&priv->i2c_props,buf,4);
265 buf[5]=5;
266 ret=tuner_i2c_xfer_send(&priv->i2c_props,buf+5,4);
267 buf[11]=11;
268 ret=tuner_i2c_xfer_send(&priv->i2c_props,buf+11,3);
281 buf[0]=7;
282 buf[1]=0x80 +8+priv->xogc; // set LINT to re-init PLLs
283 tuner_i2c_xfer_send(&priv->i2c_props,buf,2);
285 buf[1]=8+priv->xogc;
286 tuner_i2c_xfer_send(&priv->i2c_props,buf,2);
292 buf[0]=2;
293 buf[1]=0x20; // LOGC for optimal phase noise
294 ret=tuner_i2c_xfer_send(&priv->i2c_props,buf,2);
376 unsigned char buf[21];
380 buf[1]=2; // Index to register 2
381 buf[2]=0xff;
382 buf[3]=0x0f;
383 buf[4]=0x1f;
384 ret=tuner_i2c_xfer_send(&priv->i2c_props,buf+1,4);
386 buf[5]=6; // Index register 6
387 buf[6]=0xe4;
388 buf[7]=0x8f;
389 buf[8]=0xc3;
390 buf[9]=0x4e;
391 buf[10]=0xec;
392 ret=tuner_i2c_xfer_send(&priv->i2c_props,buf+5,6);
394 buf[12]=13; // Index register 13
395 buf[13]=0x32;
396 ret=tuner_i2c_xfer_send(&priv->i2c_props,buf+12,2);
403 buf[0]=0x0e;
404 tuner_i2c_xfer_send(&priv->i2c_props,buf,1);
405 tuner_i2c_xfer_recv(&priv->i2c_props,buf,1);
406 xok=buf[0]&0x01;
416 buf[0]=0x07;
417 buf[1]=0x88 + xogc;
418 ret=tuner_i2c_xfer_send(&priv->i2c_props,buf,2);
432 unsigned char buf[2];
434 buf[0] = 6;
435 buf[1] = antenna ? 0x11 : 0x10;
436 tuner_i2c_xfer_send(&priv->i2c_props, buf, 2);
446 unsigned char buf[6];
480 buf[0]=1;
481 buf[1]= 4*div1b + num1;
482 if(freq<275*1000*1000) buf[1] = buf[1]|0x80;
484 buf[2]=div1a;
485 buf[3]=32*div2b + num2/256;
486 buf[4]=num2-(num2/256)*256;
487 buf[5]=div2a;
488 if(num2!=0) buf[5]=buf[5]|0x40;
494 printk("%x ",buf[i]);
498 ret=tuner_i2c_xfer_send(&priv->i2c_props,buf,6);
575 unsigned char buf[2];
577 buf[0] = 6;
578 buf[1] = 0x10;
579 tuner_i2c_xfer_send(&priv->i2c_props, buf, 2); /* power */
581 buf[0] = 0x0f;
582 buf[1] = 0x0f;
583 tuner_i2c_xfer_send(&priv->i2c_props, buf, 2); /* m1lo */
585 buf[0] = 0x0d;
586 tuner_i2c_xfer_send(&priv->i2c_props, buf, 1);
587 tuner_i2c_xfer_recv(&priv->i2c_props, buf, 1);
589 tuner_dbg("mt2050: sro is %x\n", buf[0]);
602 unsigned char buf[21];
616 memset(buf,0,sizeof(buf));
620 tuner_i2c_xfer_send(&priv->i2c_props,buf,1);
621 tuner_i2c_xfer_recv(&priv->i2c_props,buf,21);
626 printk(" %02x",buf[i]);
631 company_code = buf[0x11] << 8 | buf[0x12];
633 company_code,buf[0x13],buf[0x14]);
636 if (buf[0x13] < ARRAY_SIZE(microtune_part) &&
637 NULL != microtune_part[buf[0x13]])
638 name = microtune_part[buf[0x13]];
639 switch (buf[0x13]) {