Torgeir Veimo wrote:
> I'll create a diff. Just one more test.
--
-Torgeir
55d54
< static void voodoo200_mt2032_init(struct bttv *btv);
1293,1295d1291
< if (BTTV_VOODOOTV_FM == btv->type)
< voodoo200_mt2032_init(btv);
<
1804,1862d1799
<
< static void
< voodoo200_mt2032_init(struct bttv *btv)
< {
< unsigned char buf[21];
< int ret;
< unsigned char xok=0;
< unsigned char xogc=0;
< int loopkill = 10;
<
< printk("voodoo200_mt2032_init\n");
< btv->i2c_client.addr=0xc0>>1;
< buf[0]=0;
< ret=i2c_master_send(&btv->i2c_client,buf,1);
< i2c_master_recv(&btv->i2c_client,buf,21);
< buf[3]=0xff;
< buf[4]=0x0f;
< buf[5]=0x1f;
< buf[7]=0xe4;
< buf[8]=0x8f;
< buf[9]=0xc3;
< buf[10]=0x4e;
< buf[11]=0xec;
< buf[14]=0x32;
<
< buf[0]=0;
< ret=i2c_master_send(&btv->i2c_client,buf,14);
< if (ret!=14)
< printk("voodoo200_mt2032_init failed with %d\n",ret);
<
< udelay(10);
<
< // adjust xogc register
< do {
< --loopkill;
< buf[0]=0x0e;
< i2c_master_send(&btv->i2c_client,buf,1);
< i2c_master_recv(&btv->i2c_client,buf,1);
< xok=buf[0]&0x01;
< if (xok == 1) break;
<
< buf[0]=0x07;
< i2c_master_send(&btv->i2c_client,buf,1);
< i2c_master_recv(&btv->i2c_client,buf,1);
< xogc=buf[0];
< if (xogc == 4) break;
<
< // decrement xogc and set, then loop
< buf[0]=0x07;
< buf[1]=(xogc & 0xf8) | ((xogc&0x07)-1);
< ret=i2c_master_send(&btv->i2c_client,buf,2);
< if (ret!=2)
< printk("voodoo200_mt2032_init failed with %d\n",ret);
< udelay(10);
<
< } while (xok != 1 && loopkill > 0);
< }
<
<