power: pm8921-charger: add PM8038 buck clock control address

The CHG_BUCK_CLOCK_CTRL register address changed in PM8038.

Add this address and make sure the correct buck clock frequency
is set in the hardware initialization.

Change-Id: I96b47c8603a291c41c5769fab9483d83fefb6084
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
ASoC: msm: Add support for voice packets transmitted over I2S

When external modem is paired with the apps processor through I2S,
routes are added to transfer voice packets from modem to
the application processor over I2S interface.

Change-Id: I888eb42a979cdfe30ecc8f2b646d2ddfecec4e2c
Signed-off-by: Helen Zeng <xiaoyunz@codeaurora.org>
msm: mdss: Return correct error value

Return a proper value rather than 0 everytime.

Change-Id: I0065a420c65e4800d114be4698618d66de89d105
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
slimbus: Allow controller to override default scheduling algorithm

Framework provides a slimbus scheduling algorithm and controller may
choose to override it. e.g. controller will override this if it
supports fixed set of channels at a fixed clock gear.
In that case, it is controller's responsibility to act on client
requests and update channel scheduling, subframe coding information.

Change-Id: I31fe72ef85f931900467b737652da7516d173dc5
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
mmc: msm sdcc: Enabling the "Cache Ctrl" feautre

Cache is a temporary storage space in eMMC device.
The cache should in typical case reduce the access time (compared to an
access to the main non-volatile storage)
for both write and read. The cache is not directly accessible by the
host. Data in the cache may (and most probably will) be lost due to a
sudden power down. If there was a flush operation ongoing when the
power was lost then also any such data may be lost.
Turning the cache OFF shall trigger flushing of the data to the
non-volatile storage.

Change-Id: I7fb809024121cbd277fca9560d023c4ee07fe433
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
usb: bam: don't wait to enable/disable endpoints on bam2bam work functions

Enable or disable the endpoints, also in case of bam2bam connection,
at the gbam_connect and gbam_disconnect APIs, rather then in the
bam2bam work functions.

This change fixes a race condition when there is a pending disconnect
in the bam2bam port's workqueue, therefore endpoints were not disabled
yet, while frmnet_set_alt is checking the state of the endpoints, which
are still enabled, therefore not queuing a connect work.

Change-Id: Ibc2eb9b8a747061c52132dbc112ce5e5525adc2c
CRs-Fixed: 397466
Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
msm: audio: qdsp6v2: Update correct stream parameters for tunnel mode

Add a new member for sample rate in the aac_config structure,
driver to use this value to update sample rate not the sample rate
set in pcm_config structure for tunnelmode.

Change-Id: I2cd38478673c90bb94d12124f89ab03382ca70e9
Signed-off-by: Sidipotu Ashok <sashok@codeaurora.org>
usb: hsic: suspend hsic until really activated by the gadget driver

Hsic can enter to low power mode only after bus suspend when
connected to host. Since there is no disconnect state in hsic,
hsic remaines resumed even not activated by the gadget driver.
Therefore hsic still votes for some resources, such as clocks,
that prevent from power save modes to occur, as Vdd minimization.

This fix suspends the hsic by default, right after hsic udc driver
Initializations take place, and only on activation by the gadget
driver,aka pullup, resume the hsic device.

Change-Id: I22ecbbd66e76e28161428287e6a8b44cf42a1325
CRs-Fixed: 400263
Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
msm: acpuclock-7627: Avoid AXI freq. change while going into power collapse

There is no reason to change the AXI freq. while going into the PC
since the same AXI frequency is maintained by vote while coming
out of the PC. If the suspend power collapse happens from the
arch_idle path then we would see the sleeping calls while atomic
warning due to mutex being held in the clk_set_rate calls.

Change-Id: I5343c7ea6927c236046d62e94791462cdd8eccf6
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
vidc: Handle EOS with Codec config buffer.

Change will handle codec config buffer with EOS.
Video driver will make sure that the codec config buffer with
EOS will be requeued in case of reconfig and non-reconfig paths.

