Lines Matching refs:btv

81 	struct bttv *btv;  in bttv_gpio_enable()  local
87 btv = &bttvs[card]; in bttv_gpio_enable()
90 bttv_gpio_tracking(btv,"extern enable"); in bttv_gpio_enable()
96 struct bttv *btv; in bttv_read_gpio() local
102 btv = &bttvs[card]; in bttv_read_gpio()
104 if(btv->shutdown) { in bttv_read_gpio()
116 struct bttv *btv; in bttv_write_gpio() local
122 btv = &bttvs[card]; in bttv_write_gpio()
128 bttv_gpio_tracking(btv,"extern write"); in bttv_write_gpio()
134 struct bttv *btv; in bttv_get_gpio_queue() local
140 btv = &bttvs[card]; in bttv_get_gpio_queue()
144 return &btv->gpioq; in bttv_get_gpio_queue()
153 struct bttv *btv = (struct bttv*)data; in bttv_bit_setscl() local
156 btv->i2c_state |= 0x02; in bttv_bit_setscl()
158 btv->i2c_state &= ~0x02; in bttv_bit_setscl()
159 btwrite(btv->i2c_state, BT848_I2C); in bttv_bit_setscl()
165 struct bttv *btv = (struct bttv*)data; in bttv_bit_setsda() local
168 btv->i2c_state |= 0x01; in bttv_bit_setsda()
170 btv->i2c_state &= ~0x01; in bttv_bit_setsda()
171 btwrite(btv->i2c_state, BT848_I2C); in bttv_bit_setsda()
177 struct bttv *btv = (struct bttv*)data; in bttv_bit_getscl() local
186 struct bttv *btv = (struct bttv*)data; in bttv_bit_getsda() local
205 struct bttv *btv = i2c_get_adapdata(client->adapter); in attach_inform() local
207 if (btv->tuner_type != UNSET) in attach_inform()
208 bttv_call_i2c_clients(btv,TUNER_SET_TYPE,&btv->tuner_type); in attach_inform()
209 if (btv->pinnacle_id != UNSET) in attach_inform()
210 bttv_call_i2c_clients(btv,AUDC_CONFIG_PINNACLE, in attach_inform()
211 &btv->pinnacle_id); in attach_inform()
215 btv->nr, i2c_clientname(client)); in attach_inform()
219 void bttv_call_i2c_clients(struct bttv *btv, unsigned int cmd, void *arg) in bttv_call_i2c_clients() argument
221 if (0 != btv->i2c_rc) in bttv_call_i2c_clients()
223 i2c_clients_command(&btv->i2c_adap, cmd, arg); in bttv_call_i2c_clients()
261 int bttv_I2CRead(struct bttv *btv, unsigned char addr, char *probe_for) in bttv_I2CRead() argument
265 if (0 != btv->i2c_rc) in bttv_I2CRead()
269 btv->nr,probe_for,addr); in bttv_I2CRead()
270 btv->i2c_client.addr = addr >> 1; in bttv_I2CRead()
271 if (1 != i2c_master_recv(&btv->i2c_client, &buffer, 1)) { in bttv_I2CRead()
277 btv->nr,addr); in bttv_I2CRead()
286 int bttv_I2CWrite(struct bttv *btv, unsigned char addr, unsigned char b1, in bttv_I2CWrite() argument
292 if (0 != btv->i2c_rc) in bttv_I2CWrite()
294 btv->i2c_client.addr = addr >> 1; in bttv_I2CWrite()
297 if (bytes != i2c_master_send(&btv->i2c_client, buffer, bytes)) in bttv_I2CWrite()
303 void __devinit bttv_readee(struct bttv *btv, unsigned char *eedata, int addr) in bttv_readee() argument
307 if (bttv_I2CWrite(btv, addr, 0, -1, 0)<0) { in bttv_readee()
311 btv->i2c_client.addr = addr >> 1; in bttv_readee()
313 if (16 != i2c_master_recv(&btv->i2c_client,eedata+i,16)) { in bttv_readee()
321 int __devinit init_bttv_i2c(struct bttv *btv) in init_bttv_i2c() argument
323 memcpy(&btv->i2c_adap, &bttv_i2c_adap_template, in init_bttv_i2c()
325 memcpy(&btv->i2c_algo, &bttv_i2c_algo_template, in init_bttv_i2c()
327 memcpy(&btv->i2c_client, &bttv_i2c_client_template, in init_bttv_i2c()
330 sprintf(btv->i2c_adap.name, "bt848 #%d", btv->nr); in init_bttv_i2c()
332 btv->i2c_algo.data = btv; in init_bttv_i2c()
333 i2c_set_adapdata(&btv->i2c_adap, btv); in init_bttv_i2c()
334 btv->i2c_adap.algo_data = &btv->i2c_algo; in init_bttv_i2c()
335 btv->i2c_client.adapter = &btv->i2c_adap; in init_bttv_i2c()
337 bttv_bit_setscl(btv,1); in init_bttv_i2c()
338 bttv_bit_setsda(btv,1); in init_bttv_i2c()
340 btv->i2c_rc = i2c_bit_add_bus(&btv->i2c_adap); in init_bttv_i2c()
341 return btv->i2c_rc; in init_bttv_i2c()