diag: Add debug prints in error cases

In some error cases, returning error code without printing
any message which makes debugging difficult. Add more
extensive debugging prints in error cases.

Change-Id: I1bc147c4420942ecda953ab512f639f6683e511d
CRs-Fixed: 495436
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
diag: Rate limit few error messages

Some diag error messages are printed with high frequency. This
is causing flooding of kernel logs. Rate limiting these messages
will help reading kernel logs.

Change-Id: Ica7c50cabff494f28de685f47d2cf234badb2e85
CRs-fixed: 511430
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
tty: n_smux: add separate close notifications

When an SMUX port state is closed, the close request is sent to the
remote system.  The port cannot be re-opened until the remote system
acknowledges the close request.  If the client attempts to re-open the
port during this time, then the -EAGAIN error code is returned and the
client must keep retrying to open the port.  An event-driven approach
would be better, but the client does not receive local state
notifications, so this is not possible.

Add local and remote closed notifications so clients can handle the
closing state transitions without using polling.

CRs-Fixed: 510114
Change-Id: I48008804d23dbfd05df0becd4bc1c695e599a835
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
ASoC: wcd9310: Fix DMIC current leakage after disable

Observed after disabling DMIC path, some DMICs observe
power leakage of around 2mA and affecting power numbers.
This happens due to the DMIC clock runs off MCLK. 2 Stage
of Dividers are used to  generate various DMIC Clock Freq.
Since the SW Enable/Disabling is async to MCLK, the Divider
will either hold the last stage 0 or 1.
Manually force the digital mic clock pin to GPIO mode from
functional mode through the TLMM mux option and force the value
of DMIC voltage to 0V. This will avoid any current leakage.

Change-Id: Id2018aee27c4b31b0de8a9094613c1b07fa1112d
CRs-Fixed: 504468
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
freezer: define try_to_freeze_nowarn if CONFIG_FREEZER=n

Fixes build since:
  0e432e6 HACK: ARM: disable sleeping while atomic warning in do_signal

Change-Id: I451217171c6beb55ab4d190e1248ddbc9a2d9516
Signed-off-by: Ben Jones <ben.jones@imgtec.com>
Merge remote-tracking branch 'upstream/cm-10.1' into cm-10.1