staging: android: Fix two checkpatch issues in binder.c

This fixes two instances of
"static const char * array should probably be static const char * const"

I have seen other commits doing this in other files, so I am
assuming it should be done here as well.

Please tell me if this is wrong :)

Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: android: Avoid using camelcase in binder.h

This changes the following:

1: BinderDriverReturnProtocol -> binder_driver_return_protocol
2: BinderDriverCommandProtocol -> binder_driver_return_protocol

These enums are not currently used, but still generate noise in checkpatch.

Well, did. They don't now :)

Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: android: Add some Kconfig help entries

This commit adds Kconfig entries for the following:

	1: ANDROID_BINDER_IPC
	2: ASHMEM (additional text)
	3: ANDROID_LOGGER

It also changes "Register" to "Registers" in
ANDROID_LOW_MEMORY_KILLER

Finally, all "help" instances are changed to "---help---",
as recommended by kconfig-language.txt in order to visually
aid developers.

Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
msm: cpufreq: make the gov stop part fully atomic

In the function cpufreq_governor_dbs, the case CPUFREQ_GOV_STOP
is not completely atomic. The removal of sysfs is outside the
critical path. If a START/STOP done frequently from user space
then there is chance of adding the sysfs interface before removal.
This creates a warning from sysfs saying creating an already
existing entry.

Also once it fails to create, cpufreq_governor_dbs returns with
error code. The dbs_enable value is incremented which is not
rolled back and cpufreq core tries to set the old
governor. This might create further problems.

Hence the removal of sysfs entry should happen in the critical
path.

CRs-fixed: 440969
Change-Id: I98891756caf2ce0b85e39e9b4f58034af1ed97ce
Signed-off-by: Venkat Devarasetty <vdevaras@codeaurora.org>
ASoC: msm: Add support for 4-pole extension cable.

- Add the support to report lineout device when inserted plug
  has high impedance on microphone line.
- This feature is enabled only with gpio headset detection.

Signed-off-by: Ravi Kumar Alamanda <ralama@codeaurora.org>
(cherry picked from commit 07b6bd6a9a1e431a86efa76b14030d882ee7771b)
(cherry picked from commit 39c0e134f67fcab824f1457a256c4fbf2525c347)

Change-Id: I6d4e3f147433ee9c0cc313118b540fee0b90f45f
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
ASoC: WCD9310: Defer the setup of headphone removal detection.

After the inserted accessory is detected as a valid headphone,
polling is performed on the microphone to correct the accessory
detection in case it was wrongly identified as a headphone.

It was observed that at the end of polling, headphone removal
interrupt was fired, causing headphone playback to stop. Fixed
by deferring the headphone removal setup until either polling is
complete or polling detects a removal

CRs-fixed: 384967
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
(cherry picked from commit afc86431f330ee51f7980b620bef75935422c764)
(cherry picked from commit f87a8b2658964249917c815719d15abedd03771e)

Change-Id: Ic2c04aa300fc029957c71294e153aef479967b84
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
ASoC: wcd9310: reduce mbhc button release GPIO debounce time.

Current GPIO debounce time is too long so it delays next button
press detection.  Reduce this debounce time so driver can detect
next button press and release quickly.
Typically mic voltage ramps up within few milliseconds after button
release so 50ms is long enough.

Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
(cherry picked from commit db606b0a39452c90e26692c22300c390f5822f29)
(cherry picked from commit 96e92e0a22a0c54f9cfda447d346c1a2dd9f4639)

Change-Id: Ibf0aa4d4c07fab9cd50021cb0e256ee23b320059
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
ASoC: wcd9310: Turn on EAR DAC and PA at the same time.

Turn on EAR DAC and EAR PA at the same time to avoid pop
at start of playback.

CRs-Fixed: 386288
Signed-off-by: Damir Didjusto <damird@codeaurora.org>
(cherry picked from commit 7c85d71830e1781c113cf1d69234169e8feb31c9)
(cherry picked from commit deb584f6a8788dcda97a9d83038103ebd2576771)

Change-Id: Ib50f6a488fe93595423bae30164073cc25b90076
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
ASoC: wcd9310: Enhance OCP reporting logic.

CODEC has over current protection(OCP) finite state
machine for both left and right headphone while CODEC
driver tries to delay reporting of OCP event after
CODEC reporting OCP two times. Current CODEC driver
implementation results in unlocking one of headphone
power amplifier when OCP reported on both headphone.
Change the behavior to report OCP event for a give
headphone immediately if OCP already occurs on opposite
headphone.

CRs-fixed: 339620
Signed-off-by: Patrick Lai <plai@codeaurora.org>
(cherry picked from commit c2d833d524c1230c72f2d078b543baba7a8db26f)
(cherry picked from commit 6b8cacf2d5ed669048c3813b56851c10fe5c5af1)

Change-Id: Iea28c8baa1a6372dcb4c0214ec0e74bfc483f563
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
ASoC: wcd9310: Fix NULL pointer dereference.

If sound card is not yet initialized the platform device's private data
is not set either.  Check if private data is NULL before use it.

CRs-fixed: 400055
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
(cherry picked from commit d6e48bd07516ecc683a995ebf8eedf080f14016d)
(cherry picked from commit 87ba6ce49d4f50ad089702135e84ecad5446bfad)

Change-Id: I94e45366d8f316ea8e69def48cc926cdd971f5a6
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
ASoC: wcd9310: Resend edge triggered GPIO IRQ

If MBHC GPIO IRQ for mechanical headset detection asserted while power
management's suspend call chain is being called, wcd9xxx_lock_sleep will
fail to wait for system's resume since power management interface has
to finish suspend in order to resume system.
In this case, interrupt cannot be handled as codec driver cannot
guarantee if underlying bus is awake.
Wake up system and resend the IRQ for this situation.

(cherry picked from commit ecf379cd17b7fe94e6f0df0598a472b6f1828ad5)
(cherry picked from commit bdda99b93915d217150f5484f9c718c905703f1e)
CRs-fixed: 404167
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>

Change-Id: Id5970b359b80e0cd1f701b30c61ade23e0f67b9e
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
ASoC: wcd9310: Update wcd9310 compander configuration

Update the Compander register settings to remain the default
settings after the system bootup and optimize compander
configuration sequence.

Change-Id: Ib475f3bb84414546b4ead1d3f013dc173317e1b3
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>

Conflicts:

	sound/soc/codecs/wcd9310.c

Signed-off-by: Seongmin Park <r_data@naver.com>
ASoC: wcd9310: Correct the mixer controls for Compander switches

- Compander1 never gets enabled though the user space sets the
  corresponding mixer control.
- Compander switch kcontrols are configured wrongly as integer
  type with max value as 0.
- Correct kcontrol creation to fix the issue.

CRs-Fixed: 441091

Change-Id: Iad99b44c9226da3bcc1132e61ea989a0543ae56e
Signed-off-by: Ravi Kumar Alamanda <ralama@codeaurora.org>
(cherry picked from commit 4e3f5247bcd098ad1488caa3ecdc3b506e9efbf7)

Signed-off-by: Seongmin Park <r_data@naver.com>