power: pm8921-charger: Add feature to use charger LED

Add a mechanism to configure the power source of
the charger indicator LED anode on the PM8921.
The configuration is specified using platform data.

Change-Id: I9a436f634ddfd5d1822f1fc8beab4936fa8bb61d
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>

Conflicts:
	drivers/power/pm8921-charger.c
power: pm8921-charger: increase hearbeat if battery is low

When the battery percent charge goes low we want to increase the
frequency of state of charge updates. This helps the correction
algorithm ample opportunities to correct the state of charge and
prevent a low voltage shutdown.

Change-Id: Ie846350ee4c1fd70198d28646779b20349134ef7
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>

Conflicts:
	drivers/power/pm8921-charger.c
power: pm8921-charger: round up vddmax adjustments

It was observed that the battery was charged at voltage less than the
max voltage. This was because the vdd max algorithm rounded down the
voltage.

Use voltage rounding up instead.

Change-Id: Ifb5e9c265b8f616e82abbb979ecfac5e6604b25d
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
power: pm8921-charger: remove OV UV irq

Enabling the OverVoltage (OV) and UnderVoltage (UV) interrupts is
causing an interrupt storm. These interrupts are not used by the
charger driver.

Remove them from being registered and enabled.

Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>

Conflicts:

	drivers/power/pm8921-charger.c

Change-Id: Ib4c7b51e7801aaeb29608cb5044dd0369f4a645f
Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>

Conflicts:
	drivers/power/pm8921-charger.c
power: pm8921-charger: fix EOC worker not starting

There are situations when we observe that charging is in progress
but the end of charge (EOC) worker is not running. This leads to
problems like
-never detecting end of charge
-not adjusting vddmax
-not preventing suspend while charging.

The reason is that the bootloader could have started charging already,
causing a fastchg interrupt to not happen. If the fastchg interrupt is
missed the driver will never start EOC worker.

Check the real time status of the fastchg interrupt and if it is fast
charging invoke the handler so that the eoc worker could be
started.

CRs-Fixed: 393301
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
(cherry picked from commit 7f1d97fd69c3afe66577e731105207e5db544ab2)

Change-Id: I1f754c34aeece255dafb1c1b2f07b9124d082bd5
Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>

Conflicts:
	drivers/power/pm8921-charger.c
power: pm8921-charger: distinguish between PMIC 3.0.1 and 3.0

Some workarounds that are required for PMIC die version 3.0
differ slightly for die version 3.0.1.

Fix this by checking the PMIC subversion register to distinguish
between 3.0 and 3.0.1.

CRs-Fixed: 403150
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
(cherry picked from commit 913c55e2706c36132fd42f90c05530b8e55a26ed)

Conflicts:

	drivers/power/pm8921-charger.c

Change-Id: I11155d6180de09e1b9e0137f7943603d44102d07
Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>

Conflicts:
	drivers/power/pm8921-charger.c
power: pm8921-charger: support dc charging while in usb host mode

The current code disables charging when the usb is operating in host
mode. This unnecessarily stops charging from the DC path. The board
layout (the ovp fet and otg path) is assumed to support host mode and
charging from dc path.

Also make the usb driver change the power supply framework's scope
property instead of calling 8921 charger apis directly.

CRs-Fixed: 373365
CRs-Fixed: 368475
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>

Conflicts:

	drivers/power/pm8921-charger.c

Change-Id: I1936f0facf794b8daec6aa1e7d7c5b4cf29ad5d7
Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>

Conflicts:
	drivers/power/pm8921-charger.c
	drivers/usb/otg/msm_otg.c
Fix derp.
Revert "Fix derp."

This reverts commit 35076b2eed5cf04d2539eb4d2d91f8b5b6928040.
Revert "power: pm8921-charger: support dc charging while in usb host mode"

This reverts commit 4dddf04348c94693021f390565ab68e20ab9f137.
ASoc: soc-pcm: Open/close share channel once if it is used by two streams

- During voice and normal recording concurrency case, both voice
and recording streams share the same tx channel. If one stream
already opens the tx channel, another stream will get error when
trying to open the same channel again. If one stream ends and closes
the channel, but another stream will lose the sound if it's still using
it.
- To prevent the above issues, only send SND_SOC_DAPM_STREAM_START event
when capture active count is one. And send SND_SOC_DAPM_STREAM_STOP event
when capture active count is zero.

Change-Id: Ic6dcd5d8d1949c2b96d46915a4399a454075fbb7
CRs-Fixed: 357022
Signed-off-by: Helen Zeng <xiaoyunz@codeaurora.org>
Signed-off-by: Dhivya Subramanian <dthiru@codeaurora.org>
ASoC: msm: Add support for VoLTE feature on msm8960.

-Add changes for VoLTE feature in machine driver
for msm8960.Along with this change VoLTE changes for cpu,
routing, platform and proxy voice driver changes are
required for VoLTE to work.

Change-Id: I3c74548be6327e3e1e8e92bb29567b8313393ed8
Signed-off-by: Venkat Sudhir <vsudhir@codeaurora.org>
Remove unused code.
Porting.
Revert "Porting."

This reverts commit 7c36a844d5ac0fde9d797230f8c488ecf58d869a.
qseecom: Load external elf on Core 0.

MobiCore can only be run on Krait Core 0. QSEECom process is
tied to Core 0 so the SCM call to load an external ELF always
occurs on Core 0. We release the binding to Core 0 once the
SCM call to load the external ELF file is complete.

Change-Id: Ibc82d4f5d86899dc4643afd6d4ed2771678a3d53
Signed-off-by: Ramesh Masavarapu <rameshm@codeaurora.org>
msm: Fix correct topology for qseecom bus scaling.

Currently, bus scaling topology for qseecom is incorrect.
 -Added the correct topology paths for accessing Crypto
  Engine which is controlled by QSEE.
 -Removed setting the clock frequency of DFAB. This is
  done by the bus driver.
 -Removed references to the dfab clock instance defined
  in clocks file.

Signed-off-by: Ramesh Masavarapu <rameshm@codeaurora.org>

Change-Id: I15ac59ae65e246d0c591fccca724f554a19072eb
Signed-off-by: Ramesh Masavarapu <rameshm@codeaurora.org>
Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>
Fix derp. Change toolchain.
Try another driver.
Revert "Try another driver."

This reverts commit de63041c44c62c7d619bd4741edf8064219e50a3.