msm_fb: Update backlight level on resume after first pan display

Use shared workqueue to delay the update of backlight after
a first valid frame is displayed on the panel. This avoids any
transients being displayed during resume.

CRs-fixed: 361002
Change-Id: Ia2c2e39aae62e9ddfebe3a26fb4dbc969d0892c2
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
(cherry picked from commit 8c13d2615b1c608f941137166efb649353cc0bdb)

Conflicts:

	drivers/video/msm/msm_fb.c
msm_serial_hs_lite: Write NCF when initializing the console

The console TX path does not write NCF until after TX_READY
is asserted, meaning that the wait_for_xmitr path could be
polling on a ready bit dictated by the last NCF value set
by the bootloader.

Change-Id: I6d7c9c2610e67d5d84dd2e9b84ee29f94ba4d180
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
msm_serial_hs_lite: Use existing uartclk variable for setting clock rate

Currently uartclk rate is hard coded as 7327800 and configured wherever
it is required to get requested baud rate till 460800 bps. To support
higher baud rate above 460800 bps, start using uartclk variable of
uart_port structure which would be having last used uartclk rate value.
Uartclk would be set as ( 16 * required baud rate ) for higher baud rate.
This change doesn't add support for higher baud rate than 460800 bps.

Also do print message cleanup.

Change-Id: Ie3aacf4d334c58d4602f0e412224ca8b4b64d4e7
Signed-off-by: Mayank Rana <mrana@codeaurora.org>

Conflicts:

	drivers/tty/serial/msm_serial_hs_lite.c
msm: usbaudio: Add support for USB headset detection

 - During bootup, create a file system storing the
   information about usb device state and name, and
   broadcast the message to userspace whenever the
   device is plugged or unplugged.

 - Register the device at USB sound card initialization
   for creating file system and toggle the state in that
   filesystem when USB is plugged/unplugged. This will
   also send a message to user space informing it about
   state change.

Change-Id: Icd78273bb765a26bbc70725afebe8955de8f7315
Signed-off-by: Harmandeep Singh <hsingh@codeaurora.org>
msm: usbaudio: Fix memory allocation for USB audio module init

Fix memory allocation issue in snd_usb_audio_init()
use sizeof(struct) insead of sizeof(pointer)

Change-Id: I270bbd7111e97dd4e0e92378f61d5025e16f5fca
Signed-off-by: Alex Fradkin <afradkin@codeaurora.org>
qseecom: Fix kernel panic

When qseecom_unload_app() is invoked, wait_event_freezable() is called
in an atomic context (within a spinlock).  wait_event_freezable() allows
sleep and should not  be called in an atomic context where sleep is not
allowed.

Change-Id: I8c9c6d28f9e492fbbf2ac74a5ee3d1067c7733ad
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>

Conflicts:

	drivers/misc/qseecom.c
qseecom:  Fix failure to release qseecom handle

qseecom_release() returns a failure, if it is unable to find
app_id of zero, associated with the handle in the app list.

There exists scenarios where the handle may not have the
app_id initialized and remain to be 0.  In these scenarios,
once the uninitialized zero app_id is not found in the list,
it returns a failure.

Fix to this is look for non-zero valid app_id in the app_list when
releasing the handle.

Change-Id: I7b6489526da57cd2106f4aae9fdc0547e7a5fe86
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>