msm: 8974: mhl_sii8334: handle RAP CONTENT OFF

MHL-MSC driver handles RAP CONTENT OFF message by disabling TMDS
signals, this change send KEY_VENDOR event to handle this action.
This can achieve MSC RAP content-off functionality.

Change-Id: Ic197b73f6052dbc2087786c6cde4d4b5899b5fa4
Signed-off-by: Manoj Rao <manojraj@codeaurora.org>
wireless: add VHT (802.11ac) definitions

Add the VHT definitions to be used by drivers supporting it.

Signed-off-by: Mahesh Palivela <maheshp@posedge.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: ce0e169529a2db1cd910d2d45a5713fcdc29f6e1
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Change-Id: Iccbc9c8c1f0182c93d2476fd520d6d8070c5acdf
Signed-off-by: Jeff Johnson <jjohnson@codeaurora.org>
cfg80211: allow advertising VHT capabilities

Allow drivers to advertise their VHT capabilities
and export them to userspace via nl80211.

Signed-off-by: Mahesh Palivela <maheshp@posedge.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: bf0c111ec80355ee9fe2e2bdb609a536b54768d8
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Change-Id: I467d7a3386053eb23d92e5f3f4e4a92a8e01c95f
Signed-off-by: Jeff Johnson <jjohnson@codeaurora.org>
mac80211: include VHT capability IE in probe requests

Insert the VHT capability IE into probe requests.

Signed-off-by: Mahesh Palivela <maheshp@posedge.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: ba0afa2f22e1e3f332e45460f99328025d44564e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[jjohnson@codeaurora.org: resolved 3.4 backport issues]
Change-Id: I3f9e19c85a76664abda65f4ef52672328ff31a0c
Signed-off-by: Jeff Johnson <jjohnson@codeaurora.org>
arm/dt: msm8974: Add MIC and GND swapped headset detection support

The European headsets have GND and MIC swapped jack from US headset's view.
Detect European headset insertion on the US headset jack and vice versa,
report as headset insertion if there is a US/EURO selection switch or
report as unsupported plug type.

Change-Id: Iaf65ed24342cb126e399c23a5156cd8b4ff78f05
Signed-off-by: Fred Oh <fred@codeaurora.org>
msm: mdss: Increase DSI command list size

Some DSI panels have more than 256 commands as part of their
init sequence.
This fixes the issue where the number of commands to be sent
was getting corrupted.

Change-Id: I5e09d2ab8093fe40a56e906de9ff6db66ff358ae
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
arm/dt: pm8226: Add BMS device

Add the Battery Management System device to the pm8226 device tree.
BMS driver will register a fuel guage power supply and keep track of
the battery's State of Charge.

Change-Id: I22117f0d521cb7949a9695a8dfdd25339f2cf252
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
msm: camera: Multiple instance support for actuator driver

As per current actuator architecture, only one instance is supported in
platform since acutuator control structure is static. Allocate memory
for every actuator probe to support more than one instance in platform.

Change-Id: I8fa22726e2832a358388f2a944ef757b694a4601
Signed-off-by: Sreesudhan Ramakrish Ramkumar <srramku@codeaurora.org>
arm/dt: msm8610: Add MTP and CDP board support

Add initial skeleton files for MTP and CDP boards for msm8610.

Change-Id: Ia9cfe36c17cd50ede529a396b3f8d25fb9435c53
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
msm: 8610: Add support for identifying CDP and MTP boards

Allow clients to determine board type.

Change-Id: I115c2326a8cd20691e4861d2dc7bea57713acd42
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
arm/dt: msm8974-cdp: Add BUS voting and wakeup from XO support

This support is already present on LIQUID and update same for CDP.
HSIC parameters are added to support:
-BUS bandwidth voting to suffice HSIC host throughput requirements
   and allow SVS mode.
-Use Strobe GPIO HV interrupt as wakeup source from XO shutdown to
   handle remote wakeup request from downstream device.

Change-Id: I03d41fadb1e129e8026b83098c8b9b7860b9b223
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
crypto: msm: Fix stress test failure

Stress test case scenarios involving a cipher operation for a large
packet (> 32KB) followed by a hash operation (of any data packet size)
fails, with the hash operation hanging.

The failure is due to the sps driver invoking the incorrect callback
for the subsequent hash operation. Instead of invoking the registered
hash operation callback,  it  invokes the previously registered cipher
operation callback.

