Perf: Fix Perf-JSON patch fprintf errors

Fix multi-line fprintf formatting errors.

Change-Id: I3a3e8c9d1615fa712b9c6f6e997b5cff17e96759
Signed-off-by: Ashwin Chaugule <ashwinc@codeaurora.org>
block: Expose kblock_schedule_delayed_work()

This function is exported in blk-core.c to be used in other modules
but it's definition in h file is missing.

Change-Id: I3374d97774adf06c1f93e40f1d5e1daefb983571
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
arm/dt: msm9625: Add device tree for MSM9625 RUMI

Add the DTS file for the MSM9625 RUMI and make the original DTS file
to a DTS include file.

Change-Id: I718c5854522fcb4639ae6f2cce0e74e1ede6f38a
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
arm/dt: msm9625: Add device tree for MSM9625 CDP

Add device tree support for MSM9625 CDP.

Change-Id: I28593c75415e94de77cf1e984ea9a31f0036c7dd
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
msm: clock: Move voltage scaling to prepare/unprepare

Move the voltage calls to a sleepable context so we can avoid
spinning for hundreds of microseconds with interrupts disabled
waiting for a regulator to increase. This change also paves the
way to making the clock driver into a real regulator consumer
that uses the proper regulator APIs instead of the MSM specific
rpm_vreg API.

Doing this also requires us to make clk_set_rate() a sleeping
call so that concurrent clk_prepare() and clk_set_rate() calls
are synchronized. Making clk_set_rate() sleepable also
necessitates moving the clk_set_rate() call in clock-voter.c to a
sleepable context. Do that by having clock-voter aggregate and
update the rate in prepare/unprepare instead of enable/disable
(note that enable/disable of voter clocks implicitly calls
enable/disable on the parent via generic clock code).

Now that clk_set_rate() is sleeping, call clk_prepare() and
clk_unprepare() in the clock-local code when a rate change
requires reparenting the clock. This cleans up a problem we have
where sources may be left unprepared by a clock rate switch
(hence the default true warned flag for PLLs and crystals).

Change-Id: I493a00261055001a68fa884daa52e3d281ec6a2d
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
msm: camera: Update device tree for jpeg with regulator info

Add regulator supply entry for each jpeg node in
the device tree.

Change-Id: Iad98c489ad1f96988254be91d519619c9eee9a8f
Signed-off-by: Ashwini Rao <ashwinik@codeaurora.org>
msm: clock-8974: Update lookup table entries for JPEG clocks

Add clock lookup table entries for jpeg encoders and
decoder to enable the clocks from the jpeg device driver.

Change-Id: Iab94984e3a107c872fc1bd563292f8315fdf73e8
Signed-off-by: Ashwini Rao <ashwinik@codeaurora.org>
EHCI: HSIC: Handle wakeup interrupt properly during probe

During HSIC probe driver registers the level triggered interrupt
on wakeup gpio. Wakeup irq line is disabled based on the return
status of interrupt registration. There is a possibility that
wakeup gpio is already pulled high after registering the interrupt
which can cause wakeup interrupts to be fired on continuously
without getting chance to disable the irq line. Hence do not
enable wake up interrupt on request irq.

CRs-Fixed: 394540
Change-Id: I3175cd8710f1d982c33a5392cc49106ee66d0aa6
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
arm/dt: msm9625: Add device tree for MSM9625 MTP

Add device tree support for MSM9625 MTP.

Change-Id: Ic58e8324c928e3331aa44760ad668f4dba689128
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
msm: 8974: Add gpio configuration for HDMI Tx.

Configure and install gpios used by HDMI Tx controller.

Change-Id: Ie6dbba55e58db575d7c0dc5c2eb8ab06332bf6a1
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
arm/dt: Add HDMI Tx Controller device to msm8974 device tree

Add HDMI Tx device to the msm8974 device tree. This device provides
support for transmitting TMDS signal to HDMI compliant TVs, monitors etc.

Change-Id: I8e765e637f61168cf84ec5ef505abb94b4bc4f13
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
lib: genalloc: Change chunk allocation to vmalloc

Change the chunk allocation from kmalloc to vmalloc for
allocations greater than a page. This allows large
chunks to be allocated from physically non-contiguous
memory and increases the chance of the allocation
succeeding.

CRs-fixed: 387655
Change-Id: I75cd0d1634c6f8ff4d91e615122fdcfada00ec69
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
msm_fb: display: add wait for overlay0 done

Dcs command mode BLT involves both overlay0 done interrupt
and dmap done interrupt. A transaction is start at kickoff and
end with done interrupt.  At some corner cases both overlay0 and
dmap transaction need to be completed before kickoff of new transaction.

Change-Id: I5a3cc6e8255acf2c61fc627d35f990182d226f63
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm: SSR: Don't fail init on NULL restart orders

The subsystem framework works fine without a restart_order for a
particular machine. Therefore, always return success if there are
no restart orders. This allows 8974 to start using the subsystem
restart framework while we work on removing the need for the
restart order list.

Change-Id: Ia644f7420752c12dcb1cf606591a59b1c3caa8e6
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
defconfig: msm_8974: Enable CONFIG_SUBSYSTEM_RESTART

This is necessary to transfer pil drivers on 8974 to the
subsystem framework.

Change-Id: I46e7bf88842753412fa77a3796339503cb0b8ff0
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
ASoC: wcd9310: reduce mbhc button release GPIO debounce time

Current GPIO debounce time is too long so it delays next button
press detection.  Reduce this debounce time so driver can detect
next button press and release quickly.
Typically mic voltage ramps up within few milliseconds after button
release so 50ms is long enough.

Change-Id: I41e1e55f9393686b5c64074fcf14012e99b13e4b
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
msm: camera: Change S5K3L1YX clk setting

Currently output pixel clk is set at turbo mode (320 MHz). This
causes power drain for S5K3L1YX preview and snapshot. Reduce it
to proper value for preview, snapshot and HFR mode.

Change-Id: I94071f9ce48f04f2b049b6fe94f03e91927cd292
Signed-off-by: Sreesudhan Ramakrish Ramkumar <srramku@codeaurora.org>
usb: diag_bridge: Fix NULL pointer crash during disconnect

DIAG I/O could be executing concurrently when the device/interface
is disconnected. In such cases the usb_interface pointer could
become NULL while the read or write functions are about to access
it. Prevent these NULL pointer dereferences by guarding the
pointer with a mutex.

CRs-fixed: 393826
Change-Id: I16a4a8d928f5e18531627b03f2ce6358ec3a9d1f
Signed-off-by: Jack Pham <jackp@codeaurora.org>
thermal: tsens8974: Fix delay in the TSENS handler

Add a workqueue to process the status register reads for
the sensors to verify if sensors thresholds are crossed
and send uevent to clients. This change is to avoid any delay
within the TSENS interrupt handler.

Change-Id: I3f3b713a84a6e74fb94e27b8a69be3b1dd0a9dac
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
usb: mdm_bridge: Free driver data structure memory in correct order

mdm bridge driver allocates driver data structure for dial up network
and RMNET interface in the order interface probe is called. Driver frees
the data structure memory for control channel in reverse order in
interface disconnect. This causes the usb core driver to access freed
memory(freed during dial up network interface unbind) for control
channel when it unbinds RMNET interface. Hence allocate and free data
structure memory for control channel in the same order in which it was
allocated.

CRs-Fixed: 394951
Change-Id: Ic399c123253fcee46895e3b0b749dcd0fe43d99d
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>