msm_fb: hdmi: Resolution modes on HDMI

Add a new header file that lists all supported
HDMI resolution modes and the associated timing
information.

Change-Id: I971422ddb97e3b219cc682032eb67212b434daab
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
msm: clock-9625: Add inactivity timer clocks support for BAM

BAM inactivity timers require the inactivity timer clocks to be on.
Add these clocks for driver to use.

Change-Id: Ic9efc171389dcbd14949cba63d2c478d4aab4295
Signed-off-by: Tianyi Gou <tgou@codeaurora.org>
msm: clock-8610: Remove most LPASS clocks

Control of most of the LPASS clocks has been handed
over to the Q6 processor in the LPASS subsystem.
Remove these clocks from the clock-8610 driver.

Change-Id: Ic902b386e69dfb336e6944db02620260c0c7c455
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
msm: clock-8610: Remove GPLL0 configuration code

GPLL0 is to be exclusively controlled by the RPM, and TZ
will eventually setup protection to prevent access to
masters other than the RPM. Remove all code that touches
GPLL0 configuration registers from the clock-8610 driver.

Change-Id: I99c91b27c68a97652a7016587637d9ffd0253c86
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
mmc: sd: Set the card removed if card detect fails

Currently, the card state is not being set as removed, even
when the card is actually removed. We still wait for the
next request to fail and then check the error and set the
card to be removed.

With the new runtime-pm in place, the card device would be
removed on physical removal of card and the corresponding
parent would be suspended as well. Hence, when the queue is
flushed during clean-up, mmc_rpm_hold would be invoked,
which would fail, since the runtime-pm was disabled when the
card device was removed. Thus, it won't resume the card/host/
platform device. The request would continue and since the
controller is in suspended state nasty things would happen.

This patch sets the card as removed during mmc_sd_detect
itself, so that when a clean-up of queue happens during
card removal, it is known that the card has been removed
and the request is errored out there itself.

Change-Id: Id5022f8d7db43750edf137d4293796615b56ae36
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Documentation: Add documentation for the MIPI-BIF framework

Add a documentation file which provides an overview of the
MIPI-BIF hardware interface as well as the API provided in the
Linux kernel for MIPI-BIF communication.

Change-Id: I25d26753d89c069e3cc8c2435401433b24131ce3
Signed-off-by: David Collins <collinsd@codeaurora.org>
msm: camera: remove command ack queue entry from the list.

This change makes sure that the command ack queue is properly
removed from the session's list of command ack queues. This ensures
that there aren't any outdated queues in the list.

Change-Id: I54424a8189fb2477be540cecd8277a6d4df58aa0
Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
msm: Kconfig: select MSM_CPR_REGULATOR for ARCH_MSM8610

Select MSM_CPR_REGULATOR to compile in cpr-regulator
driver for MSM8610.

Change-Id: I45307777d88f4eaacb73bfc5d6bebaf34bee65fa
Signed-off-by: Willie Ruan <wruan@codeaurora.org>
msm: camera: Change CSID interrupt mask

CSID SOT (Start of Transmission) bit is enabled by default. This
causes lot of unnecessary interrupts. Disable CSID SOT mask, disable
DBG_CSID macro so that none of debug interrupts are triggered.
Remove unwanted logs.

Change-Id: Ib23da7d7b972dd61eb4df255d65b2954f953bffd
Signed-off-by: Sreesudhan Ramakrish Ramkumar <srramku@codeaurora.org>
hwmon: qpnp-adc: Use EXPORT_SYMBOL

Remove instances of EXPORT_SYMBOL_GPL from the qpnp-adc driver.
Use EXPORT_SYMBOL instead.

Change-Id: If598d64a7978af8a8c1671fec9b11b6ac81d5517
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
msm: bam_dmux: make rx ring buffer pool size configurable

The recieve ring buffer pool size defaults to 32 buffers, which maintains
a good balance between performance and memory consumption.  The hardware
is capable of supporting larger pools, which could be tuned to
non-standard usecases or new requirements.

Add support for an optional dt property that allows the default size to
be overridden with a target specific size.

Change-Id: Ib73b3836d91cfb6ac0c95d2c1f54a01e26a100a2
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
arm/dt: msm8974: modify bam_dmux entry

In real world usecase testing, occasional minor processing delays in the
receive path have been observed to cause the sender to meet the criteria
for dropping packets much faster than expected.  This causes an undesired
drop in throughput due to required retransmissions.

Override the default receive ring buffer size to a larger value in order
to buffer additional data in this scenario thereby delaying the need for
the sender to drop packets.

Change-Id: Id1db312d90405acb83687c1550ed1f5c1d47c407
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
msm: kgsl: Add a new API to allow sharing of GPU performance counters

Adreno uses programmable performance counters, meaning that while there
are a limited number of physical counters each counter can be programmed
to count a vast number of different measurements (we refer to these as
countables).  This could cause problems if multiple apps want to use
the performance counters, so this API and infrastructure allows the
counters to be safely shared.

The kernel tracks which countable is selected for each of the physical
counters for each counter group (where groups closely match hardware
blocks). If the desired countable is already in use, or there is an
open physical counter, then the process is allowed to use the counter.

The get ioctl reserves the counter and returns the dword offset of the
register associated with that physical counter.  The put ioctl
releases the physical counter.  The query ioctl gets the countables
used for all of the counters in the block - up to 8 values can be
returned.  The read ioctl gets the current hardware value in the counter

Change-Id: Ic0dedbadae1dedadba60f8a3e685e2ce7d84fb33
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
msm: Kconfig: remove dependencies and incorrect defaults for SENSORS_ADSP

The config SENSORS_ADSP can be selected by future targets and has
no particular dependency on 8974 or 8226. The dependency list will
keep increasing as more targets use this config. Its more suitable
to have individual targets select it in their defconfigs instead.
This config does not need to be enabled by default either. This was
introduced in ab00c019bfb7b0af19a4341759b3ac381a168edf as an unwanted
side effect since the actual intention of the change was to remove it
from the Kconfig.

Change-Id: Id613156b61038dd58bbe5336c17d8ab5c76ad987
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
arm/dt: msm8610: Switch to SPM control of PM8110 S2 regulator

Add a qcom,spm-regulator device node for the PMIC PM8110 SMPS 2
regulator which replaces the qcom,qpnp-regulator device node.
The S2 regulator supplies the four A7 processor cores.  Using
an spm-regulator device to control the S2 regulator ensures that
AVS is properly configured when the supply voltage is changed.

Change-Id: I6ef83da3c3f6b08002d1748974d23d60d498cd27
Signed-off-by: David Collins <collinsd@codeaurora.org>
leds: leds-qpnp: correct wled op_fdbck data type

Change op_fdbck attribute in wled from bool to 8-bit int.
LED datasheet shows this variable should be able to select
LED outputs.

CRs-Fixed: 459520
Change-Id: I41c2408ca8c9e04040ac0d45cd6973f1d221264f
Acked-by: Chun Zhang <chunz@qti.qualcomm.com>
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
leds: leds-qpnp: add support for torch mode

"Torch mode" is when the flash led is left on for an
undetermined amount of time.  To accomplish this, secure
PMIC registers must be accessed and programmed.  After
utilizing torch mode, the initial duration timeout
must be re-implemented.

CRs-Fixed: 454787
Change-Id: I061540e6f0a0ccd726dea619a81efda949608cb3
Acked-by: Chun Zhang <chunz@qti.qualcomm.com>
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
arm/dt: msm-pm8941: Update pa_therm node name

Update the pa_therm node names to pa_therm0/pa_therm1.

Change-Id: Idde1d0551b2f19e9e5b85f8811c10a630c95e42f
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
hwmon: qpnp-adc-current: Export calibration api

Currently calibration is performed every 5 minutes. Provide
an option to the clients to request for IADC re-calibration.

Change-Id: Ia66866610e0702dc25d4235608d123b2e0bf8004
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
thermal: qpnp-adc-tm: Fix setting amux properties

Fix using the correct index type while reading the
channel properties from the list.

Change-Id: I86f74d24abf235baa2f5bcde71786f439dfb2594
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>