ASoC: msm: update opcode of read compressed interface

For compressed AC3 and DTS in HDMI Input use case, new read
compressed interface is added. The opcode changed in the release
builds. Hence, update the opcode for the same.

Change-Id: Icb5caf9c7bf931e8db77324fd745709a710d19fd
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
msm: 8064: Add connector resistance

The adjust vdd max algorithm in the charger driver needs connector
resistance to set the battery voltage appropriately.

Set the connector resistance value from the board file.

Change-Id: If934783e2910c8456090c8926e934138abb75222
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
msm: pil: Add module parameter to override proxy vote timeouts

For debugging purposes, it's sometimes useful to disable or adjust
proxy vote timeouts. Add a module parameter for this purpose.

If proxy_timeout is set to 0, proxy votes will remain asserted until
the peripheral is shutdown. If it's set to a positive value, the value
will be interpreted as override (in ms) for all proxy timeouts. The
default value (-1) will cause the timeout specified in the individual
PIL drivers to be used.

Change-Id: I74a111b8e4e62a15e01c4e2480b7127e84b9f467
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
msm: rpm-smd: Remove timeouts on RPM transaction acks

In msm8974 bringup we've noted that regulator calls are timing
out. Once RPM communication has been optimized, we should revert
this change so it's clear in the future if a performance
regression has been introduced.

Change-Id: I4a13ef49998f9ed2a71dd9718981fb6ba5816296
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
msm: 8960: Change the msm master clock for AUXPCM

External bluetooth chip needs a lower frame rate
for high audio quality.

Change-Id: Ic3092c8adaf7097f257149e507f7c66f159eedb7
Signed-off-by: Damir Didjusto <damird@codeaurora.org>
mmc: msm_sdcc: set IO_PAD_PWR_SWITCH bit based on IO voltage level

SDCC4 controller has IO_PAD_PWR_SWITCH control bit in MCI_CLK register.
Driver should set this bit to 1 if the IO voltage level is within
low voltage range (1.7v - 1.9v) else clear it.

But driver sets this bit to 1 only if the MMC core layer initiates
the voltage switch sequence. So if voltage switch sequence is not
initiated (which is the case with non UHS-I cards) then even if
the IO voltage level is within low voltage range, IO_PAD_PWR_SWITCH
bit remains cleared.

This change checks the IO voltage level and based on that sets the
IO_PAD_PWR_SWITCH bit.

CRs-Fixed: 386445
Change-Id: Id0648b0f87ea9bcc942e855e30da810e0fe5ebf5
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
net: usb: Define waitqueue head as static global variable

usbnet_terminate_urbs() defines waitqueue head as local variable.
There is a possibility that wake_up is called on this queue head
in workqueue context and usbnet_terminate_urbs() already returned
or dev->wait pointer becomes NULL while calling wake_up() from
workqueue context. Hence call wake_up() using waitqueue head
defined as static global variable.

CRs-Fixed: 388724
Change-Id: Ib7e6c3023b9d780af0466496b25e68113b2d3fd3
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
msm: ipc_logging: Add newline to string decode

If newline isn't present, add it to log string to properly display lines
through the debugfs.

Change-Id: I8f35826f1f9a634ba7b1f7d01d0ac136baf3fdc4
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
power: pm8921-bms: fix fake battery emulation

With the recent split of functions to calculate and report state of
charge, the faking battery feature broke, it remained in the calculate
function.

Move the fake battery feature in the reporting function, where it really
belongs.

Change-Id: Ibc2ecdbca32911b4f35c7e6c2278631a614227fa
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
msm: cpuidle: Don't disable irqs again

cpu_idle() disables irqs before calling down into the cpuidle
driver via cpuidle_idle_call(). Disabling irqs again in
msm_cpuidle_enter() is wasteful and unnecessary. It also inhibits
our ability to determine the largest irq latency when the cpu
idles for extended periods of time because the irqsoff trace is
reenabled when the irqs are disabled in msm_cpuidle_enter().

