update defconfig
spmi: Add del_controller functionality

The del_controller function is required to release any client device
resources as well as the debugfs entries.  This patch adds that
functionality.

Change-Id: I91c6b840acfe002f096570cbe1867b302c475e60
Signed-off-by: Kenneth Heitke <kheitke@codeaurora.org>
spmi and gpio: qpnp: add pointer check in qpnp drivers

This patch is to fix KW errors in drivers. It's
neccessary to check NULL pointer before dereferencing it.
There're 4 issues related to it in qpnp-int.c and
qpnp-pin.c. Fix them by checking before.

CRs-Fixed: 505322
Change-Id: I2f82d1b24c219ef7e6b0977091fc353dac579cbc
Signed-off-by: Zhenhua Huang <zhenhuah@codeaurora.org>

Conflicts:
	drivers/spmi/qpnp-int.c
spmi: Add check for NULL and invalid controller pointer

Replace the BUG_ON() check with a NULL pointer check and verify that
the controller type is set appropriately.  This prevents a system crash
due to invalid input.

Change-Id: I858980ad54ba0d764219049a20b4ca3e9b77f72e
Signed-off-by: Kenneth Heitke <kheitke@codeaurora.org>
spmi: qpnp-int: call arbiter ops only when all peripheral irqs are disabled

The current driver calls arbiter ops when an interrupt is being
masked or unmasked. However, the arbiter ops were meant to be
called if all interrupts for a peripheral were disabled or
the first enable happens.  The driver ends up masking the peripheral
(i.e.  all the interrupts in that peripheral) if any one interrupt in
that peripheral is masked. There could be other interrupts enabled
which will not trigger after this.

Fix this by changing the driver to call the arbiter ops only
when all the interrupts in the peripheral are disabled or when
the first enable of an interrupt in that peripheral happens.

Also take this opportunity to clean up the arbiter ops calls to
specifically write to the INT_ACC_ENABLE bit instead of entire
register as specified in the data sheets.

Change-Id: If5835ac125f59d2964242758aa9f9ef145000af7
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
spmi: qpnp-int: show resume irq

Add code to print the interrupts that woke up the device from
resume. Use syscore resume operation to print the interrupt
number.

Since most of the systems have only one arbiter control, it is
reasonable to create a file scoped PMIC arbiter pointer for the
syscore resume operation.

CRs-Fixed: 502334
Change-Id: Ib4be9273633a70527a853fb5792543d66c8d2303
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
spmi: Inline a function to remove compilation error

Compilation error is seen in spmi_dfs_add_controller
function when debug fs is disabled.
In this patch this function is defined as static
inline to remove this error.

CRs-Fixed: 555022
Change-Id: I66ac9ca9eeb1e25c68c9deff665258f4e036a678
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
ASoC: usb: change uevent value to digital USB HEADSET

The uevent of usb_audio has two components - analog, digital.
When usb_audio is set to 1, uevent is set to analog.
But, this is incorrect type. The usb audio interface should be
digital. So, it changed to 2 - digital.

Change-Id: I646301a15a8b3badd9f1794d98c451b2d9f42293
Signed-off-by: sangwoo <sangwoo2.park@lge.com>
ASoC: msm: Add routing for HFP using AFE and ASM Loopback

HFP hostless driver is used to loopback BT data into
SLIM_0_RX. And asm loopback MM6 is used for looping
data from mic to BT so that pre_proc effects can be
added.

Change-Id: Ic818b91c545a4d17043ecdf933d6d3398ad591d3
Signed-off-by: Vimal Puthanveed <vimalp@codeaurora.org>
ASoC: msm8974: Fix external speaker power amp shutdown sequence

External speaker power amplifier should be disabled when all
the lineout power amplifiers are shutdown. When lineout is
shutdown bit mask was not cleared, due to which external power
amplifier will not be shutdown. Change clears the
bit mask for each lineout that is powered down.

Change-Id: I740653cbb6605708b38c915d59415f5b7f0c6d74
CRs-fixed: 497619
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
ASoC: msm8974: Add support for HFP

Add support for HFP for 8974 target.
Front end dai for HFP hostless for RX and MM6 for TX for HFP

Change-Id: I0406bd2b10c3daab4d583c690f27a9ba1d09af60
Signed-off-by: Vimal Puthanveed <vimalp@codeaurora.org>

Conflicts:
	sound/soc/msm/msm8974.c
ASoC: msm: Defer probe during sound card registration

ASoC framework returns probe defer when all the
components of the sound card are not registered.
MSM audio machine driver has to handle the probe
defer gracefully.

Change-Id: I39a65fe17c31205a9d8c3610fa0909fbf7891a83
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>