Lines Matching refs:vnd_userial
72 static vnd_userial_cb_t vnd_userial; variable
146 if (ioctl(vnd_userial.fd, TIOCSETD, &ldisc) < 0) in userial_ioctl_init_bt_wake()
179 vnd_userial.fd = -1; in userial_vendor_init()
180 snprintf(vnd_userial.port_name, VND_PORT_NAME_MAXLEN, "%s", \ in userial_vendor_init()
200 vnd_userial.fd = -1; in userial_vendor_open()
243 ALOGI("userial vendor open: opening %s", vnd_userial.port_name); in userial_vendor_open()
245 if ((vnd_userial.fd = open(vnd_userial.port_name, O_RDWR)) == -1) in userial_vendor_open()
247 ALOGE("userial vendor open: unable to open %s", vnd_userial.port_name); in userial_vendor_open()
251 tcflush(vnd_userial.fd, TCIOFLUSH); in userial_vendor_open()
253 tcgetattr(vnd_userial.fd, &vnd_userial.termios); in userial_vendor_open()
254 cfmakeraw(&vnd_userial.termios); in userial_vendor_open()
255 vnd_userial.termios.c_cflag |= (CRTSCTS | stop_bits); in userial_vendor_open()
256 tcsetattr(vnd_userial.fd, TCSANOW, &vnd_userial.termios); in userial_vendor_open()
257 tcflush(vnd_userial.fd, TCIOFLUSH); in userial_vendor_open()
259 tcsetattr(vnd_userial.fd, TCSANOW, &vnd_userial.termios); in userial_vendor_open()
260 tcflush(vnd_userial.fd, TCIOFLUSH); in userial_vendor_open()
261 tcflush(vnd_userial.fd, TCIOFLUSH); in userial_vendor_open()
264 cfsetospeed(&vnd_userial.termios, baud); in userial_vendor_open()
265 cfsetispeed(&vnd_userial.termios, baud); in userial_vendor_open()
266 tcsetattr(vnd_userial.fd, TCSANOW, &vnd_userial.termios); in userial_vendor_open()
269 userial_ioctl_init_bt_wake(vnd_userial.fd); in userial_vendor_open()
272 ALOGI("device fd = %d open", vnd_userial.fd); in userial_vendor_open()
274 return vnd_userial.fd; in userial_vendor_open()
290 if (vnd_userial.fd == -1) in userial_vendor_close()
295 ioctl(vnd_userial.fd, USERIAL_IOCTL_BT_WAKE_DEASSERT, NULL); in userial_vendor_close()
298 ALOGI("device fd = %d close", vnd_userial.fd); in userial_vendor_close()
300 tcflush(vnd_userial.fd, TCIOFLUSH); in userial_vendor_close()
301 if ((result = close(vnd_userial.fd)) < 0) in userial_vendor_close()
302 ALOGE( "close(fd:%d) FAILED result:%d", vnd_userial.fd, result); in userial_vendor_close()
304 vnd_userial.fd = -1; in userial_vendor_close()
322 cfsetospeed(&vnd_userial.termios, tcio_baud); in userial_vendor_set_baud()
323 cfsetispeed(&vnd_userial.termios, tcio_baud); in userial_vendor_set_baud()
324 tcsetattr(vnd_userial.fd, TCSANOW, &vnd_userial.termios); in userial_vendor_set_baud()
343 ioctl(vnd_userial.fd, USERIAL_IOCTL_BT_WAKE_ASSERT, NULL); in userial_vendor_ioctl()
348 ioctl(vnd_userial.fd, USERIAL_IOCTL_BT_WAKE_DEASSERT, NULL); in userial_vendor_ioctl()
352 ioctl(vnd_userial.fd, USERIAL_IOCTL_BT_WAKE_GET_ST, p_data); in userial_vendor_ioctl()
373 strcpy(vnd_userial.port_name, p_conf_value); in userial_set_port()