Lines Matching refs:em485

542 	if (p->em485)
545 p->em485 = kmalloc(sizeof(struct uart_8250_em485), GFP_ATOMIC);
546 if (!p->em485)
549 hrtimer_init(&p->em485->stop_tx_timer, CLOCK_MONOTONIC,
551 hrtimer_init(&p->em485->start_tx_timer, CLOCK_MONOTONIC,
553 p->em485->stop_tx_timer.function = &serial8250_em485_handle_stop_tx;
554 p->em485->start_tx_timer.function = &serial8250_em485_handle_start_tx;
555 p->em485->port = p;
556 p->em485->active_timer = NULL;
557 p->em485->tx_stopped = true;
560 if (p->em485->tx_stopped)
581 if (!p->em485)
584 hrtimer_cancel(&p->em485->start_tx_timer);
585 hrtimer_cancel(&p->em485->stop_tx_timer);
587 kfree(p->em485);
588 p->em485 = NULL;
1421 struct uart_8250_em485 *em485 = container_of(t, struct uart_8250_em485,
1423 struct uart_8250_port *p = em485->port;
1428 if (em485->active_timer == &em485->stop_tx_timer) {
1430 em485->active_timer = NULL;
1431 em485->tx_stopped = true;
1446 struct uart_8250_em485 *em485 = p->em485;
1458 em485->active_timer = &em485->stop_tx_timer;
1459 hrtimer_start(&em485->stop_tx_timer, ns_to_ktime(stop_delay), HRTIMER_MODE_REL);
1462 em485->active_timer = NULL;
1463 em485->tx_stopped = true;
1469 struct uart_8250_em485 *em485 = p->em485;
1471 if (em485) {
1576 struct uart_8250_em485 *em485 = up->em485;
1580 * em485->active_timer != &em485->stop_tx_timer, it might happen that
1582 * chars is send and em485->active_timer == &em485->stop_tx_timer again.
1585 * em485->active_timer when &em485->stop_tx_timer is armed again.
1587 if (em485->active_timer == &em485->stop_tx_timer)
1588 hrtimer_try_to_cancel(&em485->stop_tx_timer);
1590 em485->active_timer = NULL;
1592 if (em485->tx_stopped) {
1593 em485->tx_stopped = false;
1598 em485->active_timer = &em485->start_tx_timer;
1599 start_hrtimer_ms(&em485->start_tx_timer,
1610 struct uart_8250_em485 *em485 = container_of(t, struct uart_8250_em485,
1612 struct uart_8250_port *p = em485->port;
1616 if (em485->active_timer == &em485->start_tx_timer) {
1618 em485->active_timer = NULL;
1628 struct uart_8250_em485 *em485 = up->em485;
1638 if (em485) {
1639 if ((em485->active_timer == &em485->start_tx_timer) ||
3344 struct uart_8250_em485 *em485 = up->em485;
3369 if (em485) {
3370 if (em485->tx_stopped)
3406 if (em485) {
3408 if (em485->tx_stopped)