/* Optional platform device data for tegra_hsuart driver. */
struct tegra_hsuart_platform_data {
void (*exit_lpm_cb)(struct uart_port *);
+ void (*rx_done_cb)(struct uart_port *);
};
#endif
/* optional callback to exit low power mode */
void (*exit_lpm_cb)(struct uart_port *);
+ /* optional callback to indicate rx is done */
+ void (*rx_done_cb)(struct uart_port *);
};
spin_unlock(&u->lock);
tty_flip_buffer_push(u->state->port.tty);
+
+ if (t->rx_done_cb)
+ t->rx_done_cb(u);
spin_lock(&u->lock);
}
set_rts(t, false);
tegra_dma_dequeue(t->rx_dma);
tty_flip_buffer_push(u->state->port.tty);
+ if (t->rx_done_cb)
+ t->rx_done_cb(u);
/* enqueue the request again */
tegra_start_dma_rx(t);
if (t->rts_active)
spin_unlock_irqrestore(&u->lock, flags);
tty_flip_buffer_push(u->state->port.tty);
+ if (t->rx_done_cb)
+ t->rx_done_cb(u);
spin_lock_irqsave(&u->lock, flags);
}
break;
if (t->use_rx_dma && t->rx_dma) {
tegra_dma_dequeue(t->rx_dma);
tty_flip_buffer_push(u->state->port.tty);
+ if (t->rx_done_cb)
+ t->rx_done_cb(u);
}
return;
u->regshift = 2;
- if (pdata)
+ if (pdata) {
t->exit_lpm_cb = pdata->exit_lpm_cb;
+ t->rx_done_cb = pdata->rx_done_cb;
+ }
t->clk = clk_get(&pdev->dev, NULL);
if (!t->clk) {