msm_serial_hs_lite: Handle Tx request during System Suspend

A corner case is occuring, that performing un-clock register
access and leading to Kernel Crash

Corner Case:
When system is in suspend state, Tx operation is getting called
from the client driver by a fflush system call.

To overcome this case, added a conditional check in the driver
while Tx operation. If system is in suspend state, return back
immediately.

Signed-off-by: Dilip Kota <c_dkota@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm_serial_hs_lite: Remove kernel panic

Do not use panic() when tx operation timeouts, which
leads to kernel panic causing crash.
Instead of panic which effects the driver stability,
resetting the transmitter will work good and keep
transmitting the data.

Signed-off-by: Dilip Kota <c_dkota@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm_serial_hs: fix unbalanced clock vote during port close

This change fixes the clock voting logic when the port is closed and
prevents the clock votes from going negative. Clocks are voted for when
the port is being closed and the conditional unvote based on the clock
state will always be true if the earlier vote is not downvoted before
this check is done. This change also protects agains erroneous, unbalanced
client votes, leading to instabilities.

Signed-off-by: Naveen Kaje <nkaje@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
tty: serial: msm_serial_hs: Enable/Disable uart irq over clk on/off

Keeping UART IRQ enabled all the time will gate XO shutdown in idle
power collapse. Instead, handle enable/disable of irq within clk on/off
functions. Also, making sure that wakeup irq is enabled before uart irq
is disabled.

Signed-off-by: Girish S Ghongdemath <girishsg@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
tty: serial: Add proper defines

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>