Lines Matching refs:em485

602 	if (p->em485)  in serial8250_em485_init()
605 p->em485 = kmalloc(sizeof(struct uart_8250_em485), GFP_ATOMIC); in serial8250_em485_init()
606 if (!p->em485) in serial8250_em485_init()
609 hrtimer_init(&p->em485->stop_tx_timer, CLOCK_MONOTONIC, in serial8250_em485_init()
611 hrtimer_init(&p->em485->start_tx_timer, CLOCK_MONOTONIC, in serial8250_em485_init()
613 p->em485->stop_tx_timer.function = &serial8250_em485_handle_stop_tx; in serial8250_em485_init()
614 p->em485->start_tx_timer.function = &serial8250_em485_handle_start_tx; in serial8250_em485_init()
615 p->em485->port = p; in serial8250_em485_init()
616 p->em485->active_timer = NULL; in serial8250_em485_init()
617 p->em485->tx_stopped = true; in serial8250_em485_init()
620 if (p->em485->tx_stopped) in serial8250_em485_init()
641 if (!p->em485) in serial8250_em485_destroy()
644 hrtimer_cancel(&p->em485->start_tx_timer); in serial8250_em485_destroy()
645 hrtimer_cancel(&p->em485->stop_tx_timer); in serial8250_em485_destroy()
647 kfree(p->em485); in serial8250_em485_destroy()
648 p->em485 = NULL; in serial8250_em485_destroy()
1463 struct uart_8250_em485 *em485 = container_of(t, struct uart_8250_em485, in serial8250_em485_handle_stop_tx() local
1465 struct uart_8250_port *p = em485->port; in serial8250_em485_handle_stop_tx()
1470 if (em485->active_timer == &em485->stop_tx_timer) { in serial8250_em485_handle_stop_tx()
1472 em485->active_timer = NULL; in serial8250_em485_handle_stop_tx()
1473 em485->tx_stopped = true; in serial8250_em485_handle_stop_tx()
1488 struct uart_8250_em485 *em485 = p->em485; in __stop_tx_rs485() local
1497 em485->active_timer = &em485->stop_tx_timer; in __stop_tx_rs485()
1498 hrtimer_start(&em485->stop_tx_timer, ns_to_ktime(stop_delay), HRTIMER_MODE_REL); in __stop_tx_rs485()
1501 em485->active_timer = NULL; in __stop_tx_rs485()
1502 em485->tx_stopped = true; in __stop_tx_rs485()
1508 struct uart_8250_em485 *em485 = p->em485; in __stop_tx() local
1510 if (em485) { in __stop_tx()
1617 struct uart_8250_em485 *em485 = up->em485; in start_tx_rs485() local
1628 if (em485->active_timer == &em485->stop_tx_timer) in start_tx_rs485()
1629 hrtimer_try_to_cancel(&em485->stop_tx_timer); in start_tx_rs485()
1631 em485->active_timer = NULL; in start_tx_rs485()
1633 if (em485->tx_stopped) { in start_tx_rs485()
1634 em485->tx_stopped = false; in start_tx_rs485()
1639 em485->active_timer = &em485->start_tx_timer; in start_tx_rs485()
1640 start_hrtimer_ms(&em485->start_tx_timer, in start_tx_rs485()
1651 struct uart_8250_em485 *em485 = container_of(t, struct uart_8250_em485, in serial8250_em485_handle_start_tx() local
1653 struct uart_8250_port *p = em485->port; in serial8250_em485_handle_start_tx()
1657 if (em485->active_timer == &em485->start_tx_timer) { in serial8250_em485_handle_start_tx()
1659 em485->active_timer = NULL; in serial8250_em485_handle_start_tx()
1669 struct uart_8250_em485 *em485 = up->em485; in serial8250_start_tx() local
1676 if (em485) { in serial8250_start_tx()
1677 if ((em485->active_timer == &em485->start_tx_timer) || in serial8250_start_tx()
3384 struct uart_8250_em485 *em485 = up->em485; in serial8250_console_write() local
3409 if (em485) { in serial8250_console_write()
3410 if (em485->tx_stopped) in serial8250_console_write()
3446 if (em485) { in serial8250_console_write()
3448 if (em485->tx_stopped) in serial8250_console_write()