ASoC: twl6040: Align widget names with Kernel V3.1

Change-Id: I77acb512c8d8bd703d10cdfab4397d5ffdbb2fb6
Signed-off-by: Pierre Moos <p-moos@ti.com>
Signed-off-by: Francois Mazard <f-mazard@ti.com>

Conflicts:
	sound/soc/codecs/twl6040.c
ASoC: twl6040: Add wakelock for headset detection interrupt

TWL6040 is kept active during a voice call, but CPU can go into
suspend state. If headset is inserted or removed while the CPU
is in suspend, SYS_NIRQ2 IRQ line will wake the CPU up and the
headset state will be acknowledged at kernel level, but the
event propagated to userspace layers to cause audio rerouting
might not be completed on-time before CPU goes back to suspend.
A wakelock is added to prevent CPU to go back to suspend
immediately after the event, instead it'll wait for 2 secs for
the event to be processed in userspace.

Change-Id: I88a71345c7a082801a21335f20c920c68bacb8fc
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>

Conflicts:
	sound/soc/codecs/twl6040.c
ASoC: twl6040: Handle handsfree overcurrent events

TWL6040 has a short circuit detection mechanism that report events
when the current exceeds 2.2A in its handsfree output stage. Upon
detection of handsfree overcurrent, the suggested action is to
disable handsfree drivers to prevent damage. Additionally, when
this event occurs it's reported to Android userspace layers through
an uEvent associated with the TWL6040 MFD.

Change-Id: Iea94c55286a9adb158caac10f7a15fae73827792
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Chris Kelly <c-kelly@ti.com>

Conflicts:
	sound/soc/codecs/twl6040.c
ASoC: TWL6040: Adding Aux audio output

Adding switch controls to enable/disable audio output
throught Aux pins in codec.

Change-Id: I329c44fe95a9157d56017ac47cb4e091e87d8710
Signed-off-by: Israel Cepeda <icepeda@ti.com>
ASoC: twl6040: Add VDDHF regulator

Use regulator framework to enable/disable VDDHF voltage supply
for handsfree drivers. Not providing a valid regulator for VDDHF
through regulator framework doesn't have any negative impact as
long as VDDHF is actually supplied by some other way (e.g. voltage
supply enabled through bootloader or machine initialization).

Ported from p-android-omap-2.6.35

Change-Id: I9df90a695ed9afcb6da916fb53bb3965c5292226
Signed-off-by: Girish S G <girishsg@ti.com>
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Akash Choudhari <akashc@ti.com>
Signed-off-by: Girish S Ghongdemath <girishsg@ti.com>
Signed-off-by: Gabriel M. Beddingfield <gabrbedd@ti.com>

Conflicts:
	sound/soc/codecs/twl6040.c
ASoC: twl6040: VDDHF as SUPPLY widget

VDDHF external boost supply was being enabled after and disabled before
handsfree driver as a strategy for pop noise reduction. This strategy
makes handsfree driver very susceptible to overcurrent events, so the
boost supply is converted to a SUPPLY widget to enable it before and
disable it after handsfree path.

Change-Id: I608b4b0f5cb3301053869ccd2732434efe276b81
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
ASoC: OMAP PCM: Remove combined ABE/HDMI constraint

Remove buffer bytes constraint used for ABE and HDMI in favor of
individual, separate constraints applied by each driver.

Change-Id: Ic1b0aefff6504159f36eb701b91e5e3e7c78d688
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
ASoC: sdp4430: Correct stream name for FM BE DAI

Correct stream name for OMAP_ABE_BE_MM_EXT0 backend DAI

Change-Id: I7e29dbda5a35f35a614fc45f3f7e3172444f89be
Signed-off-by: Manjunatha Halli <x0130808@ti.com>
Signed-off-by: Axel Castaneda Gonzalez <x0055901@ti.com>
ASoC: Tuna: separate tuna board file
ASoC: add back generic SDP4430 board file

Just to be in sync with p-android-omap-3.0-dev.
power: max17040: add support for POWER_SUPPLY_PROP_PRESENT
power: power_supply: add POWER_SUPPLY_PROP_CHARGE_ENABLED

Change-Id: I3e93b502452811cbfc4d904202b4f1d94edc143d
Signed-off-by: Todd Poynor <toddpoynor@google.com>

