Lines Matching refs:vnd_userial
71 static vnd_userial_cb_t vnd_userial; variable
145 if (ioctl(vnd_userial.fd, TIOCSETD, &ldisc) < 0) in userial_ioctl_init_bt_wake()
178 vnd_userial.fd = -1; in userial_vendor_init()
179 snprintf(vnd_userial.port_name, VND_PORT_NAME_MAXLEN, "%s", \ in userial_vendor_init()
199 vnd_userial.fd = -1; in userial_vendor_open()
242 ALOGI("userial vendor open: opening %s", vnd_userial.port_name); in userial_vendor_open()
244 if ((vnd_userial.fd = open(vnd_userial.port_name, O_RDWR)) == -1) in userial_vendor_open()
246 ALOGE("userial vendor open: unable to open %s", vnd_userial.port_name); in userial_vendor_open()
250 tcflush(vnd_userial.fd, TCIOFLUSH); in userial_vendor_open()
252 tcgetattr(vnd_userial.fd, &vnd_userial.termios); in userial_vendor_open()
253 cfmakeraw(&vnd_userial.termios); in userial_vendor_open()
254 vnd_userial.termios.c_cflag |= (CRTSCTS | stop_bits); in userial_vendor_open()
255 tcsetattr(vnd_userial.fd, TCSANOW, &vnd_userial.termios); in userial_vendor_open()
256 tcflush(vnd_userial.fd, TCIOFLUSH); in userial_vendor_open()
258 tcsetattr(vnd_userial.fd, TCSANOW, &vnd_userial.termios); in userial_vendor_open()
259 tcflush(vnd_userial.fd, TCIOFLUSH); in userial_vendor_open()
260 tcflush(vnd_userial.fd, TCIOFLUSH); in userial_vendor_open()
263 cfsetospeed(&vnd_userial.termios, baud); in userial_vendor_open()
264 cfsetispeed(&vnd_userial.termios, baud); in userial_vendor_open()
265 tcsetattr(vnd_userial.fd, TCSANOW, &vnd_userial.termios); in userial_vendor_open()
268 userial_ioctl_init_bt_wake(vnd_userial.fd); in userial_vendor_open()
271 ALOGI("device fd = %d open", vnd_userial.fd); in userial_vendor_open()
273 return vnd_userial.fd; in userial_vendor_open()
289 if (vnd_userial.fd == -1) in userial_vendor_close()
294 ioctl(vnd_userial.fd, USERIAL_IOCTL_BT_WAKE_DEASSERT, NULL); in userial_vendor_close()
297 ALOGI("device fd = %d close", vnd_userial.fd); in userial_vendor_close()
299 tcflush(vnd_userial.fd, TCIOFLUSH); in userial_vendor_close()
300 if ((result = close(vnd_userial.fd)) < 0) in userial_vendor_close()
301 ALOGE( "close(fd:%d) FAILED result:%d", vnd_userial.fd, result); in userial_vendor_close()
303 vnd_userial.fd = -1; in userial_vendor_close()
321 cfsetospeed(&vnd_userial.termios, tcio_baud); in userial_vendor_set_baud()
322 cfsetispeed(&vnd_userial.termios, tcio_baud); in userial_vendor_set_baud()
323 tcsetattr(vnd_userial.fd, TCSANOW, &vnd_userial.termios); in userial_vendor_set_baud()
342 ioctl(vnd_userial.fd, USERIAL_IOCTL_BT_WAKE_ASSERT, NULL); in userial_vendor_ioctl()
347 ioctl(vnd_userial.fd, USERIAL_IOCTL_BT_WAKE_DEASSERT, NULL); in userial_vendor_ioctl()
351 ioctl(vnd_userial.fd, USERIAL_IOCTL_BT_WAKE_GET_ST, p_data); in userial_vendor_ioctl()
372 strcpy(vnd_userial.port_name, p_conf_value); in userial_set_port()