[PATCH v1 09/19] hid-ft260: uart: wakeup device early to not lose rx data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Waking up the ft260 device from power saving mode earlier reduces the
probability of incoming data loss.

Signed-off-by: Michael Zaidman <michael.zaidman@xxxxxxxxx>
---
 drivers/hid/hid-ft260.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/hid/hid-ft260.c b/drivers/hid/hid-ft260.c
index ccd20f590720..6266e4f1100d 100644
--- a/drivers/hid/hid-ft260.c
+++ b/drivers/hid/hid-ft260.c
@@ -1285,8 +1285,6 @@ static int ft260_uart_change_speed(struct ft260_device *port,
 	bool wakeup_workaraund = false;
 	int ret;
 
-	ft260_uart_wakeup(port);
-
 	memset(&req, 0, sizeof(req));
 
 	req.report = FT260_SYSTEM_SETTINGS;
@@ -1529,6 +1527,9 @@ static int ft260_uart_activate(struct tty_port *tport, struct tty_struct *tty)
 	ft260_uart_change_speed(port, &tty->termios, NULL);
 	clear_bit(TTY_IO_ERROR, &tty->flags);
 
+	/* Wake up the chip as early as possible to not miss incoming data */
+	ft260_uart_wakeup(port);
+
 	if (port->reschedule_work) {
 		mod_timer(&port->wakeup_timer, jiffies +
 			  msecs_to_jiffies(FT260_WAKEUP_NEEDED_AFTER_MS));
-- 
2.40.1





[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux