msm: cpr: Turn on messages on fuse value

The fuse values are needed for debug purposes so turn
them on. The default verbosity level kept in the driver
since keeping it at highest, fills up the kernel log
suppresing other useful information.

Acked-by: Gopi Krishna Nedanuri <gnedanur@qti.qualcomm.com>
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
Signed-off-by: Gopal Goberu <ggober@codeaurora.org>
(cherry picked from commit b8c7986c424567ce618e62ee985d78e0d5464015)

Change-Id: I103d8f22b2e347cdd2df3c7bac572cc49dfbde7d
Signed-off-by: Gopal Goberu <ggober@codeaurora.org>
msm: msm-batt: report fake usb disconnection when cur_volt < batt_min

Android doesn't initiate graceful shutdown if USB connected even
if battery voltage is less than minimum operating voltage. To work
around this behavior, let the battery module report fake usb
disconnection when voltage is very low.

CRs-Fixed: 410647
Signed-off-by: Krishna Vanka <kvanka@codeaurora.org>
(cherry picked from commit 743c16f2ce5670fb03e1b77706292bb24360e9b9)

Change-Id: I5b1c03ff65403681ffe11d2d19457fddc274bb9c
Signed-off-by: Gopal Goberu <ggober@codeaurora.org>
msm_serial_hs : handle uart_flush_buffer

Serial core allocates circular buffer for uart tx transfer.
Circular buffer head and tail is updated in serial core and
circular buffer tail is updated in uart driver.While uart
transfer is happening, uart client bluetooth hci_ldisc,calls
uart_flush_buffer in serial core and sets circular buffer
head and tail to zero.As uart driver does not know when
uart_flush_buffer is called in serial core by uart client,it
updates circular buffer tail for the previous ADM Tx completion.
This leads to queueing Tx command to ADM although no data is
there in circular buffer.Because of this,uart client is not
functional.

Hence adding msm_hs_flush_buffer api which notifies to uart driver
that uart_flush_buffer is called in serial core by uart client and
set tty_flush_receive flag to true.In uart interrupt handler ,do
not update circular buffer tail if uart_flush_buffer is already
called in serial core by uart client else update circular buffer
tail on ADM Tx completion.

CRs-Fixed: 419054
Signed-off-by: Saket Saurabh <ssaurabh@codeaurora.org>
(cherry picked from commit ce39410ad3db5b9fb446bf5da126585d58fa872a)

Change-Id: I6ae2d11ed1c93e8c606c5789c1a57f4c9aa0ef73
Signed-off-by: Gopal Goberu <ggober@codeaurora.org>
USB: f_rmnet_smd: Process rmnet_disable on usb disconnect, if smd_open fail

If smd_open fails during USB connect and when "adb root" command is
executed, USB gets disconnected, and since the online flag is 0,
the disconnect process will not be carried out and the platform driver
is not unregistered. On USB connect, as the the_pdrv_used flag is reset
to 0, we endup in registering the platform_driver multiple times because
of which crashes are observed.

Hence, in rmnet_disable() function, don't check for the online flag, so
that the disconnect work will get processed during USB disconnect and
platform driver unregister is carried out.

CRs-Fixed: 414886
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
(cherry picked from commit 28930dc7bebbec841fbff380082067d596f15b22)

Signed-off-by: Gopal Goberu <ggober@codeaurora.org>
(cherry picked from commit 0c5a9cd2879d35f0d8c801e1670a5ae736e3bfa8)

Change-Id: Ic58c205ac8496028c8471a0b884a2082d42ab446
Signed-off-by: Gopal Goberu <ggober@codeaurora.org>
msm: mdm: Fix error value for SHUTDOWN_CHARM ioctl

SHUTDOWN_CHARM should write the error value to the parameter
passed, but in this case as no error value is updated.

CRs-Fixed: 424291
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Signed-off-by: Gopal Goberu <ggober@codeaurora.org>
(cherry picked from commit 1a3ae87c0539d8f2723c3f3a919cffc074568788)

Change-Id: I49e31db96e063f6a1a2cbdd5600138ac15ba2dff
Signed-off-by: Gopal Goberu <ggober@codeaurora.org>
msm: qrd7627a: Add support for the 7x27A TSTS device

Support has been added for 7x27A TSTS Device

Change-Id: I85edcbd7b054cb5e60ff18614045bcb9fba8f29f
Signed-off-by: Aparna Mallavarapu <aparnam@codeaurora.org>
msm_fb: Avoid memset of frame buffer during early suspend

At present, we have backlight disabled before frame buffer
early suspend and there is mechanism in place to enable backlight
only after first frame update after display resume. This makes sure
to avoid panel specific artifacts being visible. Hence,
remove memset of frame buffer during suspend. This change
reduces latencies during frame buffer's early suspend.

Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
(cherry picked from commit 96ebb53ba08a96c03c89349bc1110175b85cb8be)

