usb: msm_gadget: Reset PHY before enabling pull-up

PHY is getting stuck during multiple times of function enable/disable.
Workaround this by resetting PHY before enabling pull-up.

Change-Id: Iea25c791e3f417013adfcb6f2a405bf469d69130
CRs-fixed: 247728
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
msm: audio: 7k: Reset the state during AUDIO_START only when disabled

Before sending enable command to DSP decoder the dec_state variable is
set to none state. The dec_state is set to success state on receiving
decoder enable event from DSP

This is being done even if AUDIO_START ioctl is called multiple times
when decoder is already in enabled state. In this case, the dec_state is
not set to success state as enable command is not sent to DSP again and
there will not be any decoder enable event from DSP. This will set the
decoder state variable to wrong state even when decoder is in enabled
state and will result in AUDIO_START failure

Hence moving the dec_state variable to none state during AUDIO_START
only if decoder is in disabled state

Change-Id: I0c14c56553995d7557f7b3426d479b672e5e9ed0
Signed-off-by: Sriranjan Srikantam <cssrika@codeaurora.org>
Signed-off-by: Vasantha Kumar <vasant@codeaurora.org>
msm: audio: 7k: Add timeout for read call of voicememo driver

Any unexpected events such as sdcard removal can delay the reading of
recorded packets and results in running out of frame buffers on modem
side and stops recording. But read calls of application gets blocked for
such unknown or abrupt errors

Add timeout of two seconds for read call in voicememo driver to avoid
application getting blocked on driver read calls in any error cases
which can result in improper application behavior

Change-Id: I91b4283a266370c615299d508c9aa5386a98df44
CRs-Fixed: 246263
Signed-off-by: Sriranjan Srikantam <cssrika@codeaurora.org>
Signed-off-by: Vasantha Kumar <vasant@codeaurora.org>
msm: 7x27: Fix msm_arch_idle() to preserve the state of I,A & F

msm_arch_idle() explicitly disables Aborts and Fiqs alone. This
can cause a state mismatch if the caller already has one of
these flags disabled because msm_arch_idle() enables them on
exiting which is incorrect. Make sure that we save the entire
state in CPSR and restore it correctly when exiting the function.

We additionally explicitly disable 'A', 'I' and 'F' so that we
don't take them within msm_arch_idle().

Change-Id: I3f6a29b884340f2512fe18f5c9105e56035e122e
CRs-fixed: 253782
Signed-off-by: Naveen Ramaraj <nramaraj@codeaurora.org>
msm: smd: remove setting of low_latency flag in smd_tty driver

The tty_struct's low_latency flag should not be set while used
in atomic context, which is linux tty driver requirement.
As it is being used in tasklet context, remove setting of
low_latency flag.

Change-Id: I779de80712ce448b16c81c6b9573c85782b6689c
CRs-fixed: 247815
Signed-off-by: Niranjana Vishwanathapura <nvishwan@codeaurora.org>
Signed-off-by: Sireesha <c_schadi@quicinc.com>