The fix is to set the correct flag bits for the event when registering
the callback before invoking sps_register_event() and also removing
the SPS_EOT_EVENT flag when registering the sps_connect pipe information.

Change-Id: Ia9ef774e2900df61f18298349fb4b5f4dc4d34b2
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
gpio: qpnp-pin: Fix bug when applying pull config

We are currently not applying default pin configuration for the
'pull' property, since we are erroneously reading from the
MODE_CTL register intead of the PULL_CTL register. This is a
blatant bug.

The side effect of this bug is that default register
configuration will be lost for the 'pull' property. If we
explicitly configure a pin in the Device Tree using the 'pull'
property, then the configuration will still be applied as
expected.

This patch makes it so that both the default and explicit
configuration works correctly for the 'pull' property.

Change-Id: I7585680d11b5e608f2f43e0561fca0c3dca121c7
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
msm: clock: Add support to return the max supported rate

Rcg clock round rate only returns the supported rate that is
at least the specified rate. However, there are use cases where
drivers want to know the max supported rate given a clock. Add
this support by returning the max supported rate if a specified
rate is larger than that.

Change-Id: I6b1909da63aac311eef5bb4d792f9ecfcb9165a4
Signed-off-by: Tianyi Gou <tgou@codeaurora.org>
mm: vmalloc: use const void * for caller argument

'const void *' is a safer type for caller function type. This patch
updates all references to caller function type.

Change-Id: If950cfcfc63911756ac3709c8bf6da10c8b98f1b
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Minchan Kim <minchan@kernel.org>
Git-commit: 5e6cafc83e30f0f70c79a2b7aef237dc57e29f02
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
ARM: dma-mapping: remove custom consistent dma region

This patch changes dma-mapping subsystem to use generic vmalloc areas
for all consistent dma allocations. This increases the total size limit
of the consistent allocations and removes platform hacks and a lot of
duplicated code.

Atomic allocations are served from special pool preallocated on boot,
because vmalloc areas cannot be reliably created in atomic context.

Change-Id: Ibb2230e80249598a81122083bf3fa2f050a0a71e
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Minchan Kim <minchan@kernel.org>
Git-commit: e9da6e9905e639b0f842a244bc770b48ad0523e9
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[lauraa@codeaurora.org: Context fixups and tweaking of some prototypes]
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
ARM: dma-mapping: fix incorrect freeing of atomic allocations

Commit e9da6e9905e639b0f842a244bc770b48ad0523e9 (ARM: dma-mapping:
remove custom consistent dma region) changed the way atomic allocations
are handled. However, arm_dma_free() was not modified accordingly, and
as a result freeing of atomic allocations does not work correctly when
CMA is disabled. Memory is leaked and following WARNINGs are seen:

[   57.698911] ------------[ cut here ]------------
[   57.753518] WARNING: at arch/arm/mm/dma-mapping.c:263 arm_dma_free+0x88/0xe4()
[   57.811473] trying to free invalid coherent area: e0848000
[   57.867398] Modules linked in: sata_mv(-)
[   57.921373] [<c000d270>] (unwind_backtrace+0x0/0xf0) from [<c0015430>] (warn_slowpath_common+0x50/0x68)
[   58.033924] [<c0015430>] (warn_slowpath_common+0x50/0x68) from [<c00154dc>] (warn_slowpath_fmt+0x30/0x40)
[   58.152024] [<c00154dc>] (warn_slowpath_fmt+0x30/0x40) from [<c000dc18>] (arm_dma_free+0x88/0xe4)
[   58.219592] [<c000dc18>] (arm_dma_free+0x88/0xe4) from [<c008fa30>] (dma_pool_destroy+0x100/0x148)
[   58.345526] [<c008fa30>] (dma_pool_destroy+0x100/0x148) from [<c019a64c>] (release_nodes+0x144/0x218)
[   58.475782] [<c019a64c>] (release_nodes+0x144/0x218) from [<c0197e10>] (__device_release_driver+0x60/0xb8)
[   58.614260] [<c0197e10>] (__device_release_driver+0x60/0xb8) from [<c0198608>] (driver_detach+0xd8/0xec)
[   58.756527] [<c0198608>] (driver_detach+0xd8/0xec) from [<c0197c54>] (bus_remove_driver+0x7c/0xc4)
[   58.901648] [<c0197c54>] (bus_remove_driver+0x7c/0xc4) from [<c004bfac>] (sys_delete_module+0x19c/0x220)
[   59.051447] [<c004bfac>] (sys_delete_module+0x19c/0x220) from [<c0009140>] (ret_fast_syscall+0x0/0x2c)
[   59.207996] ---[ end trace 0745420412c0325a ]---
[   59.287110] ------------[ cut here ]------------
[   59.366324] WARNING: at arch/arm/mm/dma-mapping.c:263 arm_dma_free+0x88/0xe4()
[   59.450511] trying to free invalid coherent area: e0847000
[   59.534357] Modules linked in: sata_mv(-)
[   59.616785] [<c000d270>] (unwind_backtrace+0x0/0xf0) from [<c0015430>] (warn_slowpath_common+0x50/0x68)
[   59.790030] [<c0015430>] (warn_slowpath_common+0x50/0x68) from [<c00154dc>] (warn_slowpath_fmt+0x30/0x40)
[   59.972322] [<c00154dc>] (warn_slowpath_fmt+0x30/0x40) from [<c000dc18>] (arm_dma_free+0x88/0xe4)
[   60.070701] [<c000dc18>] (arm_dma_free+0x88/0xe4) from [<c008fa30>] (dma_pool_destroy+0x100/0x148)
[   60.256817] [<c008fa30>] (dma_pool_destroy+0x100/0x148) from [<c019a64c>] (release_nodes+0x144/0x218)
[   60.445201] [<c019a64c>] (release_nodes+0x144/0x218) from [<c0197e10>] (__device_release_driver+0x60/0xb8)
[   60.634148] [<c0197e10>] (__device_release_driver+0x60/0xb8) from [<c0198608>] (driver_detach+0xd8/0xec)
[   60.823623] [<c0198608>] (driver_detach+0xd8/0xec) from [<c0197c54>] (bus_remove_driver+0x7c/0xc4)
[   61.013268] [<c0197c54>] (bus_remove_driver+0x7c/0xc4) from [<c004bfac>] (sys_delete_module+0x19c/0x220)
[   61.203472] [<c004bfac>] (sys_delete_module+0x19c/0x220) from [<c0009140>] (ret_fast_syscall+0x0/0x2c)
[   61.393390] ---[ end trace 0745420412c0325b ]---

The patch fixes this.

Change-Id: Iad60399ecfb16630661fae9d9a5128cbc280315d
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Git-commit: d9e0d149b5dcc2ef4688afc572b9906bcda941ef
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
msm: Completely remove memory from the memblock allocator

memblock_remove may not be sufficient to prevent placing
regions on top of each other. Call memblock_reserve and
memblock_free as well to completely remove the memory
from the allocator.

Change-Id: Iec481d7ce7a51c243e43a2d9be2fbfbf7b2717ed
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
cma: use MEMBLOCK_ALLOC_ANYWHERE for placing CMA regions

MEMBLOCK_ALLOC_ANYWHERE allocates blocks from anywhere,
including highmem. Use this flag to allow CMA regions to
be placed in highmem as opposed to lowmem.

Change-Id: Id5fa36a96e46d60f0e898d764a1f4c8a0a37f5f8
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
msm: pil: Migrate to SMP2P framework from SMSM mechanism.

State information is communicated with the subsystems via SMSM
bits that use a broadcast protocol. There are disadvantages
to this, such as, not being able to ask one subsystem to stop
without affecting the others. The new SMSM Point-to-Point (SMP2P)
framework allows point to point communication of state information
between subsystems. So, switch over to using SMP2P framework for
communicating low level state between the Application processor
and other subsystems. The SMP2P framework exposes the functionality
as standard GPIO and IRQ APIs. So, we just treat it as such.

This was reverted because due to a bug in smp2p re-initialization
after performing an SSR, it broke modem SSR. This would prevent back
to back SSR on the modem because the error fatal SMP2P bit won't
get set the second time modem error fatal was triggered. That bug has
been subsequently fixed. So, re-introduce this patch.

The original patch is 901df4a6246d234a9029c26233f156f8e86a3a2e.
The revert of above is a48a11d1db49117f1e28fae04c2cb8df04264e50.
The is a revert of the above revert.

Change-Id: Ie17d6568d83d950c1890aaaced1f414e1fccbcfa
Signed-off-by: Seemanta Dutta <seemanta@codeaurora.org>