Lines Matching refs:uport
53 static int uart_dcd_enabled(struct uart_port *uport) in uart_dcd_enabled() argument
55 return !!(uport->status & UPSTAT_DCD_ENABLE); in uart_dcd_enabled()
65 static inline void uart_port_deref(struct uart_port *uport) in uart_port_deref() argument
67 if (atomic_dec_and_test(&uport->state->refcount)) in uart_port_deref()
68 wake_up(&uport->state->remove_wait); in uart_port_deref()
79 #define uart_port_unlock(uport, flags) \ argument
81 struct uart_port *__uport = uport; \
158 static void uart_port_dtr_rts(struct uart_port *uport, int raise) in uart_port_dtr_rts() argument
160 int rs485_on = uport->rs485_config && in uart_port_dtr_rts()
161 (uport->rs485.flags & SER_RS485_ENABLED); in uart_port_dtr_rts()
162 int RTS_after_send = !!(uport->rs485.flags & SER_RS485_RTS_AFTER_SEND); in uart_port_dtr_rts()
166 uart_set_mctrl(uport, TIOCM_DTR); in uart_port_dtr_rts()
167 uart_clear_mctrl(uport, TIOCM_RTS); in uart_port_dtr_rts()
169 uart_set_mctrl(uport, TIOCM_DTR | TIOCM_RTS); in uart_port_dtr_rts()
175 uart_clear_mctrl(uport, clear); in uart_port_dtr_rts()
186 struct uart_port *uport = uart_port_check(state); in uart_port_startup() local
191 if (uport->type == PORT_UNKNOWN) in uart_port_startup()
211 uart_port_unlock(uport, flags); in uart_port_startup()
213 uart_port_unlock(uport, flags); in uart_port_startup()
221 retval = uport->ops->startup(uport); in uart_port_startup()
223 if (uart_console(uport) && uport->cons->cflag) { in uart_port_startup()
224 tty->termios.c_cflag = uport->cons->cflag; in uart_port_startup()
225 tty->termios.c_ispeed = uport->cons->ispeed; in uart_port_startup()
226 tty->termios.c_ospeed = uport->cons->ospeed; in uart_port_startup()
227 uport->cons->cflag = 0; in uart_port_startup()
228 uport->cons->ispeed = 0; in uart_port_startup()
229 uport->cons->ospeed = 0; in uart_port_startup()
241 uart_port_dtr_rts(uport, 1); in uart_port_startup()
280 struct uart_port *uport = uart_port_check(state); in uart_shutdown() local
297 if (uport && uart_console(uport) && tty) { in uart_shutdown()
298 uport->cons->cflag = tty->termios.c_cflag; in uart_shutdown()
299 uport->cons->ispeed = tty->termios.c_ispeed; in uart_shutdown()
300 uport->cons->ospeed = tty->termios.c_ospeed; in uart_shutdown()
304 uart_port_dtr_rts(uport, 0); in uart_shutdown()
325 uart_port_unlock(uport, flags); in uart_shutdown()
488 struct uart_port *uport = uart_port_check(state); in uart_change_speed() local
496 if (!tty || uport->type == PORT_UNKNOWN) in uart_change_speed()
500 uport->ops->set_termios(uport, termios, old_termios); in uart_change_speed()
505 spin_lock_irq(&uport->lock); in uart_change_speed()
507 uport->status |= UPSTAT_CTS_ENABLE; in uart_change_speed()
509 uport->status &= ~UPSTAT_CTS_ENABLE; in uart_change_speed()
512 uport->status &= ~UPSTAT_DCD_ENABLE; in uart_change_speed()
514 uport->status |= UPSTAT_DCD_ENABLE; in uart_change_speed()
517 hw_stopped = uport->hw_stopped; in uart_change_speed()
518 uport->hw_stopped = uart_softcts_mode(uport) && in uart_change_speed()
519 !(uport->ops->get_mctrl(uport) & TIOCM_CTS); in uart_change_speed()
520 if (uport->hw_stopped) { in uart_change_speed()
522 uport->ops->stop_tx(uport); in uart_change_speed()
527 spin_unlock_irq(&uport->lock); in uart_change_speed()
742 struct uart_port *uport; in uart_get_info() local
750 uport = uart_port_check(state); in uart_get_info()
751 if (!uport) in uart_get_info()
754 retinfo->type = uport->type; in uart_get_info()
755 retinfo->line = uport->line; in uart_get_info()
756 retinfo->port = uport->iobase; in uart_get_info()
758 retinfo->port_high = (long) uport->iobase >> HIGH_BITS_OFFSET; in uart_get_info()
759 retinfo->irq = uport->irq; in uart_get_info()
760 retinfo->flags = (__force int)uport->flags; in uart_get_info()
761 retinfo->xmit_fifo_size = uport->fifosize; in uart_get_info()
762 retinfo->baud_base = uport->uartclk / 16; in uart_get_info()
767 retinfo->custom_divisor = uport->custom_divisor; in uart_get_info()
768 retinfo->hub6 = uport->hub6; in uart_get_info()
769 retinfo->io_type = uport->iotype; in uart_get_info()
770 retinfo->iomem_reg_shift = uport->regshift; in uart_get_info()
771 retinfo->iomem_base = (void *)(unsigned long)uport->mapbase; in uart_get_info()
792 struct uart_port *uport = uart_port_check(state); in uart_set_info() local
799 if (!uport) in uart_set_info()
813 change_irq = !(uport->flags & UPF_FIXED_PORT) in uart_set_info()
814 && new_info->irq != uport->irq; in uart_set_info()
821 change_port = !(uport->flags & UPF_FIXED_PORT) in uart_set_info()
822 && (new_port != uport->iobase || in uart_set_info()
823 (unsigned long)new_info->iomem_base != uport->mapbase || in uart_set_info()
824 new_info->hub6 != uport->hub6 || in uart_set_info()
825 new_info->io_type != uport->iotype || in uart_set_info()
826 new_info->iomem_reg_shift != uport->regshift || in uart_set_info()
827 new_info->type != uport->type); in uart_set_info()
829 old_flags = uport->flags; in uart_set_info()
831 old_custom_divisor = uport->custom_divisor; in uart_set_info()
836 (new_info->baud_base != uport->uartclk / 16) || in uart_set_info()
840 new_info->xmit_fifo_size != uport->fifosize) || in uart_set_info()
843 uport->flags = ((uport->flags & ~UPF_USR_MASK) | in uart_set_info()
845 uport->custom_divisor = new_info->custom_divisor; in uart_set_info()
858 if (uport->ops->verify_port) in uart_set_info()
859 retval = uport->ops->verify_port(uport, new_info); in uart_set_info()
888 old_iobase = uport->iobase; in uart_set_info()
889 old_mapbase = uport->mapbase; in uart_set_info()
890 old_type = uport->type; in uart_set_info()
891 old_hub6 = uport->hub6; in uart_set_info()
892 old_iotype = uport->iotype; in uart_set_info()
893 old_shift = uport->regshift; in uart_set_info()
898 if (old_type != PORT_UNKNOWN && uport->ops->release_port) in uart_set_info()
899 uport->ops->release_port(uport); in uart_set_info()
901 uport->iobase = new_port; in uart_set_info()
902 uport->type = new_info->type; in uart_set_info()
903 uport->hub6 = new_info->hub6; in uart_set_info()
904 uport->iotype = new_info->io_type; in uart_set_info()
905 uport->regshift = new_info->iomem_reg_shift; in uart_set_info()
906 uport->mapbase = (unsigned long)new_info->iomem_base; in uart_set_info()
911 if (uport->type != PORT_UNKNOWN && uport->ops->request_port) { in uart_set_info()
912 retval = uport->ops->request_port(uport); in uart_set_info()
923 uport->iobase = old_iobase; in uart_set_info()
924 uport->type = old_type; in uart_set_info()
925 uport->hub6 = old_hub6; in uart_set_info()
926 uport->iotype = old_iotype; in uart_set_info()
927 uport->regshift = old_shift; in uart_set_info()
928 uport->mapbase = old_mapbase; in uart_set_info()
931 retval = uport->ops->request_port(uport); in uart_set_info()
937 uport->type = PORT_UNKNOWN; in uart_set_info()
951 uport->irq = new_info->irq; in uart_set_info()
952 if (!(uport->flags & UPF_FIXED_PORT)) in uart_set_info()
953 uport->uartclk = new_info->baud_base * 16; in uart_set_info()
954 uport->flags = (uport->flags & ~UPF_CHANGE_MASK) | in uart_set_info()
956 uport->custom_divisor = new_info->custom_divisor; in uart_set_info()
960 uport->fifosize = new_info->xmit_fifo_size; in uart_set_info()
964 if (uport->type == PORT_UNKNOWN) in uart_set_info()
967 if (((old_flags ^ uport->flags) & UPF_SPD_MASK) || in uart_set_info()
968 old_custom_divisor != uport->custom_divisor) { in uart_set_info()
973 if (uport->flags & UPF_SPD_MASK) { in uart_set_info()
974 dev_notice_ratelimited(uport->dev, in uart_set_info()
1022 struct uart_port *uport = uart_port_check(state); in uart_get_lsr_info() local
1025 result = uport->ops->tx_empty(uport); in uart_get_lsr_info()
1033 if (uport->x_char || in uart_get_lsr_info()
1035 !uart_tx_stopped(uport))) in uart_get_lsr_info()
1045 struct uart_port *uport; in uart_tiocmget() local
1049 uport = uart_port_check(state); in uart_tiocmget()
1050 if (!uport) in uart_tiocmget()
1054 result = uport->mctrl; in uart_tiocmget()
1055 spin_lock_irq(&uport->lock); in uart_tiocmget()
1056 result |= uport->ops->get_mctrl(uport); in uart_tiocmget()
1057 spin_unlock_irq(&uport->lock); in uart_tiocmget()
1069 struct uart_port *uport; in uart_tiocmset() local
1073 uport = uart_port_check(state); in uart_tiocmset()
1074 if (!uport) in uart_tiocmset()
1078 if (uport->rs485.flags & SER_RS485_ENABLED) { in uart_tiocmset()
1083 uart_update_mctrl(uport, set, clear); in uart_tiocmset()
1095 struct uart_port *uport; in uart_break_ctl() local
1099 uport = uart_port_check(state); in uart_break_ctl()
1100 if (!uport) in uart_break_ctl()
1103 if (uport->type != PORT_UNKNOWN && uport->ops->break_ctl) in uart_break_ctl()
1104 uport->ops->break_ctl(uport, break_state); in uart_break_ctl()
1114 struct uart_port *uport; in uart_do_autoconfig() local
1128 uport = uart_port_check(state); in uart_do_autoconfig()
1129 if (!uport) { in uart_do_autoconfig()
1142 if (uport->type != PORT_UNKNOWN && uport->ops->release_port) in uart_do_autoconfig()
1143 uport->ops->release_port(uport); in uart_do_autoconfig()
1146 if (uport->flags & UPF_AUTO_IRQ) in uart_do_autoconfig()
1153 uport->ops->config_port(uport, flags); in uart_do_autoconfig()
1166 static void uart_enable_ms(struct uart_port *uport) in uart_enable_ms() argument
1171 if (uport->ops->enable_ms) in uart_enable_ms()
1172 uport->ops->enable_ms(uport); in uart_enable_ms()
1186 struct uart_port *uport; in uart_wait_modem_status() local
1195 uport = uart_port_ref(state); in uart_wait_modem_status()
1196 if (!uport) in uart_wait_modem_status()
1198 spin_lock_irq(&uport->lock); in uart_wait_modem_status()
1199 memcpy(&cprev, &uport->icount, sizeof(struct uart_icount)); in uart_wait_modem_status()
1200 uart_enable_ms(uport); in uart_wait_modem_status()
1201 spin_unlock_irq(&uport->lock); in uart_wait_modem_status()
1205 spin_lock_irq(&uport->lock); in uart_wait_modem_status()
1206 memcpy(&cnow, &uport->icount, sizeof(struct uart_icount)); in uart_wait_modem_status()
1207 spin_unlock_irq(&uport->lock); in uart_wait_modem_status()
1231 uart_port_deref(uport); in uart_wait_modem_status()
1247 struct uart_port *uport; in uart_get_icount() local
1249 uport = uart_port_ref(state); in uart_get_icount()
1250 if (!uport) in uart_get_icount()
1252 spin_lock_irq(&uport->lock); in uart_get_icount()
1253 memcpy(&cnow, &uport->icount, sizeof(struct uart_icount)); in uart_get_icount()
1254 spin_unlock_irq(&uport->lock); in uart_get_icount()
1255 uart_port_deref(uport); in uart_get_icount()
1373 struct uart_port *uport; in uart_ioctl() local
1410 uport = uart_port_check(state); in uart_ioctl()
1412 if (!uport || tty_io_error(tty)) { in uart_ioctl()
1428 ret = uart_get_rs485_config(uport, uarg); in uart_ioctl()
1432 ret = uart_set_rs485_config(uport, uarg); in uart_ioctl()
1443 if (uport->ops->ioctl) in uart_ioctl()
1444 ret = uport->ops->ioctl(uport, cmd, arg); in uart_ioctl()
1456 struct uart_port *uport; in uart_set_ldisc() local
1463 uport = uart_port_check(state); in uart_set_ldisc()
1464 if (uport && uport->ops->set_ldisc) in uart_set_ldisc()
1465 uport->ops->set_ldisc(uport, &tty->termios); in uart_set_ldisc()
1473 struct uart_port *uport; in uart_set_termios() local
1479 uport = uart_port_check(state); in uart_set_termios()
1480 if (!uport) in uart_set_termios()
1487 if (uport->flags & UPF_SOFT_FLOW) { in uart_set_termios()
1514 uart_clear_mctrl(uport, TIOCM_RTS | TIOCM_DTR); in uart_set_termios()
1521 uart_set_mctrl(uport, mask); in uart_set_termios()
1556 struct uart_port *uport = uart_port_check(state); in uart_tty_port_shutdown() local
1563 if (WARN(!uport, "detached port still initialized!\n")) in uart_tty_port_shutdown()
1566 spin_lock_irq(&uport->lock); in uart_tty_port_shutdown()
1567 uport->ops->stop_rx(uport); in uart_tty_port_shutdown()
1568 spin_unlock_irq(&uport->lock); in uart_tty_port_shutdown()
1582 spin_lock_irq(&uport->lock); in uart_tty_port_shutdown()
1585 spin_unlock_irq(&uport->lock); in uart_tty_port_shutdown()
1664 struct uart_port *uport; in uart_hangup() local
1670 uport = uart_port_check(state); in uart_hangup()
1671 WARN(!uport, "hangup of detached port!\n"); in uart_hangup()
1681 if (uport && !uart_console(uport)) in uart_hangup()
1693 struct uart_port *uport = uart_port_check(state); in uart_port_shutdown() local
1707 if (uport) in uart_port_shutdown()
1708 uport->ops->shutdown(uport); in uart_port_shutdown()
1713 if (uport) in uart_port_shutdown()
1714 synchronize_irq(uport->irq); in uart_port_shutdown()
1720 struct uart_port *uport; in uart_carrier_raised() local
1723 uport = uart_port_ref(state); in uart_carrier_raised()
1730 if (WARN_ON(!uport)) in uart_carrier_raised()
1732 spin_lock_irq(&uport->lock); in uart_carrier_raised()
1733 uart_enable_ms(uport); in uart_carrier_raised()
1734 mctrl = uport->ops->get_mctrl(uport); in uart_carrier_raised()
1735 spin_unlock_irq(&uport->lock); in uart_carrier_raised()
1736 uart_port_deref(uport); in uart_carrier_raised()
1745 struct uart_port *uport; in uart_dtr_rts() local
1747 uport = uart_port_ref(state); in uart_dtr_rts()
1748 if (!uport) in uart_dtr_rts()
1750 uart_port_dtr_rts(uport, raise); in uart_dtr_rts()
1751 uart_port_deref(uport); in uart_dtr_rts()
1789 struct uart_port *uport; in uart_port_activate() local
1792 uport = uart_port_check(state); in uart_port_activate()
1793 if (!uport || uport->flags & UPF_DEAD) in uart_port_activate()
1826 struct uart_port *uport; in uart_line_info() local
1832 uport = uart_port_check(state); in uart_line_info()
1833 if (!uport) in uart_line_info()
1836 mmio = uport->iotype >= UPIO_MEM; in uart_line_info()
1838 uport->line, uart_type(uport), in uart_line_info()
1840 mmio ? (unsigned long long)uport->mapbase in uart_line_info()
1841 : (unsigned long long)uport->iobase, in uart_line_info()
1842 uport->irq); in uart_line_info()
1844 if (uport->type == PORT_UNKNOWN) { in uart_line_info()
1853 spin_lock_irq(&uport->lock); in uart_line_info()
1854 status = uport->ops->get_mctrl(uport); in uart_line_info()
1855 spin_unlock_irq(&uport->lock); in uart_line_info()
1860 uport->icount.tx, uport->icount.rx); in uart_line_info()
1861 if (uport->icount.frame) in uart_line_info()
1862 seq_printf(m, " fe:%d", uport->icount.frame); in uart_line_info()
1863 if (uport->icount.parity) in uart_line_info()
1864 seq_printf(m, " pe:%d", uport->icount.parity); in uart_line_info()
1865 if (uport->icount.brk) in uart_line_info()
1866 seq_printf(m, " brk:%d", uport->icount.brk); in uart_line_info()
1867 if (uport->icount.overrun) in uart_line_info()
1868 seq_printf(m, " oe:%d", uport->icount.overrun); in uart_line_info()
1869 if (uport->icount.buf_overrun) in uart_line_info()
1870 seq_printf(m, " bo:%d", uport->icount.buf_overrun); in uart_line_info()
1873 if (uport->mctrl & (bit)) \ in uart_line_info()
2166 int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport) in uart_suspend_port() argument
2168 struct uart_state *state = drv->state + uport->line; in uart_suspend_port()
2171 struct uart_match match = {uport, drv}; in uart_suspend_port()
2175 tty_dev = device_find_child(uport->dev, &match, serial_match_port); in uart_suspend_port()
2177 enable_irq_wake(uport->irq); in uart_suspend_port()
2185 if (!console_suspend_enabled && uart_console(uport)) in uart_suspend_port()
2188 uport->suspended = 1; in uart_suspend_port()
2191 const struct uart_ops *ops = uport->ops; in uart_suspend_port()
2197 spin_lock_irq(&uport->lock); in uart_suspend_port()
2198 ops->stop_tx(uport); in uart_suspend_port()
2199 ops->set_mctrl(uport, 0); in uart_suspend_port()
2200 ops->stop_rx(uport); in uart_suspend_port()
2201 spin_unlock_irq(&uport->lock); in uart_suspend_port()
2206 for (tries = 3; !ops->tx_empty(uport) && tries; tries--) in uart_suspend_port()
2209 dev_err(uport->dev, "%s: Unable to drain transmitter\n", in uart_suspend_port()
2210 uport->name); in uart_suspend_port()
2212 ops->shutdown(uport); in uart_suspend_port()
2218 if (uart_console(uport)) in uart_suspend_port()
2219 console_stop(uport->cons); in uart_suspend_port()
2228 int uart_resume_port(struct uart_driver *drv, struct uart_port *uport) in uart_resume_port() argument
2230 struct uart_state *state = drv->state + uport->line; in uart_resume_port()
2233 struct uart_match match = {uport, drv}; in uart_resume_port()
2238 tty_dev = device_find_child(uport->dev, &match, serial_match_port); in uart_resume_port()
2239 if (!uport->suspended && device_may_wakeup(tty_dev)) { in uart_resume_port()
2240 if (irqd_is_wakeup_set(irq_get_irq_data((uport->irq)))) in uart_resume_port()
2241 disable_irq_wake(uport->irq); in uart_resume_port()
2247 uport->suspended = 0; in uart_resume_port()
2252 if (uart_console(uport)) { in uart_resume_port()
2257 termios.c_cflag = uport->cons->cflag; in uart_resume_port()
2258 termios.c_ispeed = uport->cons->ispeed; in uart_resume_port()
2259 termios.c_ospeed = uport->cons->ospeed; in uart_resume_port()
2269 uport->ops->set_termios(uport, &termios, NULL); in uart_resume_port()
2271 console_start(uport->cons); in uart_resume_port()
2275 const struct uart_ops *ops = uport->ops; in uart_resume_port()
2279 spin_lock_irq(&uport->lock); in uart_resume_port()
2280 ops->set_mctrl(uport, 0); in uart_resume_port()
2281 spin_unlock_irq(&uport->lock); in uart_resume_port()
2282 if (console_suspend_enabled || !uart_console(uport)) { in uart_resume_port()
2286 ret = ops->startup(uport); in uart_resume_port()
2290 spin_lock_irq(&uport->lock); in uart_resume_port()
2291 ops->set_mctrl(uport, uport->mctrl); in uart_resume_port()
2292 ops->start_tx(uport); in uart_resume_port()
2293 spin_unlock_irq(&uport->lock); in uart_resume_port()
2776 struct uart_port *uport; in console_show() local
2780 uport = uart_port_check(state); in console_show()
2781 if (uport) in console_show()
2782 console = uart_console_enabled(uport); in console_show()
2793 struct uart_port *uport; in console_store() local
2802 uport = uart_port_check(state); in console_store()
2803 if (uport) { in console_store()
2804 oldconsole = uart_console_enabled(uport); in console_store()
2806 ret = unregister_console(uport->cons); in console_store()
2808 if (uart_console(uport)) { in console_store()
2809 uport->console_reinit = 1; in console_store()
2810 register_console(uport->cons); in console_store()
2872 int uart_add_one_port(struct uart_driver *drv, struct uart_port *uport) in uart_add_one_port() argument
2880 if (uport->line >= drv->nr) in uart_add_one_port()
2883 state = drv->state + uport->line; in uart_add_one_port()
2896 state->uart_port = uport; in uart_add_one_port()
2897 uport->state = state; in uart_add_one_port()
2900 uport->cons = drv->cons; in uart_add_one_port()
2901 uport->minor = drv->tty_driver->minor_start + uport->line; in uart_add_one_port()
2902 uport->name = kasprintf(GFP_KERNEL, "%s%d", drv->dev_name, in uart_add_one_port()
2903 drv->tty_driver->name_base + uport->line); in uart_add_one_port()
2904 if (!uport->name) { in uart_add_one_port()
2913 if (!uart_console_enabled(uport)) in uart_add_one_port()
2914 uart_port_spin_lock_init(uport); in uart_add_one_port()
2916 if (uport->cons && uport->dev) in uart_add_one_port()
2917 of_console_check(uport->dev->of_node, uport->cons->name, uport->line); in uart_add_one_port()
2919 tty_port_link_device(port, drv->tty_driver, uport->line); in uart_add_one_port()
2920 uart_configure_port(drv, state, uport); in uart_add_one_port()
2922 port->console = uart_console(uport); in uart_add_one_port()
2925 if (uport->attr_group) in uart_add_one_port()
2928 uport->tty_groups = kcalloc(num_groups, sizeof(*uport->tty_groups), in uart_add_one_port()
2930 if (!uport->tty_groups) { in uart_add_one_port()
2934 uport->tty_groups[0] = &tty_dev_attr_group; in uart_add_one_port()
2935 if (uport->attr_group) in uart_add_one_port()
2936 uport->tty_groups[1] = uport->attr_group; in uart_add_one_port()
2943 uport->line, uport->dev, port, uport->tty_groups); in uart_add_one_port()
2947 dev_err(uport->dev, "Cannot register tty device on line %d\n", in uart_add_one_port()
2948 uport->line); in uart_add_one_port()
2954 uport->flags &= ~UPF_DEAD; in uart_add_one_port()
2974 int uart_remove_one_port(struct uart_driver *drv, struct uart_port *uport) in uart_remove_one_port() argument
2976 struct uart_state *state = drv->state + uport->line; in uart_remove_one_port()
2990 if (uart_port != uport) in uart_remove_one_port()
2991 dev_alert(uport->dev, "Removing wrong port: %p != %p\n", in uart_remove_one_port()
2992 uart_port, uport); in uart_remove_one_port()
2999 uport->flags |= UPF_DEAD; in uart_remove_one_port()
3005 tty_port_unregister_device(port, drv->tty_driver, uport->line); in uart_remove_one_port()
3016 if (uart_console(uport)) in uart_remove_one_port()
3017 unregister_console(uport->cons); in uart_remove_one_port()
3022 if (uport->type != PORT_UNKNOWN && uport->ops->release_port) in uart_remove_one_port()
3023 uport->ops->release_port(uport); in uart_remove_one_port()
3024 kfree(uport->tty_groups); in uart_remove_one_port()
3025 kfree(uport->name); in uart_remove_one_port()
3030 uport->type = PORT_UNKNOWN; in uart_remove_one_port()
3078 void uart_handle_dcd_change(struct uart_port *uport, unsigned int status) in uart_handle_dcd_change() argument
3080 struct tty_port *port = &uport->state->port; in uart_handle_dcd_change()
3084 lockdep_assert_held_once(&uport->lock); in uart_handle_dcd_change()
3095 uport->icount.dcd++; in uart_handle_dcd_change()
3097 if (uart_dcd_enabled(uport)) { in uart_handle_dcd_change()
3113 void uart_handle_cts_change(struct uart_port *uport, unsigned int status) in uart_handle_cts_change() argument
3115 lockdep_assert_held_once(&uport->lock); in uart_handle_cts_change()
3117 uport->icount.cts++; in uart_handle_cts_change()
3119 if (uart_softcts_mode(uport)) { in uart_handle_cts_change()
3120 if (uport->hw_stopped) { in uart_handle_cts_change()
3122 uport->hw_stopped = 0; in uart_handle_cts_change()
3123 uport->ops->start_tx(uport); in uart_handle_cts_change()
3124 uart_write_wakeup(uport); in uart_handle_cts_change()
3128 uport->hw_stopped = 1; in uart_handle_cts_change()
3129 uport->ops->stop_tx(uport); in uart_handle_cts_change()