Conflicts:
	drivers/power/power_supply_sysfs.c
	include/linux/power_supply.h
power: max17040: Fix NULL pointer dereference when there is no platform_data

Fix NULL pointer dereference of "chip->pdata" if platform_data was not
supplied to the driver.

The driver during probe stored the pointer to the platform_data:
	chip->pdata = client->dev.platform_data;
Later it was dereferenced in max17040_get_online() and
max17040_get_status().

If platform_data was not supplied, the NULL pointer exception would
happen:

[    6.626094] Unable to handle kernel  of a at virtual address 00000000
[    6.628557] pgd = c0004000
[    6.632868] [00000000] *pgd=66262564
[    6.634636] Unable to handle kernel paging request at virtual address e6262000
[    6.642014] pgd = de468000
[    6.644700] [e6262000] *pgd=00000000
[    6.648265] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[    6.653552] Modules linked in:
[    6.656598] CPU: 0 PID: 31 Comm: kworker/0:1 Not tainted 3.10.14-02717-gc58b4b4 #505
[    6.664334] Workqueue: events max17040_work
[    6.668488] task: dfa11b80 ti: df9f6000 task.ti: df9f6000
[    6.673873] PC is at show_pte+0x80/0xb8
[    6.677687] LR is at show_pte+0x3c/0xb8
[    6.681503] pc : [<c001b7b8>]    lr : [<c001b774>]    psr: 600f0113
[    6.681503] sp : df9f7d58  ip : 600f0113  fp : 00000009
[    6.692965] r10: 00000000  r9 : 00000000  r8 : dfa11b80
[    6.698171] r7 : df9f7ea0  r6 : e6262000  r5 : 00000000  r4 : 00000000
[    6.704680] r3 : 00000000  r2 : e6262000  r1 : 600f0193  r0 : c05b3750
[    6.711194] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
[    6.718485] Control: 10c53c7d  Table: 5e46806a  DAC: 00000015
[    6.724218] Process kworker/0:1 (pid: 31, stack limit = 0xdf9f6238)
[    6.730465] Stack: (0xdf9f7d58 to 0xdf9f8000)
[    6.914325] [<c001b7b8>] (show_pte+0x80/0xb8) from [<c047107c>] (__do_kernel_fault.part.9+0x44/0x74)
[    6.923425] [<c047107c>] (__do_kernel_fault.part.9+0x44/0x74) from [<c001bb7c>] (do_page_fault+0x2c4/0x360)
[    6.933144] [<c001bb7c>] (do_page_fault+0x2c4/0x360) from [<c0008400>] (do_DataAbort+0x34/0x9c)
[    6.941825] [<c0008400>] (do_DataAbort+0x34/0x9c) from [<c000e5d8>] (__dabt_svc+0x38/0x60)
[    6.950058] Exception stack(0xdf9f7ea0 to 0xdf9f7ee8)
[    6.955099] 7ea0: df0c1790 00000000 00000002 00000000 df0c1794 df0c1790 df0c1790 00000042
[    6.963271] 7ec0: df0c1794 00000001 00000000 00000009 00000000 df9f7ee8 c0306268 c0306270
[    6.971419] 7ee0: a00f0113 ffffffff
[    6.974902] [<c000e5d8>] (__dabt_svc+0x38/0x60) from [<c0306270>] (max17040_work+0x8c/0x144)
[    6.983317] [<c0306270>] (max17040_work+0x8c/0x144) from [<c003f364>] (process_one_work+0x138/0x440)
[    6.992429] [<c003f364>] (process_one_work+0x138/0x440) from [<c003fa64>] (worker_thread+0x134/0x3b8)
[    7.001628] [<c003fa64>] (worker_thread+0x134/0x3b8) from [<c00454bc>] (kthread+0xa4/0xb0)
[    7.009875] [<c00454bc>] (kthread+0xa4/0xb0) from [<c000eb28>] (ret_from_fork+0x14/0x2c)
[    7.017943] Code: e1a03005 e2422480 e0826104 e59f002c (e7922104)
[    7.024017] ---[ end trace 73bc7006b9cc5c79 ]---

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Fixes: c6f4a42de60b981dd210de01cd3e575835e3158e
Cc: <stable@vger.kernel.org>