Change-Id: I037552e6cb01e33f738b5f3062550d8c6f9f2e6b
Signed-off-by: Gopal Goberu <ggober@codeaurora.org>
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
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
(cherry picked from commit 8c13d2615b1c608f941137166efb649353cc0bdb)

Signed-off-by: Gopal Goberu <ggober@codeaurora.org>
(cherry picked from commit 8a17f54f8d9e267b03b41df59bf210d56e16064a)

Change-Id: I641738dbe90bb3fb162d1c07d19ef587c071dd61
Signed-off-by: Gopal Goberu <ggober@codeaurora.org>
adiag: Add new entry in message mask table

DIAG driver maintains a table of F3 masks. This table
has to be in sync with modem mask information. Modem
updates are not synchronized with Linux code updates.
Hence, sometimes modem and Linux go out of sync. This
results in missing F3 messages.

Adding this entry will resolve the dependency of manual
syncing and will make mask updates dynamic.

(cherry picked from commit 26dffb8ab37d1741756d80bccb7d6283364ad4be)

(cherry picked from commit 5f9399a5068d1cf6770ca1b3023411cfc4c00978)

Change-Id: I28b0db5c681a026b719c2887b7d8f9bb1e8b8b16
CRs-Fixed: 388505
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
Signed-off-by: Gopal Goberu <ggober@codeaurora.org>
board-msm7627a: Enable display regulators/GPIOs during bootup

During boot up, enable display regulators/GPIOs properly to make
sure that display comes up fine. Also, add support for backlight
control using PWM approach by default on TSTS hardware.

CRs-fixed: 441972
Change-Id: I44ca096a4a0f7f162659c5a07410ad5808814b5f
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm_fb: Avoid multiple disable calls for vsync interrupt

For LCDC and DSI Video mode panels, there seem to be multiple
disable calls for Vsync interrupt term. Change to avoid this
issue by proper synchronization of vsync term and DMA term.

Change-Id: Iaf11ba92cc7db55c6196add2d7dea581cb29fc8a
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm_fb: Handle histogram IRQ cleanly during suspend/resume

Currently, if the histogram disable IOCTL comes after panel
is turned off, we early return the IOCTL causing the interrupt
to be left enabled. This causes IPC issues during suspend. Fix
this issue by properly enabling/disabling the histogram interrupt
during suspend/resume scenario.

Change-Id: I4d38776a43ea854aff3c10c8d9d5450af1d98c91
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm: audio: qdsp5: Allow postprocessing only from acdb if present

Audio postprocessing(audio pp) features enabled via acdb (Audio calibration
database) driver gets disabled by audio postprocessing driver during
open.
Fix this by allowing legacy audio pp feature enable from postprocessing
driver only if acdb support is not available. Acdb driver maintains wrong
state due to improper update of stream id which is used to maintain
number of active sessions. Due to this postprocessing features are
enabled even before audpp task is enabled in adsp.

(cherry picked from commit 4fa5ab02c63ad219008701f90d589f40fbdf5045)

(cherry picked from commit 7f0b7ca8b2547cbff30c0b2608b5a35119c04587)

Change-Id: I721ca851c82ed2ad1f14f16471d2cadc0ebc718a
CRs-Fixed: 409488
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
qdsp5: audio: Allow audio preprocessing only from acdb driver

audio pp(preprocessing) features enabled via acdb (Audio calibration
database) driver gets disabled by audio pcm encoder driver if audio
record enable acknowledgement comes after applying pp parameter
via acdb.

Fix this by allowing audio pp enable from pcm driver only
if acdb support is not available.

(cherry picked from commit 62093d7d23fd0c130699f3bc0f455f5b48e54ab7)

(cherry picked from commit ec8c00fe5dfb4d1464979381b843a349bc9def54)

(cherry picked from commit dc66a0f5d0b27d4b945f9a389c274aeac25f86a0)

Change-Id: Id42e22f21886e9b5ed22f4489f20fd7eaf1d3e52
CRs-Fixed: 436891
Signed-off-by: Manish Dewangan <manish@codeaurora.org>
USB: msm72k_udc: Disable all usb interrupts & acknowledge them

USB OTG and UDC driver share the same interrupt line. UDC driver free
the IRQ as part of cable disconnect processing. A spurious device specific
interrupts (USBSTS) occur and is ignored by OTG driver.
This is leading to "irq nobody cared" warning as USB interrupt is disabled.

Disable and acknowledge all device specific interrupts in UDC driver before
freeing the IRQ.

(cherry picked from commit 47242eb214f7f4cc2dac171dbef4a3db8c9e6457)

Change-Id: I49caf872ec308154b2d78b43b19595b973a93b17
CRs-Fixed: 437553
Signed-off-by: Chiranjeevi Velempati <cvelempa@codeaurora.org>
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>