msm: kgsl: Lower bounds check the number of power levels

A misconfigured board file could cause an out-of-bounds
array access through this value.

Change-Id: I64bbad0c096a2efe65376991537d810141370d72
CRs-Fixed: 439230
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
msm_fb: hdmi: Check for stale HDCP variables

Check for stale HDCP variables like An from previous authentication
failure. In case of stale data, wait for some time to make sure HDCP
has has fresh data.

Change-Id: I37685a0246f3b60c383e3bf8d024c2b13fb3e5f6
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
input: synaptics_i2c_rmi4: Add low power mode

Enable regulators to go into low power mode when
device enters suspend, to save power.  In resume,
return regulators to full power.

Change-Id: I6f5a6d398732b2e23aeba81b3569ae2c081f31e5
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
input: synaptics_i2c_rmi4: allocate memory for interrupt status

In synaptics_rmi4_i2c_read, intr_status is a char variant.  So
if num_of_intr_regs > 1, then intr_status will write 2 bytes.  This
will destroy the stack, so avoid it.

Change-Id: I5c16e491a84d3f8dd96a11810c060944a457b99a
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
input: synaptics_fw_update: Add firmware ID reading

- Fix issue of converting config id
- Support "Option 1 (bit0)" in image file header
  -- Query firmware build id from image file header

Change-Id: Iabd24d662762b67de7163ad7321f95f1c58f1459
Git-commit: 7e811dcd8eaf3fc0df765335d0ef14926f325f64
Git-repo: git://github.com/synaptics-touch/synaptics-dsx-i2c.git
[amaloche@codeaurora.org: only portion of patch taken.
 Custom changes were necessary to add for integration
 with mainline]
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
input: synaptics_fw_update: Add force update entry

Add sysfs entry option to force update firmware, regardless
of versioning.

Change-Id: I85a12c531ee3d64a74da272b6e73b514eafc136a
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
msm: msm_bus: Correct the return value from register-client

On failure, return 0, and not a non-zero value as that can
be interpreted as a valid client ID.

CRs-Fixed: 486328
Change-Id: I7a5b448bc398b4a4792170147a5e5317d25f8b3c
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
input: synaptics_i2c_rmi4: Properly enter low power mode

When entering low power mode, i2c pull up regulator
must be set with LPM current, not active current.

Change-Id: Idc87cd57b8a4f75b665d3045123176b158b16691
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
msm: camera: Add state check for sensor power up & down

Sensor state check added to avoid incorrect power up &
power down calls.

Change-Id: I278e8be1e346f93fa410b38086388f08c4f6ae31
Signed-off-by: Aditya Jonnalagadda <ajonnala@codeaurora.org>
arm: board-8930: Add synaptics firmware name in platform data

Add synaptics firmware name in platform data

Change-Id: I011144acc82f4fca25b9d40e05a3850117001230
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
ALSA: PCM: volume API implementation

Introduced a new helper function snd_pcm_add_volume_ctls() to
create control elements representing the volume for each PCM
(sub)stream.

Change-Id: Id483257c4fe84a909e7a4af3a5aa3e4f0d5d9ea5
Signed-off-by: Damir Didjusto <damird@codeaurora.org>
ASoC: msm: Add PCM loopback volume control

Add PCM loopback volume controls.

Change-Id: I4d942c16b524797ca535dd0467a830d19963e967
Signed-off-by: Damir Didjusto <damird@codeaurora.org>
msm: display: Proper handling of prepare and unprepare clocks

This change handles prepare and unprepare clocks properly to
fix clock mismatches.

Change-Id: I09986aa1f0e1a5be2e07655a1db0d23760dd0725
Signed-off-by: Sangani Suryanarayana Raju <csuryan@codeaurora.org>
msm_serial_hs: Use RFR GPIO to communicate remote uart

CTS and RFR GPIOs are used for hardware flow control between
two uarts. RFR GPIO provides current status of uart receiver
to remote uart and based on this remote uart sends data.
Hence use this functionality to prevent remote uart to send
data when port is being opened, baud rate change operation
is in progress and port is being closed.

This change also set UART_DM_MR2 (Bit: 8 and 9) before
configuring connected UART GPIOs to prevent RX_BREAK character
and any character having PARTIY or FRAMING error which can be
generated due to configuration of those GPIOs. Allows those
character once port is opened successfuly.

This change also zeroed uart rx software buffer which would
help to see how many bytes copied by ADM from received data
with UART RX FIFO to this memory. This would be useful if
there is any Rx Stall issue is seen.

CRs-Fixed: 495564
Change-Id: I69382994356073c4c86f205015503c935ad09e8d
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
msm: camera: Optimize the live snapshot state machine

Send the ack for live snapshot done event once its
completed instead of waiting for stop request from
user. This helps in saving a wait time which could
be upto 2 frame time in worst case

Change-Id: Ibbef211512e4b9f06ff6b8d3ca52d1dc591c0b46
Signed-off-by: Nishant Pandit <npandit@codeaurora.org>
leds: pm8xxx: Enable PWM LPG banks based on max current

The current design enables PWM LPG high bank with out
checking the max current. So enable PWM LPG low bank when max
current configured as 4mA and enable PWM LPG high bank when
the max current configured as 8mA. Enabled both PWM LPG low bank
and PWM LPG high bank when max current configure as 12mA.

CRs-Fixed: 486318
Change-Id: I6686ed85d78fa55f08491a47c10581407e0cd70e
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
msm: vidc: Handle mgen2maxi interrupt in video driver

Handle interrupt generated by mgen2maxi h/w and
avoid unknown interrupts storm which results in
target reset issues.

Change-Id: Ida24cb2dde15c9cd4a4c1d9ca336b1a4b662c4d1
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
media: dvb: Fix error handling of SDMX API failures

When setting of key-ladder index fails, there's no need
to fail starting of the filter since it could only mean
that decryption might fail if encrypted packets are encountered.

In addition, if closing SDMX session fails, SDMX TZ application
might be removed anyhow, therefore we should clear reference
counting of SDMX session so that it is re-opened if requested
in the future.

Change-Id: I17e1ce62b72910e2086d948807af969725c6f18b
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
msm: camera: Added the NULL pointer check

Added the NULL pointer check for isp_config
to avoid the crashes

Change-Id: I2df7eeb5c633b04c3aac5d985cf50c2ece7f1076
CRs-Fixed: 495652
Signed-off-by: manish gotefode <mgote@codeaurora.org>
tty: smux_ctl: Add new SMUX port Support

smux_ctl exposes only one control port to userspace. Enabling of dual
PDN support requires two SMUX ports.

Add new SMUX control port to enable dual PDN support.

CRs-Fixed: 497343
Change-Id: I2a1d48f1e5d2acd1f67d7673d325c4360b783cf4
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>