Lines Matching defs: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;
1414 struct uart_8250_em485 *em485 = container_of(t, struct uart_8250_em485,
1416 struct uart_8250_port *p = em485->port;
1421 if (em485->active_timer == &em485->stop_tx_timer) {
1423 em485->active_timer = NULL;
1424 em485->tx_stopped = true;
1439 struct uart_8250_em485 *em485 = p->em485;
1451 em485->active_timer = &em485->stop_tx_timer;
1452 hrtimer_start(&em485->stop_tx_timer, ns_to_ktime(stop_delay), HRTIMER_MODE_REL);
1455 em485->active_timer = NULL;
1456 em485->tx_stopped = true;
1462 struct uart_8250_em485 *em485 = p->em485;
1464 if (em485) {
1569 struct uart_8250_em485 *em485 = up->em485;
1573 * em485->active_timer != &em485->stop_tx_timer, it might happen that
1575 * chars is send and em485->active_timer == &em485->stop_tx_timer again.
1578 * em485->active_timer when &em485->stop_tx_timer is armed again.
1580 if (em485->active_timer == &em485->stop_tx_timer)
1581 hrtimer_try_to_cancel(&em485->stop_tx_timer);
1583 em485->active_timer = NULL;
1585 if (em485->tx_stopped) {
1586 em485->tx_stopped = false;
1591 em485->active_timer = &em485->start_tx_timer;
1592 start_hrtimer_ms(&em485->start_tx_timer,
1603 struct uart_8250_em485 *em485 = container_of(t, struct uart_8250_em485,
1605 struct uart_8250_port *p = em485->port;
1609 if (em485->active_timer == &em485->start_tx_timer) {
1611 em485->active_timer = NULL;
1621 struct uart_8250_em485 *em485 = up->em485;
1631 if (em485) {
1632 if ((em485->active_timer == &em485->start_tx_timer) ||
3341 struct uart_8250_em485 *em485 = up->em485;
3366 if (em485) {
3367 if (em485->tx_stopped)
3403 if (em485) {
3405 if (em485->tx_stopped)