usb: serial: Stop pushing rx data when tty node is removed

usb_wwan driver continues pushing rx data buffer to tty node
even if it is removed during device disconnect. This may cause
watchdog bark as driver unnecessarily loops through the list of
rx buffers and tries to push it to tty layer while holding
spin lock with interrupts disabled.

CRs-Fixed: 377066
Change-Id: I5569a4948aba89fd1d0d8ea5e8910ce2e0c8e917
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
STMicroelectronics LIS3DH device driver version 1.1.0

For Android/Linux kernel 3.4. This is the initial commit.

Change-Id: I96e300d7b59743df1f757746228b47b5d444c76c
Signed-off-by: Samuel Huo <samuel.huo@st.com>
Signed-off-by: Wentao Xu <wentaox@codeaurora.org>
slimbus: Disconnect source port if source end is removed by client

If source end of a channel removes its vote, it should be allowed to
be reclaimed by other client (or by other source port by same client)
who wants to be the source for this channel.

CRs-Fixed: 376731
Change-Id: Ia30c6a4b07de7df98cde8bc928205b4f4598036d
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
bdi: use deferable timer for sync_supers task

sync_supers task currently wakes up periodically for superblock
writeback. This hurts power on battery driven devices. This patch
turns this housekeeping timer into a deferable timer so that it
does not fire when system is really idle.

CRs-Fixed: 353700
Change-Id: Idc7953b5d0580546808bc5832291ca570837ee7f
Signed-off-by: Yong Wang <yong.y.wang@intel.com>
Signed-off-by: Xia Wu <xia.wu@intel.com>
Signed-off-by: Krishna Vanka <kvanka@codeaurora.org>
msm: msm_bus: Add Bus-RPM interface using RPM-SMD APIs

For MSM8974, communication to RPM is done through SMD.
For this new RPM-SMD driver APIs were introduced.
This patch enables bus driver to commit arbitration
data to RPM using the RPM-SMD APIs.
To maintain backward compatibility, the old RPM
communication file contains a stub for remote-init.

Change-Id: Ie32cec94b557c2d3b04be96a604e31c515817a54
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
msm: audio: Use adsp as a string param for pil_get function for 8974

For 8974 target, pil_get function uses "adsp" string as a param, for
other targets it uses "q6", for pil_get to succeed, we need to try
with both strings before we return an error.

Change-Id: Ia1e05f9ce4d9f09165bdfbd1c68cad9136d62b0f
Signed-off-by: Harmandeep Singh <hsingh@codeaurora.org>
ASoc: msm: qdsp6v2: Native drivers to use different pool id.

Some physical pools ids may become unsupported in future targets.
Remove target specific information from API to make it robust against
such architectural changes.

Also different platforms such as MDM, MSM might support some physical
pools but not the other, so choosing a generic name which will could be
mapped internally to different memory pools

Change-Id: I4f003662d9a2a28c17eefa5230530b8608b26c09
Signed-off-by: Harmandeep Singh <hsingh@codeaurora.org>
mmc: card: Add Sanitize unit test

This test write data to the card, then send DISCARD on random
addresses on the card, send SANITIZE to the card to erase all
the unmapped areas.

Change-Id: I2904023ccd258e64b99b004bacfbe576b0ead59a
Signed-off-by: Maya Erez <merez@codeaurora.org>
arm: Make the WFE macro unconditional

Remove the condition argument from the WFE macro in the
spinlock code so it can support a WFE fixup needed on
certain Krait CPUs.

Change-Id: I8b4f85f0e7c130dff1e14fe275fda14a43e6f3f4
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
arm: Convert spinlocks to new inline assembly style

Refactor the inline assembly code in spinlock.h in
preparation for supporting the Krait safe WFE sequence.

Change-Id: I2db4f823c39b164e04673f44cea916e334a20c9a
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
arm: Support the safe WFE sequence for Krait CPUs

Certain version of the Krait processor require a specific
code sequence to be executed prior to executing a WFE
instruction to permit that instruction to place the
processor into a low-power state.

Change-Id: I308adc691f110a323cbd84e9779675ac045826fa
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
msm: kgsl: Don't let thermal control use invalid GPU frequencies

The lowest non-zero GPU frequency is only meant to be set when
the device enters SLEEP and the clocks are off.  Do not permit it
to be used as a thermal level.

Change-Id: I6eedf39849ec5211977f824148883e3694cae50b
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
msm: Add bindings for memory reservations

To get large contiguous memory allocations, a dedicated carved out
memory pool is created. The size of this pool is determined by the
sizes declared by devices. Add size bindings so drivers can increase
the size needed for reservations. Also add bindings to allow drivers
to reserve memory with memblock_reserve to reserve specific memory
regions.

Change-Id: Icc51aef5069a7964c03c5c52f24e40b96f4b2781
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
msm: 8974: Add bindings for register trace buffer

Document the appropriate bindings so the register trace buffer (RTB)
can be used on targets that support device tree.

Change-Id: Iafd2cbca20489fb27ada0b982e012ee74f7b07c1
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
msm: rpm-regulator-smd: Update voltage corner mapping to match RPM

Update the voltage corner mapping used by the rpm-regulator-smd
driver to match what is being used inside of the RPM.

In particular, an explicit "none" corner value has been inserted
with value 0 which pushes all of the other corners up by 1.

Change-Id: I34b4285f88e7e9d23d7accf4ccbf9cebff591754
Signed-off-by: David Collins <collinsd@codeaurora.org>
arm/dt: msm8974: Update the max corner limit for VDD_CX voltage regulator

Increase the regulator-max-microvolt values for pm8841_s2_corner
and pm8841_s2_corner_ao to match the updated super turbo corner
value.

Corner values have been remapped inside of the RPM.  This has
resulted in the super turbo corner value changing from 6 to 7.
Therefore, set the value of regulator-max-microvolt to the new
super turbo corner value.

Change-Id: I951384c2549acdd15b1d84febf663f3d24dc27e1
Signed-off-by: David Collins <collinsd@codeaurora.org>
msm: rpm-regulator-smd: Add support for LDO bypass mode disable

Add support in the rpm-regulator-smd driver for the "bypa"
bypass mode disallow parameter.  This parameter can be used to
instruct the RPM that a given LDO should never be put into
bypass mode because its load is sensitive to voltage supply
noise.

Change-Id: I34fdcdb88107f94b78f2ace4a0512fe4ca94779c
Signed-off-by: David Collins <collinsd@codeaurora.org>
ASoc: msm: Remove incorrect headset mic gpios

AV switch and US Euro headset switches are not supported
on apq8064 target. Hence removing unnecessary gpio pins
configuration.

Change-Id: Ia4747b59b63b0bf7c37054fb1bcebfc54079b481
Signed-off-by: Ravi Kumar Alamanda <ralama@codeaurora.org>
dt/flattree: Add stub defintions for flat device tree function

Several flattened device tree functions are currently accessed in a
file that is compiled regardless of whether device tree is enabled
or not. Add stubs for these functions if device tree is not selected.

Change-Id: I0bea3325692fac46d3e5ef457aa30e083f71cd6d
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
msm: board-8974: correct modem to apps interrupt definitions

The interrupt definitions for modem SMD to apps and modem SMSM to apps
have changed.  Correct the driver platform data to reflect the new values.

CRs-Fixed: 373070
Change-Id: Ied7124c2bc834b8b24aa3504407e36e7b1b95683
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>