Lines Matching refs:tp
119 lwp_tty_t tp; in _serial_ty_bypass() local
120 tp = (lwp_tty_t)data; in _serial_ty_bypass()
122 tty_lock(tp); in _serial_ty_bypass()
123 ttydisc_rint(tp, ch, 0); in _serial_ty_bypass()
124 ttydisc_rint_done(tp); in _serial_ty_bypass()
125 tty_unlock(tp); in _serial_ty_bypass()
131 rt_inline void _setup_serial(struct rt_serial_device* serial, lwp_tty_t tp, in _setup_serial() argument
134 … rt_bypass_lower_register(serial, "tty", RT_BYPASS_PROTECT_LEVEL_1, _serial_ty_bypass, (void *)tp); in _setup_serial()
137 rt_inline void _restore_serial(struct rt_serial_device *serial, lwp_tty_t tp, in _restore_serial() argument
143 static void _serial_tty_set_speed(struct lwp_tty *tp) in _serial_tty_set_speed() argument
145 struct serial_tty_context *softc = (struct serial_tty_context *)(tp->t_devswsoftc); in _serial_tty_set_speed()
153 tp->t_termios_init_in.c_cflag |= serial_hw_config.c_cflag; in _serial_tty_set_speed()
155 …tp->t_termios_init_in.__c_ispeed = tp->t_termios_init_in.__c_ospeed = cfgetospeed(&tp->t_termios_i… in _serial_tty_set_speed()
167 static void serial_tty_outwakeup(struct lwp_tty *tp) in serial_tty_outwakeup() argument
171 struct serial_tty_context *context = tty_softc(tp); in serial_tty_outwakeup()
187 while ((len = ttydisc_getc(tp, &out_char, sizeof(out_char))) != 0) in serial_tty_outwakeup()
199 static int serial_tty_open(struct lwp_tty *tp) in serial_tty_open() argument
206 softc = tty_softc(tp); in serial_tty_open()
221 _setup_serial(serial, tp, softc); in serial_tty_open()
226 static void serial_tty_close(struct lwp_tty *tp) in serial_tty_close() argument
230 softc = tty_softc(tp); in serial_tty_close()
239 static int serial_tty_ioctl(struct lwp_tty *tp, rt_ubase_t cmd, rt_caddr_t data, in serial_tty_ioctl() argument
258 static int serial_tty_param(struct lwp_tty *tp, struct termios *t) in serial_tty_param() argument
260 struct serial_tty_context *softc = (struct serial_tty_context *)(tp->t_devswsoftc); in serial_tty_param()
266 if (!tty_opened(tp)) in serial_tty_param()
345 lwp_tty_t tp; in rt_hw_serial_unregister_tty() local
349 tp = rt_container_of(tty_dev, struct lwp_tty, parent); in rt_hw_serial_unregister_tty()
352 softc = tty_softc(tp); in rt_hw_serial_unregister_tty()
355 tty_lock(tp); in rt_hw_serial_unregister_tty()
357 tty_rel_gone(tp); in rt_hw_serial_unregister_tty()
360 rt_device_destroy(&tp->parent); in rt_hw_serial_unregister_tty()
362 lwp_tty_delete(tp); in rt_hw_serial_unregister_tty()
388 lwp_tty_t tp; in _match_tty_iter() local
394 tp = rt_container_of(device, struct lwp_tty, parent); in _match_tty_iter()
395 softc = tty_softc(tp); in _match_tty_iter()