Lines Matching full:vb
69 struct vprbrd *vb; member
86 struct vprbrd *vb = gpio->vb; in vprbrd_gpioa_get() local
87 struct vprbrd_gpioa_msg *gamsg = (struct vprbrd_gpioa_msg *)vb->buf; in vprbrd_gpioa_get()
93 mutex_lock(&vb->lock); in vprbrd_gpioa_get()
107 ret = usb_control_msg(vb->usb_dev, usb_sndctrlpipe(vb->usb_dev, 0), in vprbrd_gpioa_get()
114 ret = usb_control_msg(vb->usb_dev, usb_rcvctrlpipe(vb->usb_dev, 0), in vprbrd_gpioa_get()
120 mutex_unlock(&vb->lock); in vprbrd_gpioa_get()
136 struct vprbrd *vb = gpio->vb; in vprbrd_gpioa_set() local
137 struct vprbrd_gpioa_msg *gamsg = (struct vprbrd_gpioa_msg *)vb->buf; in vprbrd_gpioa_set()
145 mutex_lock(&vb->lock); in vprbrd_gpioa_set()
159 ret = usb_control_msg(vb->usb_dev, in vprbrd_gpioa_set()
160 usb_sndctrlpipe(vb->usb_dev, 0), in vprbrd_gpioa_set()
165 mutex_unlock(&vb->lock); in vprbrd_gpioa_set()
177 struct vprbrd *vb = gpio->vb; in vprbrd_gpioa_direction_input() local
178 struct vprbrd_gpioa_msg *gamsg = (struct vprbrd_gpioa_msg *)vb->buf; in vprbrd_gpioa_direction_input()
182 mutex_lock(&vb->lock); in vprbrd_gpioa_direction_input()
196 ret = usb_control_msg(vb->usb_dev, usb_sndctrlpipe(vb->usb_dev, 0), in vprbrd_gpioa_direction_input()
201 mutex_unlock(&vb->lock); in vprbrd_gpioa_direction_input()
214 struct vprbrd *vb = gpio->vb; in vprbrd_gpioa_direction_output() local
215 struct vprbrd_gpioa_msg *gamsg = (struct vprbrd_gpioa_msg *)vb->buf; in vprbrd_gpioa_direction_output()
223 mutex_lock(&vb->lock); in vprbrd_gpioa_direction_output()
237 ret = usb_control_msg(vb->usb_dev, usb_sndctrlpipe(vb->usb_dev, 0), in vprbrd_gpioa_direction_output()
242 mutex_unlock(&vb->lock); in vprbrd_gpioa_direction_output()
254 static int vprbrd_gpiob_setdir(struct vprbrd *vb, unsigned int offset, in vprbrd_gpiob_setdir() argument
257 struct vprbrd_gpiob_msg *gbmsg = (struct vprbrd_gpiob_msg *)vb->buf; in vprbrd_gpiob_setdir()
264 ret = usb_control_msg(vb->usb_dev, usb_sndctrlpipe(vb->usb_dev, 0), in vprbrd_gpiob_setdir()
281 struct vprbrd *vb = gpio->vb; in vprbrd_gpiob_get() local
282 struct vprbrd_gpiob_msg *gbmsg = (struct vprbrd_gpiob_msg *)vb->buf; in vprbrd_gpiob_get()
288 mutex_lock(&vb->lock); in vprbrd_gpiob_get()
290 ret = usb_control_msg(vb->usb_dev, usb_rcvctrlpipe(vb->usb_dev, 0), in vprbrd_gpiob_get()
296 mutex_unlock(&vb->lock); in vprbrd_gpiob_get()
312 struct vprbrd *vb = gpio->vb; in vprbrd_gpiob_set() local
313 struct vprbrd_gpiob_msg *gbmsg = (struct vprbrd_gpiob_msg *)vb->buf; in vprbrd_gpiob_set()
321 mutex_lock(&vb->lock); in vprbrd_gpiob_set()
327 ret = usb_control_msg(vb->usb_dev, in vprbrd_gpiob_set()
328 usb_sndctrlpipe(vb->usb_dev, 0), in vprbrd_gpiob_set()
333 mutex_unlock(&vb->lock); in vprbrd_gpiob_set()
345 struct vprbrd *vb = gpio->vb; in vprbrd_gpiob_direction_input() local
349 mutex_lock(&vb->lock); in vprbrd_gpiob_direction_input()
351 ret = vprbrd_gpiob_setdir(vb, offset, 0); in vprbrd_gpiob_direction_input()
353 mutex_unlock(&vb->lock); in vprbrd_gpiob_direction_input()
366 struct vprbrd *vb = gpio->vb; in vprbrd_gpiob_direction_output() local
370 mutex_lock(&vb->lock); in vprbrd_gpiob_direction_output()
372 ret = vprbrd_gpiob_setdir(vb, offset, 1); in vprbrd_gpiob_direction_output()
376 mutex_unlock(&vb->lock); in vprbrd_gpiob_direction_output()
387 struct vprbrd *vb = dev_get_drvdata(pdev->dev.parent); in vprbrd_gpio_probe() local
395 vb_gpio->vb = vb; in vprbrd_gpio_probe()