Note that we still reenable irqs before returning, as is required
by the ARM idle loop.

Change-Id: I925478d8fef88ab490959622bc68303f59cc6e79
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
msm: msm_bus: Fix scaling of ocmem core clock

An optimization in bus driver prevents checking of slave clocks if
the clock of the NoC on which the slave is connected is not
touched.
Since ocmem slave is represented on a virtual NoC, the ocmem core
clock was not being scaled. Fix this by checking for status of
slave clocks.

Change-Id: I42af40b9f414a62c3712850340eef203ad6ad33d
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
crypto: Fix QCEDEV platform data initialization.

Initialize the platform data before it is being used for bus scaling.

Change-Id: Ie41ddec08b52b44ae735469dd8f3052e3469eeff
Signed-off-by: Hariprasad Dhalinarasimha <hnamgund@codeaurora.org>
net: usb: Submit RX URBs regardless of whether QMI channel is opened

During interface resume rmnet control driver submits interrupt URB
only if QMI channel is opened by userspace. There is a possibility
that interface is resuming from suspend and QMI channel is still not
opened, in that case interrupt URB will never get submitted again.
Hence always submit the interrupt URB and do not depend on if userspace
has opened the QMI channel.

CRs-Fixed: 388611
Change-Id: Iffe203dee3b3f757affbba3cd9dd12e2cd260d34
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
ASoc: msm8960: Add msm8960AB board specific change

- GPIOs 23, 35 are used for headset mic on msm8960
- Do not configure GPIOs 23, 35 on msm8960AB target
  for headset mic, as these GIPOs are used for FAN
  external VDD_CX regulator control

Change-Id: I9320e2223fef2476c6ce7a8ccd38ef9555ebe616
Signed-off-by: Jayasena Sangaraboina <jsanga@codeaurora.org>
msm: msm_bus: Fix the number of masters for 8960 Pro

The video core master IDs on 8064 Pro are higher than
the ID values for 8960. This patch changes the max
allowed ID value to the correct number.

Change-Id: I286023c362df27272d109a822e32df6673e637ab
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
msm: acpuclock-8960ab: Set power collapse rate

This line was somehow left out when initially copying the
acpuclock-8960 file over to the acpuclock-8960ab file.

Without this line, power collapse leaves the Krait PLL enabled,
causing failures upon resume.

Change-Id: I1339192d59d8b7f4135b32dcb5807bfc4dababfc
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
msm: kgsl: Set 8960PRO GPU chip id

There are two versions of 8960.  Set the 8960PRO chip id correctly.
Ensure 8960 clock values do not get changed when the device is 8960PRO.

Change-Id: I818de1badf090b1e11bd03bed2f410a36c3749e9
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
msm: camera: Dynamically register domain and attach to device.

Starting with B family chips, the IOMMU client is responsible
for registering a domain (page table) and attaching it with
the corresponding device context when required.

Change-Id: I3b17ce6e27c74516325198f89d88d3635bdbff50
Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
EHCI: HSIC: Use counter for timeout in ulpi_read()

ulpi_read() relies on jiffies to calculate the timeout
for read operation on phy register. Calling ulpi_read()
with interrupts disabled, freezes jiffies on local processor.
In case of phy lockup this results in infinite loop leading
to watchdog reset. Use loop counter for timeout instead of
jiffies for read operation to avoid watchdog reset.

CRs-Fixed: 388234
Change-Id: I1d46052b087c42b9f422b6f7eb691498fa104718
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
msm: clock-local2: Move lock from rcg_clk_set_rate to lower level ops

The local_clock_reg_lock is used to protect registers accesses. Move
the acquiring and releasing of this lock from rcg_clk_set_rate to
set_rate_mnd and set_rate_hid to allow overriding of the RCG set rate
op with ops that dont require the lock.

Change-Id: I2d04b71f12f91d2cd5ef14f05a908558ed149488
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>