[PATCH] serial: qcom_geni_serial: Setup serial port after Deep sleep

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

 



While exiting deep sleep, serial port loses its configuration
hence it prints garbage characters on console.

Set serial port configuration while resume from deep sleep.

Signed-off-by: Mehul Raninga <quic_mraninga@xxxxxxxxxxx>
---
 drivers/tty/serial/qcom_geni_serial.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
index 8582479f0211..c04b8fec30ba 100644
--- a/drivers/tty/serial/qcom_geni_serial.c
+++ b/drivers/tty/serial/qcom_geni_serial.c
@@ -20,6 +20,7 @@
 #include <linux/serial.h>
 #include <linux/serial_core.h>
 #include <linux/slab.h>
+#include <linux/suspend.h>
 #include <linux/tty.h>
 #include <linux/tty_flip.h>
 #include <dt-bindings/interconnect/qcom,icc.h>
@@ -1737,6 +1738,8 @@ static int qcom_geni_serial_sys_resume(struct device *dev)
 	if (uart_console(uport)) {
 		geni_icc_set_tag(&port->se, QCOM_ICC_TAG_ALWAYS);
 		geni_icc_set_bw(&port->se);
+		if (pm_suspend_via_firmware())
+			qcom_geni_serial_port_setup(uport);
 	}
 	return ret;
 }
-- 
2.17.1




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux