Home
last modified time | relevance | path

Searched refs:i2c_adap (Results 1 – 25 of 176) sorted by relevance

12345678

/drivers/media/video/au0828/
Dau0828-i2c.c39 static inline int i2c_slave_did_write_ack(struct i2c_adapter *i2c_adap) in i2c_slave_did_write_ack() argument
41 struct au0828_dev *dev = i2c_adap->algo_data; in i2c_slave_did_write_ack()
46 static inline int i2c_slave_did_read_ack(struct i2c_adapter *i2c_adap) in i2c_slave_did_read_ack() argument
48 struct au0828_dev *dev = i2c_adap->algo_data; in i2c_slave_did_read_ack()
53 static int i2c_wait_read_ack(struct i2c_adapter *i2c_adap) in i2c_wait_read_ack() argument
58 if (!i2c_slave_did_read_ack(i2c_adap)) in i2c_wait_read_ack()
69 static inline int i2c_is_read_busy(struct i2c_adapter *i2c_adap) in i2c_is_read_busy() argument
71 struct au0828_dev *dev = i2c_adap->algo_data; in i2c_is_read_busy()
76 static int i2c_wait_read_done(struct i2c_adapter *i2c_adap) in i2c_wait_read_done() argument
81 if (!i2c_is_read_busy(i2c_adap)) in i2c_wait_read_done()
[all …]
/drivers/i2c/algos/
Di2c-algo-bit.c167 static int i2c_outb(struct i2c_adapter *i2c_adap, unsigned char c) in i2c_outb() argument
172 struct i2c_algo_bit_data *adap = i2c_adap->algo_data; in i2c_outb()
180 bit_dbg(1, &i2c_adap->dev, "i2c_outb: 0x%02x, " in i2c_outb()
194 bit_dbg(1, &i2c_adap->dev, "i2c_outb: 0x%02x, " in i2c_outb()
203 bit_dbg(2, &i2c_adap->dev, "i2c_outb: 0x%02x %s\n", (int)c, in i2c_outb()
212 static int i2c_inb(struct i2c_adapter *i2c_adap) in i2c_inb() argument
218 struct i2c_algo_bit_data *adap = i2c_adap->algo_data; in i2c_inb()
224 bit_dbg(1, &i2c_adap->dev, "i2c_inb: timeout at bit " in i2c_inb()
242 static int test_bus(struct i2c_adapter *i2c_adap) in test_bus() argument
244 struct i2c_algo_bit_data *adap = i2c_adap->algo_data; in test_bus()
[all …]
Di2c-algo-pcf.c220 static int pcf_sendbytes(struct i2c_adapter *i2c_adap, const char *buf, in pcf_sendbytes() argument
223 struct i2c_algo_pcf_data *adap = i2c_adap->algo_data; in pcf_sendbytes()
227 DEB2(dev_dbg(&i2c_adap->dev, "i2c_write: writing %2.2X\n", in pcf_sendbytes()
236 dev_err(&i2c_adap->dev, "i2c_write: error - timeout.\n"); in pcf_sendbytes()
241 dev_err(&i2c_adap->dev, "i2c_write: error - no ack.\n"); in pcf_sendbytes()
253 static int pcf_readbytes(struct i2c_adapter *i2c_adap, char *buf, in pcf_readbytes() argument
257 struct i2c_algo_pcf_data *adap = i2c_adap->algo_data; in pcf_readbytes()
268 dev_err(&i2c_adap->dev, "pcf_readbytes timed out.\n"); in pcf_readbytes()
274 dev_err(&i2c_adap->dev, "i2c_read: i2c_inb, No ack.\n"); in pcf_readbytes()
313 static int pcf_xfer(struct i2c_adapter *i2c_adap, in pcf_xfer() argument
[all …]
/drivers/media/video/cx23885/
Dcx23885-i2c.c51 static inline int i2c_slave_did_ack(struct i2c_adapter *i2c_adap) in i2c_slave_did_ack() argument
53 struct cx23885_i2c *bus = i2c_adap->algo_data; in i2c_slave_did_ack()
58 static inline int i2c_is_busy(struct i2c_adapter *i2c_adap) in i2c_is_busy() argument
60 struct cx23885_i2c *bus = i2c_adap->algo_data; in i2c_is_busy()
65 static int i2c_wait_done(struct i2c_adapter *i2c_adap) in i2c_wait_done() argument
70 if (!i2c_is_busy(i2c_adap)) in i2c_wait_done()
81 static int i2c_sendbytes(struct i2c_adapter *i2c_adap, in i2c_sendbytes() argument
84 struct cx23885_i2c *bus = i2c_adap->algo_data; in i2c_sendbytes()
99 if (!i2c_wait_done(i2c_adap)) in i2c_sendbytes()
101 if (!i2c_slave_did_ack(i2c_adap)) in i2c_sendbytes()
[all …]
Dcx23885-dvb.c695 &i2c_bus->i2c_adap); in dvb_register()
698 &i2c_bus->i2c_adap, in dvb_register()
707 &i2c_bus->i2c_adap); in dvb_register()
710 0x60, &dev->i2c_bus[1].i2c_adap, in dvb_register()
718 &i2c_bus->i2c_adap); in dvb_register()
721 0x60, &dev->i2c_bus[1].i2c_adap, in dvb_register()
732 &i2c_bus->i2c_adap); in dvb_register()
735 &dev->i2c_bus[1].i2c_adap, 0x42, in dvb_register()
738 0x60, &dev->i2c_bus[1].i2c_adap, in dvb_register()
747 &i2c_bus->i2c_adap); in dvb_register()
[all …]
Dnetup-eeprom.c32 int netup_eeprom_read(struct i2c_adapter *i2c_adap, u8 addr) in netup_eeprom_read() argument
56 ret = i2c_transfer(i2c_adap, msg, 2); in netup_eeprom_read()
66 int netup_eeprom_write(struct i2c_adapter *i2c_adap, u8 addr, u8 data) in netup_eeprom_write() argument
84 ret = i2c_transfer(i2c_adap, msg, 1); in netup_eeprom_write()
95 void netup_get_card_info(struct i2c_adapter *i2c_adap, in netup_get_card_info() argument
100 cinfo->rev = netup_eeprom_read(i2c_adap, 63); in netup_get_card_info()
103 cinfo->port[0].mac[j] = netup_eeprom_read(i2c_adap, i); in netup_get_card_info()
106 cinfo->port[1].mac[j] = netup_eeprom_read(i2c_adap, i); in netup_get_card_info()
Dcimax2.c79 struct i2c_adapter *i2c_adap; member
90 int netup_read_i2c(struct i2c_adapter *i2c_adap, u8 addr, u8 reg, in netup_read_i2c() argument
108 ret = i2c_transfer(i2c_adap, msg, 2); in netup_read_i2c()
123 int netup_write_i2c(struct i2c_adapter *i2c_adap, u8 addr, u8 reg, in netup_write_i2c() argument
139 ret = i2c_transfer(i2c_adap, &msg, 1); in netup_write_i2c()
184 ret = netup_read_i2c(state->i2c_adap, state->ci_i2c_addr, in netup_ci_op_cam()
192 ret = netup_write_i2c(state->i2c_adap, state->ci_i2c_addr, in netup_ci_op_cam()
273 ret = netup_write_i2c(state->i2c_adap, state->ci_i2c_addr, in netup_ci_slot_reset()
282 ret = netup_write_i2c(state->i2c_adap, state->ci_i2c_addr, in netup_ci_slot_reset()
308 ret = netup_write_i2c(state->i2c_adap, state->ci_i2c_addr, in netup_ci_set_irq()
[all …]
/drivers/media/video/cx25821/
Dcx25821-i2c.c49 static inline int i2c_slave_did_ack(struct i2c_adapter *i2c_adap) in i2c_slave_did_ack() argument
51 struct cx25821_i2c *bus = i2c_adap->algo_data; in i2c_slave_did_ack()
56 static inline int i2c_is_busy(struct i2c_adapter *i2c_adap) in i2c_is_busy() argument
58 struct cx25821_i2c *bus = i2c_adap->algo_data; in i2c_is_busy()
63 static int i2c_wait_done(struct i2c_adapter *i2c_adap) in i2c_wait_done() argument
68 if (!i2c_is_busy(i2c_adap)) in i2c_wait_done()
79 static int i2c_sendbytes(struct i2c_adapter *i2c_adap, in i2c_sendbytes() argument
82 struct cx25821_i2c *bus = i2c_adap->algo_data; in i2c_sendbytes()
98 if (!i2c_wait_done(i2c_adap)) in i2c_sendbytes()
101 if (!i2c_slave_did_ack(i2c_adap)) in i2c_sendbytes()
[all …]
/drivers/media/dvb/b2c2/
Dflexcop-i2c.c175 static int flexcop_master_xfer(struct i2c_adapter *i2c_adap, in flexcop_master_xfer() argument
178 struct flexcop_i2c_adapter *i2c = i2c_get_adapdata(i2c_adap); in flexcop_master_xfer()
237 strlcpy(fc->fc_i2c_adap[0].i2c_adap.name, "B2C2 FlexCop I2C to demod", in flexcop_i2c_init()
238 sizeof(fc->fc_i2c_adap[0].i2c_adap.name)); in flexcop_i2c_init()
239 strlcpy(fc->fc_i2c_adap[1].i2c_adap.name, "B2C2 FlexCop I2C to eeprom", in flexcop_i2c_init()
240 sizeof(fc->fc_i2c_adap[1].i2c_adap.name)); in flexcop_i2c_init()
241 strlcpy(fc->fc_i2c_adap[2].i2c_adap.name, "B2C2 FlexCop I2C to tuner", in flexcop_i2c_init()
242 sizeof(fc->fc_i2c_adap[2].i2c_adap.name)); in flexcop_i2c_init()
244 i2c_set_adapdata(&fc->fc_i2c_adap[0].i2c_adap, &fc->fc_i2c_adap[0]); in flexcop_i2c_init()
245 i2c_set_adapdata(&fc->fc_i2c_adap[1].i2c_adap, &fc->fc_i2c_adap[1]); in flexcop_i2c_init()
[all …]
/drivers/media/video/usbvision/
Dusbvision-i2c.c56 static inline int try_write_address(struct i2c_adapter *i2c_adap, in try_write_address() argument
63 usbvision = (struct usb_usbvision *)i2c_get_adapdata(i2c_adap); in try_write_address()
81 static inline int try_read_address(struct i2c_adapter *i2c_adap, in try_read_address() argument
88 usbvision = (struct usb_usbvision *)i2c_get_adapdata(i2c_adap); in try_read_address()
105 static inline int usb_find_address(struct i2c_adapter *i2c_adap, in usb_find_address() argument
120 ret = try_read_address(i2c_adap, addr, retries); in usb_find_address()
122 ret = try_write_address(i2c_adap, addr, retries); in usb_find_address()
131 usbvision_i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], int num) in usbvision_i2c_xfer() argument
138 usbvision = (struct usb_usbvision *)i2c_get_adapdata(i2c_adap); in usbvision_i2c_xfer()
142 ret = usb_find_address(i2c_adap, pmsg, i2c_adap->retries, &addr); in usbvision_i2c_xfer()
[all …]
/drivers/media/video/saa7134/
Dsaa7134-dvb.c203 i2c_transfer(&dev->i2c_adap, &msg, 1); in mt352_pinnacle_tuner_set_params()
208 i2c_transfer(&dev->i2c_adap, &msg, 1); in mt352_pinnacle_tuner_set_params()
260 if (i2c_transfer(&dev->i2c_adap, &msg, 1) != 1) { in kworld_sbtvd_gate_ctrl()
268 if (i2c_transfer(&dev->i2c_adap, &msg, 1) != 1) { in kworld_sbtvd_gate_ctrl()
371 if (i2c_transfer(&dev->i2c_adap, &tuner_msg, 1) != 1) { in philips_tda6651_pll_set()
391 if (i2c_transfer(&dev->i2c_adap, &tuner_msg, 1) != 1) in philips_tu1216_init()
436 if (i2c_transfer(&dev->i2c_adap, &init_msg, 1) != 1) in philips_td1316_tuner_init()
457 if (i2c_transfer(&dev->i2c_adap, &analog_msg, 1) != 1) in philips_td1316_tuner_sleep()
474 if (i2c_transfer(&dev->i2c_adap, &init_msg, 1) != 1) in philips_europa_tuner_init()
493 i2c_transfer(&dev->i2c_adap, &analog_msg, 1); in philips_europa_tuner_sleep()
[all …]
/drivers/media/video/cx88/
Dcx88-dvb.c570 .i2c_adap = &dev->core->i2c_adap, in attach_xc3028()
627 fe = dvb_attach(xc4000_attach, fe0->dvb.frontend, &dev->core->i2c_adap, in attach_xc4000()
843 if (i2c_transfer(&dev->core->i2c_adap, &msg, 1) != 1) in samsung_smt_7020_tuner_set_params()
901 return (i2c_transfer(&dev->core->i2c_adap, &msg, 1) == 1) ? 0 : -EIO; in samsung_smt_7020_set_voltage()
980 &core->i2c_adap); in dvb_register()
983 0x61, &core->i2c_adap, in dvb_register()
994 &core->i2c_adap); in dvb_register()
997 0x60, &core->i2c_adap, in dvb_register()
1008 &core->i2c_adap); in dvb_register()
1011 &core->i2c_adap, 0x61, in dvb_register()
[all …]
Dcx88-i2c.c146 core->i2c_adap.dev.parent = &pci->dev; in cx88_i2c_init()
147 strlcpy(core->i2c_adap.name,core->name,sizeof(core->i2c_adap.name)); in cx88_i2c_init()
148 core->i2c_adap.owner = THIS_MODULE; in cx88_i2c_init()
151 i2c_set_adapdata(&core->i2c_adap, &core->v4l2_dev); in cx88_i2c_init()
152 core->i2c_adap.algo_data = &core->i2c_algo; in cx88_i2c_init()
153 core->i2c_client.adapter = &core->i2c_adap; in cx88_i2c_init()
159 core->i2c_rc = i2c_bit_add_bus(&core->i2c_adap); in cx88_i2c_init()
/drivers/media/dvb/frontends/
Ddibx000_common.c33 ret = i2c_transfer(mst->i2c_adap, mst->msg, 1) != 1 ? -EREMOTEIO : 0; in dibx000_write_word()
61 if (i2c_transfer(mst->i2c_adap, mst->msg, 2) != 2) in dibx000_read_word()
175 int dibx000_i2c_set_speed(struct i2c_adapter *i2c_adap, u16 speed) in dibx000_i2c_set_speed() argument
177 struct dibx000_i2c_master *mst = i2c_get_adapdata(i2c_adap); in dibx000_i2c_set_speed()
202 static int dibx000_i2c_master_xfer_gpio12(struct i2c_adapter *i2c_adap, struct i2c_msg msg[], int n… in dibx000_i2c_master_xfer_gpio12() argument
204 struct dibx000_i2c_master *mst = i2c_get_adapdata(i2c_adap); in dibx000_i2c_master_xfer_gpio12()
224 static int dibx000_i2c_master_xfer_gpio34(struct i2c_adapter *i2c_adap, struct i2c_msg msg[], int n… in dibx000_i2c_master_xfer_gpio34() argument
226 struct dibx000_i2c_master *mst = i2c_get_adapdata(i2c_adap); in dibx000_i2c_master_xfer_gpio34()
278 static int dibx000_i2c_gated_gpio67_xfer(struct i2c_adapter *i2c_adap, in dibx000_i2c_gated_gpio67_xfer() argument
281 struct dibx000_i2c_master *mst = i2c_get_adapdata(i2c_adap); in dibx000_i2c_gated_gpio67_xfer()
[all …]
/drivers/media/video/saa7164/
Dsaa7164-i2c.c30 static int i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num) in i2c_xfer() argument
32 struct saa7164_i2c *bus = i2c_adap->algo_data; in i2c_xfer()
78 i2c_clients_command(&bus->i2c_adap, cmd, arg); in saa7164_call_i2c_clients()
109 memcpy(&bus->i2c_adap, &saa7164_i2c_adap_template, in saa7164_i2c_register()
110 sizeof(bus->i2c_adap)); in saa7164_i2c_register()
118 bus->i2c_adap.dev.parent = &dev->pci->dev; in saa7164_i2c_register()
120 strlcpy(bus->i2c_adap.name, bus->dev->name, in saa7164_i2c_register()
121 sizeof(bus->i2c_adap.name)); in saa7164_i2c_register()
124 bus->i2c_adap.algo_data = bus; in saa7164_i2c_register()
125 i2c_set_adapdata(&bus->i2c_adap, bus); in saa7164_i2c_register()
[all …]
/drivers/media/video/cx231xx/
Dcx231xx-i2c.c75 int cx231xx_i2c_send_bytes(struct i2c_adapter *i2c_adap, in cx231xx_i2c_send_bytes() argument
78 struct cx231xx_i2c *bus = i2c_adap->algo_data; in cx231xx_i2c_send_bytes()
186 static int cx231xx_i2c_recv_bytes(struct i2c_adapter *i2c_adap, in cx231xx_i2c_recv_bytes() argument
189 struct cx231xx_i2c *bus = i2c_adap->algo_data; in cx231xx_i2c_recv_bytes()
272 static int cx231xx_i2c_recv_bytes_with_saddr(struct i2c_adapter *i2c_adap, in cx231xx_i2c_recv_bytes_with_saddr() argument
276 struct cx231xx_i2c *bus = i2c_adap->algo_data; in cx231xx_i2c_recv_bytes_with_saddr()
336 static int cx231xx_i2c_check_for_device(struct i2c_adapter *i2c_adap, in cx231xx_i2c_check_for_device() argument
339 struct cx231xx_i2c *bus = i2c_adap->algo_data; in cx231xx_i2c_check_for_device()
362 static int cx231xx_i2c_xfer(struct i2c_adapter *i2c_adap, in cx231xx_i2c_xfer() argument
365 struct cx231xx_i2c *bus = i2c_adap->algo_data; in cx231xx_i2c_xfer()
[all …]
/drivers/media/dvb/dvb-usb/
Ddvb-usb-i2c.c22 strlcpy(d->i2c_adap.name, d->desc->name, sizeof(d->i2c_adap.name)); in dvb_usb_i2c_init()
23 d->i2c_adap.algo = d->props.i2c_algo; in dvb_usb_i2c_init()
24 d->i2c_adap.algo_data = NULL; in dvb_usb_i2c_init()
25 d->i2c_adap.dev.parent = &d->udev->dev; in dvb_usb_i2c_init()
27 i2c_set_adapdata(&d->i2c_adap, d); in dvb_usb_i2c_init()
29 if ((ret = i2c_add_adapter(&d->i2c_adap)) < 0) in dvb_usb_i2c_init()
40 i2c_del_adapter(&d->i2c_adap); in dvb_usb_i2c_exit()
/drivers/media/video/bt8xx/
Dbttv-i2c.c234 static int bttv_i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num) in bttv_i2c_xfer() argument
236 struct v4l2_device *v4l2_dev = i2c_get_adapdata(i2c_adap); in bttv_i2c_xfer()
358 strlcpy(btv->c.i2c_adap.name, "bt878", in init_bttv_i2c()
359 sizeof(btv->c.i2c_adap.name)); in init_bttv_i2c()
360 btv->c.i2c_adap.algo = &bttv_algo; in init_bttv_i2c()
367 strlcpy(btv->c.i2c_adap.name, "bttv", in init_bttv_i2c()
368 sizeof(btv->c.i2c_adap.name)); in init_bttv_i2c()
373 btv->c.i2c_adap.algo_data = &btv->i2c_algo; in init_bttv_i2c()
375 btv->c.i2c_adap.owner = THIS_MODULE; in init_bttv_i2c()
377 btv->c.i2c_adap.dev.parent = &btv->c.pci->dev; in init_bttv_i2c()
[all …]
/drivers/media/dvb/ttpci/
Dbudget.c234 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; in alps_bsrv2_tuner_set_params()
262 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; in alps_tdbe2_tuner_set_params()
317 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; in grundig_29504_401_tuner_set_params()
347 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; in grundig_29504_451_tuner_set_params()
379 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; in s5h1420_tuner_set_params()
443 if ((i2c_transfer(&budget->i2c_adap, msg, 2) != 2) || (pwm == 0xff)) in read_pwm()
496 budget->dvb_frontend = dvb_attach(ves1x93_attach, &alps_bsrv2_config, &budget->i2c_adap); in frontend_init()
506 budget->dvb_frontend = dvb_attach(stv0299_attach, &alps_bsru6_config, &budget->i2c_adap); in frontend_init()
509 budget->dvb_frontend->tuner_priv = &budget->i2c_adap; in frontend_init()
521 …budget->dvb_frontend = dvb_attach(ves1820_attach, &alps_tdbe2_config, &budget->i2c_adap, read_pwm(… in frontend_init()
[all …]
/drivers/media/video/em28xx/
Dem28xx-dvb.c587 cfg.i2c_adap = &dev->i2c_adap; in em28xx_attach_xc3028()
770 &sharp_isdbt, &dev->i2c_adap); in em28xx_dvb_init()
784 &dev->i2c_adap); in em28xx_dvb_init()
793 &dev->i2c_adap); in em28xx_dvb_init()
804 &dev->i2c_adap); in em28xx_dvb_init()
817 &dev->i2c_adap); in em28xx_dvb_init()
823 &dev->i2c_adap); in em28xx_dvb_init()
834 &dev->i2c_adap); in em28xx_dvb_init()
837 &dev->i2c_adap, &em28xx_qt1010_config); in em28xx_dvb_init()
843 &dev->i2c_adap); in em28xx_dvb_init()
[all …]
/drivers/media/video/tm6000/
Dtm6000-i2c.c156 static int tm6000_i2c_xfer(struct i2c_adapter *i2c_adap, in tm6000_i2c_xfer() argument
159 struct tm6000_core *dev = i2c_adap->algo_data; in tm6000_i2c_xfer()
309 dev->i2c_adap.owner = THIS_MODULE; in tm6000_i2c_register()
310 dev->i2c_adap.algo = &tm6000_algo; in tm6000_i2c_register()
311 dev->i2c_adap.dev.parent = &dev->udev->dev; in tm6000_i2c_register()
312 strlcpy(dev->i2c_adap.name, dev->name, sizeof(dev->i2c_adap.name)); in tm6000_i2c_register()
313 dev->i2c_adap.algo_data = dev; in tm6000_i2c_register()
314 i2c_set_adapdata(&dev->i2c_adap, &dev->v4l2_dev); in tm6000_i2c_register()
315 rc = i2c_add_adapter(&dev->i2c_adap); in tm6000_i2c_register()
319 dev->i2c_client.adapter = &dev->i2c_adap; in tm6000_i2c_register()
[all …]
/drivers/media/video/cx18/
Dcx18-i2c.c115 struct i2c_adapter *adap = &cx->i2c_adap[bus]; in cx18_i2c_register()
250 memcpy(&cx->i2c_adap[i], &cx18_i2c_adap_template, in init_cx18_i2c()
252 cx->i2c_adap[i].algo_data = &cx->i2c_algo[i]; in init_cx18_i2c()
253 sprintf(cx->i2c_adap[i].name + strlen(cx->i2c_adap[i].name), in init_cx18_i2c()
255 i2c_set_adapdata(&cx->i2c_adap[i], &cx->v4l2_dev); in init_cx18_i2c()
256 cx->i2c_adap[i].dev.parent = &cx->pci_dev->dev; in init_cx18_i2c()
295 err = i2c_bit_add_bus(&cx->i2c_adap[0]); in init_cx18_i2c()
298 err = i2c_bit_add_bus(&cx->i2c_adap[1]); in init_cx18_i2c()
304 i2c_del_adapter(&cx->i2c_adap[0]); in init_cx18_i2c()
319 i2c_del_adapter(&cx->i2c_adap[i]); in exit_cx18_i2c()
/drivers/media/video/ivtv/
Divtv-i2c.c179 struct i2c_adapter *adap = &itv->i2c_adap; in ivtv_i2c_new_ir()
260 return i2c_new_probed_device(&itv->i2c_adap, &info, addr_list, NULL); in ivtv_i2c_new_ir_legacy()
266 struct i2c_adapter *adap = &itv->i2c_adap; in ivtv_i2c_register()
601 static int ivtv_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num) in ivtv_xfer() argument
603 struct v4l2_device *v4l2_dev = i2c_get_adapdata(i2c_adap); in ivtv_xfer()
722 memcpy(&itv->i2c_adap, &ivtv_i2c_adap_hw_template, in init_ivtv_i2c()
725 memcpy(&itv->i2c_adap, &ivtv_i2c_adap_template, in init_ivtv_i2c()
732 itv->i2c_adap.algo_data = &itv->i2c_algo; in init_ivtv_i2c()
734 sprintf(itv->i2c_adap.name + strlen(itv->i2c_adap.name), " #%d", in init_ivtv_i2c()
736 i2c_set_adapdata(&itv->i2c_adap, &itv->v4l2_dev); in init_ivtv_i2c()
[all …]
/drivers/media/video/pvrusb2/
Dpvrusb2-i2c-core.c383 static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap, in pvr2_i2c_xfer() argument
389 struct pvr2_hdw *hdw = (struct pvr2_hdw *)(i2c_adap->algo_data); in pvr2_i2c_xfer()
552 rc = i2c_transfer(&hdw->i2c_adap, msg, ARRAY_SIZE(msg)); in do_i2c_probe()
593 i2c_new_device(&hdw->i2c_adap, &info); in pvr2_i2c_register_ir()
607 i2c_new_device(&hdw->i2c_adap, &info); in pvr2_i2c_register_ir()
614 i2c_new_device(&hdw->i2c_adap, &info); in pvr2_i2c_register_ir()
652 memcpy(&hdw->i2c_adap,&pvr2_i2c_adap_template,sizeof(hdw->i2c_adap)); in pvr2_i2c_core_init()
654 strlcpy(hdw->i2c_adap.name,hdw->name,sizeof(hdw->i2c_adap.name)); in pvr2_i2c_core_init()
655 hdw->i2c_adap.dev.parent = &hdw->usb_dev->dev; in pvr2_i2c_core_init()
656 hdw->i2c_adap.algo = &hdw->i2c_algo; in pvr2_i2c_core_init()
[all …]
/drivers/staging/media/solo6x10/
Di2c.c46 i2c_transfer(&solo_dev->i2c_adap[id], msgs, 2); in solo_i2c_readbyte()
64 i2c_transfer(&solo_dev->i2c_adap[id], &msgs, 1); in solo_i2c_writebyte()
222 if (&solo_dev->i2c_adap[i] == adap) in solo_i2c_master_xfer()
289 struct i2c_adapter *adap = &solo_dev->i2c_adap[i]; in solo_i2c_init()
306 if (!solo_dev->i2c_adap[i].algo_data) in solo_i2c_init()
308 i2c_del_adapter(&solo_dev->i2c_adap[i]); in solo_i2c_init()
309 solo_dev->i2c_adap[i].algo_data = NULL; in solo_i2c_init()
325 if (!solo_dev->i2c_adap[i].algo_data) in solo_i2c_exit()
327 i2c_del_adapter(&solo_dev->i2c_adap[i]); in solo_i2c_exit()
328 solo_dev->i2c_adap[i].algo_data = NULL; in solo_i2c_exit()

12345678