Lines Matching refs:vb
45 struct vprbrd *vb = (struct vprbrd *)i2c->algo_data; in vprbrd_i2c_status() local
50 ret = usb_control_msg(vb->usb_dev, usb_rcvctrlpipe(vb->usb_dev, 0), in vprbrd_i2c_status()
118 static int vprbrd_i2c_read(struct vprbrd *vb, struct i2c_msg *msg) in vprbrd_i2c_read() argument
123 (struct vprbrd_i2c_read_msg *)vb->buf; in vprbrd_i2c_read()
205 ret = vprbrd_i2c_receive(vb->usb_dev, rmsg, len1); in vprbrd_i2c_read()
213 ret = vprbrd_i2c_receive(vb->usb_dev, rmsg, len2); in vprbrd_i2c_read()
223 static int vprbrd_i2c_write(struct vprbrd *vb, struct i2c_msg *msg) in vprbrd_i2c_write() argument
229 (struct vprbrd_i2c_write_msg *)vb->buf; in vprbrd_i2c_write()
260 ret = usb_bulk_msg(vb->usb_dev, in vprbrd_i2c_write()
261 usb_sndbulkpipe(vb->usb_dev, in vprbrd_i2c_write()
276 struct vprbrd *vb = (struct vprbrd *)i2c->algo_data; in vprbrd_i2c_xfer() local
278 (struct vprbrd_i2c_addr_msg *)vb->buf; in vprbrd_i2c_xfer()
279 struct vprbrd_i2c_status *smsg = (struct vprbrd_i2c_status *)vb->buf; in vprbrd_i2c_xfer()
291 mutex_lock(&vb->lock); in vprbrd_i2c_xfer()
302 ret = vprbrd_i2c_addr(vb->usb_dev, amsg); in vprbrd_i2c_xfer()
306 ret = vprbrd_i2c_read(vb, pmsg); in vprbrd_i2c_xfer()
318 ret = vprbrd_i2c_write(vb, pmsg); in vprbrd_i2c_xfer()
327 ret = vprbrd_i2c_addr(vb->usb_dev, amsg); in vprbrd_i2c_xfer()
338 mutex_unlock(&vb->lock); in vprbrd_i2c_xfer()
342 mutex_unlock(&vb->lock); in vprbrd_i2c_xfer()
364 struct vprbrd *vb = dev_get_drvdata(pdev->dev.parent); in vprbrd_i2c_probe() local
378 vb_i2c->i2c.algo_data = vb; in vprbrd_i2c_probe()
384 vb->usb_dev->bus->busnum, vb->usb_dev->devnum); in vprbrd_i2c_probe()
389 pipe = usb_sndctrlpipe(vb->usb_dev, 0); in vprbrd_i2c_probe()
390 ret = usb_control_msg(vb->usb_dev, pipe, in vprbrd_i2c_probe()