CRs-fixed: 399347
Change-Id: I94ed460b04b76663895c6690c2f866590ac51c7d
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
gpio: spmi: Remove "depends on ARCH_MSM8974" from QPNP Kconfig entries

Remove the following line from gpio and spmi Kconfig files:
       depends on ARCH_MSM8974

This line is not needed because it enforces a dependency which
does not exist.  Targets other than MSM8974 support qpnp-gpio
and qpnp-int.

Change-Id: I38a6d69db5298107b09c0b84696d899ddbf9814a
Signed-off-by: David Collins <collinsd@codeaurora.org>
build: Pick up multiple CONFIG_ARCH_ targets from defconfig for Android

Change Android kernel build makefile to pick up multiple CONFIG_ARCH_
options for device tree targets.  These options are used to indicate the
DTS file(s) to compile.

Change-Id: I25ea8072f428171b21c056177ea5fec1be660aa3
Signed-off-by: David Ng <dave@codeaurora.org>
net: usb: Prevent suspend if response available notification received

There is a possibility of interface suspend after receiving response
available notification from mdm device. In this case driver unlinks
the rx urb and do not send GET_ENCAPSULATED_RESPONSE setup packet to
mdm. Response to mdm gets delayed up until interface resumes and mdm
sends response available notification again. Hence resume interface
after receiving response available notification if it is suspended.
Allow interface suspend only after completing
GET_ENCAPSULATED_RESPONSE.

Change-Id: Ib52e64b1cc7b6d5edfe3ada9651ec56526cf4852
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
base: sync: include struct seq_file to fix compile warning

Fixes missing declaration for struct seq_file.

Change-Id: Id77c47fad3bbee56d0dbe4a85f56f6f388e686d6
Signed-off-by: Jeff Boody <jboody@codeaurora.org>
base: sync: signal a sync pt when not adding to the active_list

A sync point that is not added to the active_list will never signal
in sync_timeline_signal thus causing sync_fence_wait to deadlock or
block until the timeout expired.

Change-Id: I75168d0eec874bf70dd8c28db9508dd8fc1077d3
Signed-off-by: Jeff Boody <jboody@codeaurora.org>
msm: smd_pkt: Allow multiple users of an SMD_PKT device

Add the usage reference count for every SMD_PKT device. Update the
sequence of operations in device open & close calls. This will enable
multiple user-space users of a SMD_PKT device.

Change-Id: Ic11d0c2e6908f1d82f7aef6a99a0239a92358814
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
gpu: ion: IOCTL return success when error occurs

ION_IOC_IMPORT may return success when an error occurs. Add correct
error handling to ION_IOC_IMPORT.

Change-Id: I5aa552fae0e11b623fba4eed65b5c3c9c8b21597
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
[mitchelh@codeaurora.org: re-adding patch that fell out]
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
msm: spm: Add cross-calling support to change voltages

SPM block is responsible for power collapsing the core, but also
interacts with the PMIC through hardware to change core voltage. It
would be beneficial to frequency algorithms to change frequencies and
thereby voltages of all cores running from a single core. In some
targets, the SPM is configured to set voltage only for that core. Ensure
that the core voltage is set only from that core.

Change-Id: I656e20a49d9784f08e9ce4d4e8f6c15760ba015b
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
msm: vidc: Adds support for VC-1 MP and SP support

Adds support for VC-1 Main and Simple profile decoders
by adding VC-1 decoder entry in vdec formats struct.

Change-Id: I7b2bbaee6b84e7198f825a80aeb7c52a6271a9a5
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
msm: event_timer: Support to add event timers.

Add support to allow drivers to specify future events
that need to be treated as hard deadlines. Upon event timer
expiry the driver will be notified by callback function
that the driver provides.
The pm code can query the earliest event and modify
the event timer accounting for the back off based on the
latency of the low power mode being entered.

Change-Id: Iec26f77de3b826bff456b12f3230268d9bdc2255
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>