Lines Matching refs:bus
64 static inline bool is_tuner(struct cx231xx *dev, struct cx231xx_i2c *bus, in is_tuner() argument
67 int i2c_port = get_real_i2c_port(dev, bus->nr); in is_tuner()
87 struct cx231xx_i2c *bus = i2c_adap->algo_data; in cx231xx_i2c_send_bytes() local
88 struct cx231xx *dev = bus->dev; in cx231xx_i2c_send_bytes()
98 if (is_tuner(dev, bus, msg, TUNER_XC5000)) { in cx231xx_i2c_send_bytes()
157 bus->i2c_nostop = (size > 16) ? 1 : 0; in cx231xx_i2c_send_bytes()
158 bus->i2c_reserve = (loop == 0) ? 0 : 1; in cx231xx_i2c_send_bytes()
161 status = dev->cx231xx_send_usb_command(bus, &req_data); in cx231xx_i2c_send_bytes()
171 bus->i2c_nostop = 0; in cx231xx_i2c_send_bytes()
172 bus->i2c_reserve = 0; in cx231xx_i2c_send_bytes()
185 status = dev->cx231xx_send_usb_command(bus, &req_data); in cx231xx_i2c_send_bytes()
198 struct cx231xx_i2c *bus = i2c_adap->algo_data; in cx231xx_i2c_recv_bytes() local
199 struct cx231xx *dev = bus->dev; in cx231xx_i2c_recv_bytes()
205 if (is_tuner(dev, bus, msg, TUNER_XC5000)) { in cx231xx_i2c_recv_bytes()
258 status = dev->cx231xx_send_usb_command(bus, &req_data); in cx231xx_i2c_recv_bytes()
271 status = dev->cx231xx_send_usb_command(bus, &req_data); in cx231xx_i2c_recv_bytes()
285 struct cx231xx_i2c *bus = i2c_adap->algo_data; in cx231xx_i2c_recv_bytes_with_saddr() local
286 struct cx231xx *dev = bus->dev; in cx231xx_i2c_recv_bytes_with_saddr()
297 if (is_tuner(dev, bus, msg2, TUNER_XC5000)) { in cx231xx_i2c_recv_bytes_with_saddr()
336 status = dev->cx231xx_send_usb_command(bus, &req_data); in cx231xx_i2c_recv_bytes_with_saddr()
348 struct cx231xx_i2c *bus = i2c_adap->algo_data; in cx231xx_i2c_check_for_device() local
349 struct cx231xx *dev = bus->dev; in cx231xx_i2c_check_for_device()
363 status = dev->cx231xx_send_usb_command(bus, &req_data); in cx231xx_i2c_check_for_device()
375 struct cx231xx_i2c *bus = i2c_adap->algo_data; in cx231xx_i2c_xfer() local
376 struct cx231xx *dev = bus->dev; in cx231xx_i2c_xfer()
407 && (msgs[i].len <= 2) && (bus->nr < 3)) { in cx231xx_i2c_xfer()
524 int cx231xx_i2c_register(struct cx231xx_i2c *bus) in cx231xx_i2c_register() argument
526 struct cx231xx *dev = bus->dev; in cx231xx_i2c_register()
530 bus->i2c_adap = cx231xx_adap_template; in cx231xx_i2c_register()
531 bus->i2c_adap.dev.parent = dev->dev; in cx231xx_i2c_register()
533 snprintf(bus->i2c_adap.name, sizeof(bus->i2c_adap.name), "%s-%d", bus->dev->name, bus->nr); in cx231xx_i2c_register()
535 bus->i2c_adap.algo_data = bus; in cx231xx_i2c_register()
536 i2c_set_adapdata(&bus->i2c_adap, &dev->v4l2_dev); in cx231xx_i2c_register()
537 i2c_add_adapter(&bus->i2c_adap); in cx231xx_i2c_register()
539 if (0 != bus->i2c_rc) in cx231xx_i2c_register()
541 "i2c bus %d register FAILED\n", bus->nr); in cx231xx_i2c_register()
543 return bus->i2c_rc; in cx231xx_i2c_register()
550 int cx231xx_i2c_unregister(struct cx231xx_i2c *bus) in cx231xx_i2c_unregister() argument
552 i2c_del_adapter(&bus->i2c_adap); in cx231xx_i2c_unregister()