Reset G2 changes to msm_serial_hs
msm_serial_hs: Add ioctl support for UART Clock on/off request

This change adds support for ioctl implementation in HSUART
driver. UART Client application (e.g. Bluetooth) can make
request for UART Clock on/off using the ioctl mechanism.
UART Clock status also can be queried using this mechanism.

CRs-Fixed: 496245
Change-Id: I9531cf2f9eda487082b9719341c5ad84c15ad5f7
Signed-off-by: Saket Saurabh <ssaurabh@codeaurora.org>
msm_serial_hs: Vote for clocks during tty close

While BT operation is in progress, it's possible for
client functions to explicitly turn off the
UART clocks without notifying TTY layer.  Then when
TTY layer try to access UART, L2 error happened because
of un-clocked registers.  Since there is no clear way
to notify clients to turn on clocks before TTY access
UART driver will implicilty turn on the clocks.

CRs-Fixed: 505225
Change-Id: Ia9958658465a6c0e5af66cd932e8e694cc12b78c
Signed-off-by: Naveen Kaje <nkaje@codeaurora.org>
msm_serial_hs: check clk_state in set_mctrl() and fix unbalanced unvote

commit "msm_serial_hs: Vote for clocks during tty close"
has unbalanced unvote clock during msm_hs_shutdown(). Fix it.
Also, the following case has also unclocked register access problem.

  msm_hs_set_mctrl_locked()
  uart_dtr_rts()
  tty_port_close_start()
  uart_close()
  tty_release()

Because msm_hs_set_mctrl_locked() is called with spinlock,
can't vote for clock. Thus, just skip it if clock is off.

Change-Id: I0f75cb4a0303b6385367f087586765f3e5ff37f7
Signed-off-by: Bongkyu Kim <bongkyu.kim@lge.com>
Signed-off-by: Devin Kim <dojip.kim@lge.com>
msm_serial_hs: fix unbalanced clock vote

commit "msm_serial_hs: check clk_state in set_mctrl() and
fix unbalanced unvote" removed the codes to balance clk_state.
It causes the unbalanced clock vote. So restore this.

Change-Id: I339c135c29bc48294639c0d80ae7a51b7c534af0
Signed-off-by: Devin Kim <dojip.kim@lge.com>
Signed-off-by: shihhao.feng <shihhao.feng@lge.com>
msm_serial_hs: fix unbalanced clock vote during shutdown

If msm_hs_shutdown() is called during MSM_HS_CLK_OFF status,
it causes unbalanced clock vote.
This situation can be occurred if bluesleep already turn off clock.
To fix this, unvote clock first and check clk_state.

Change-Id: I65a5ac421a7e3a04083fe5f5893e2cc930303e54
Signed-off-by: Bongkyu Kim <bongkyu.kim@lge.com>
bluesleep: Remove remnants of LGE_BLUESLEEP

The patching of msm_serial_hs should make the clock workarounds
unnecessary
defconfig: Disable BTlock
Merge remote-tracking branch 'cm/cm-10.2' into HEAD