Lines Matching refs:em485
542 if (p->em485) in serial8250_em485_init()
545 p->em485 = kmalloc(sizeof(struct uart_8250_em485), GFP_ATOMIC); in serial8250_em485_init()
546 if (!p->em485) in serial8250_em485_init()
549 hrtimer_init(&p->em485->stop_tx_timer, CLOCK_MONOTONIC, in serial8250_em485_init()
551 hrtimer_init(&p->em485->start_tx_timer, CLOCK_MONOTONIC, in serial8250_em485_init()
553 p->em485->stop_tx_timer.function = &serial8250_em485_handle_stop_tx; in serial8250_em485_init()
554 p->em485->start_tx_timer.function = &serial8250_em485_handle_start_tx; in serial8250_em485_init()
555 p->em485->port = p; in serial8250_em485_init()
556 p->em485->active_timer = NULL; in serial8250_em485_init()
557 p->em485->tx_stopped = true; in serial8250_em485_init()
560 if (p->em485->tx_stopped) in serial8250_em485_init()
581 if (!p->em485) in serial8250_em485_destroy()
584 hrtimer_cancel(&p->em485->start_tx_timer); in serial8250_em485_destroy()
585 hrtimer_cancel(&p->em485->stop_tx_timer); in serial8250_em485_destroy()
587 kfree(p->em485); in serial8250_em485_destroy()
588 p->em485 = NULL; in serial8250_em485_destroy()
1414 struct uart_8250_em485 *em485 = container_of(t, struct uart_8250_em485, in serial8250_em485_handle_stop_tx() local
1416 struct uart_8250_port *p = em485->port; in serial8250_em485_handle_stop_tx()
1421 if (em485->active_timer == &em485->stop_tx_timer) { in serial8250_em485_handle_stop_tx()
1423 em485->active_timer = NULL; in serial8250_em485_handle_stop_tx()
1424 em485->tx_stopped = true; in serial8250_em485_handle_stop_tx()
1439 struct uart_8250_em485 *em485 = p->em485; in __stop_tx_rs485() local
1451 em485->active_timer = &em485->stop_tx_timer; in __stop_tx_rs485()
1452 hrtimer_start(&em485->stop_tx_timer, ns_to_ktime(stop_delay), HRTIMER_MODE_REL); in __stop_tx_rs485()
1455 em485->active_timer = NULL; in __stop_tx_rs485()
1456 em485->tx_stopped = true; in __stop_tx_rs485()
1462 struct uart_8250_em485 *em485 = p->em485; in __stop_tx() local
1464 if (em485) { in __stop_tx()
1569 struct uart_8250_em485 *em485 = up->em485; in start_tx_rs485() local
1580 if (em485->active_timer == &em485->stop_tx_timer) in start_tx_rs485()
1581 hrtimer_try_to_cancel(&em485->stop_tx_timer); in start_tx_rs485()
1583 em485->active_timer = NULL; in start_tx_rs485()
1585 if (em485->tx_stopped) { in start_tx_rs485()
1586 em485->tx_stopped = false; in start_tx_rs485()
1591 em485->active_timer = &em485->start_tx_timer; in start_tx_rs485()
1592 start_hrtimer_ms(&em485->start_tx_timer, in start_tx_rs485()
1603 struct uart_8250_em485 *em485 = container_of(t, struct uart_8250_em485, in serial8250_em485_handle_start_tx() local
1605 struct uart_8250_port *p = em485->port; in serial8250_em485_handle_start_tx()
1609 if (em485->active_timer == &em485->start_tx_timer) { in serial8250_em485_handle_start_tx()
1611 em485->active_timer = NULL; in serial8250_em485_handle_start_tx()
1621 struct uart_8250_em485 *em485 = up->em485; in serial8250_start_tx() local
1631 if (em485) { in serial8250_start_tx()
1632 if ((em485->active_timer == &em485->start_tx_timer) || in serial8250_start_tx()
3341 struct uart_8250_em485 *em485 = up->em485; in serial8250_console_write() local
3366 if (em485) { in serial8250_console_write()
3367 if (em485->tx_stopped) in serial8250_console_write()
3403 if (em485) { in serial8250_console_write()
3405 if (em485->tx_stopped) in serial8250_console_write()