USB: ccid_bridge: Drop the usb device reference upon disconnect

usb device ref count is incremented in probe via usb_get_dev. Call
usb_put_dev during disconnect to drop the ref count. Otherwise
struct usb_device memory is leaked.

Change-Id: Ia82f5ff7ef1a0a5e5c54f6e52b9e22f8434c45a6
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
USB: ccid_bridge: Enable the auto-suspend

The USB UICC cards are always attached to the host. Enable the
auto-suspend to save power.

Change-Id: I715171fa677b64da220114d515ceb775fdab54a0
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
msm: clock-8226: Remove control of mmssnoc_bto clock

The mmssnoc_bto clock is used to monitor ahb timeouts. However, since
there is no linux client driver, this clock will be automatically
disabled. To prevent this, remove the clock entry.

Change-Id: I706d8c8297bac5b85f4997079d3b649264730629
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
msm: mdss: dsi: remove unused memory mapped resource

There are more than one instances where the DSI registers
are memory mapped in the driver whereas only one instance is
being used. Remove the reference to the unused resource.

Change-Id: Ia213e94b43bf58446eead47b18cadeb36d6795a7
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
msm: kgsl: Remove unused legacy IB timeout variables

Remove unused variables from legacy IB timeout detection.

Change-Id: I4df94ee43072ccebff4045c5950edbc406de38a8
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
msm-camera: Compat changes for camera file

Compat related changes for camera file. If an ioctl
which is not defined within the set of predefined ioctls
for this file, they are now being handled by a return
value of ENOIOCTLCMD.

Change-Id: Ic1fd9e8b3c0409203a8bf6c2ecc14243311cf697
Signed-off-by: Katta Santhisindhu <kattas@codeaurora.org>
msm: mdss: hdmi: add missing sentinel to of_match_table

The DT of_match_table is missing the NULL entry that is needed to
terminate the table. Without this there is a risk of corrupting memory.

Change-Id: Ida223b91b00c72a6a2990653e3cb5ee693bd7e05
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
msm: mdss: restrict decimation when layer format is macro-tile

When layer format is macro-tile, decimation cannot be supported. Add the
necessary checks to fail HW configuration for such use-case.

Change-Id: I68adbcdf8014f9ad528e945928f309b221c6dcfd
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
mdp3: Increase timeout to determine ppp core hung

We were seeing in some corner cases were 40ms was not enough
to complete a ppp request.

Change-Id: Ie2a95bceeddb2f4cf49f6497a449e0755fc36ce7
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
msm: kgsl: Dump snapshot for long IB timeout

Dump snapshot when long IB timeout is detected. The GPU
command processor is halted on long IB timeout detection,
this will halt the GPU pipeline, dumping the snapshot at
this point is safe and gives us information to debug
long IB timeout.

Change-Id: I51bb73b66e11c3b6945c3dfe92af03e21e3c0e62
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
msm: kgsl: use %pK to restrict printing GPU / memory addresses

Use %pK in the output for the per-process memory dump to keep from
printing the GPU and user memory addresses for the GPU memory
objects own by the process.  This allows us to make the 'mem' file
world readable without exposing any really dangerous information.

Change-Id: Ic0dedbad21654110905d1b3744f562966584d8ed
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Sunil Khatri <sunilkh@codeaurora.org>
regulator: cpr-regulator: correct format string for physical addresses

Change the format string used when printing physical addresses
from %x to %pa.  This ensures that the driver can be compiled
when type phys_addr_t is larger than type int.

Change-Id: I004f58236b716731d366d6fdac8936d9beed33e2
Signed-off-by: David Collins <collinsd@codeaurora.org>
msm_serial_hs: Programing the TX FIFO watermark level to 4

As per the Hardware Data Book recommendation the
TX FIFO watermark level should not be zero.
Hence programing the TX FIFO watermark level to
4 to avoid corner cases

CRs-Fixed: 621214
Change-Id: Icee051bd37c389f31a010b51ffaf5d46854306b5
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
Signed-off-by: Dilip Kota <c_dkota@codeaurora.org>
cpufreq: cpu-boost: Don't register for cpufreq notifiers too early

The cpufreq notifiers should be registered only after all the data
structures used in the notifier callbacks have been initialized. So, move
the cpufreq notifier registration to a later point in the init function.

Change-Id: I043ab5bc0ebb98164c40549fe151a8d801c8c186
Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
ASoc: msm: Add 24-bit playback support for MSM8226

Add support for 24-bit playback in MSM8226 machine
driver. This change enables playback of PCM data whose
sample size is 24 bits.

Change-Id: I63966b291978b2816038a37c076626ad57b49ffe
Signed-off-by: Venkat Sudhir <vsudhir@codeaurora.org>
coresight: add device attribute for etr ddr mem size

Add device attribute to control ETR DDR memory size dynamically
for TMC configuration. This will help users to specify DDR trace
buffer size at runtime.

Change-Id: Ie1edef7f972435193c96dafb8a94fd6cce97ce6c
Signed-off-by: Sarang Joshi <spjoshi@codeaurora.org>
cma: Remove potential deadlock situation

A report was given of a deadlock situation on the cma_mutex:

mutex_lock(cma_mutex)   (*2)
dma_release_from_contiguous
ion_secure_cma_free_chunk
ion_secure_cma_shrinker
shrink_slab
try_to_free_pages
migrate_pages
alloc_contig_range
mutex_lock(cma_mutex)  (*1)
dma_alloc_from_contiguous
ion_alloc

We may need to free CMA allocations while a current CMA allocation is in
progress if CMA is freed from a shrinker. cma_mutex currently protects
two things: the bitmap indicating which pages are allocated/free and
serialization of isolation/migration calls on allocation. There is
no need to take the mutex on free calls though as the pages are
freed back into the system via the regular __free_page call. Move
the free_contig_range call outside the cma_mutex to break the
chain dependency. We can safely free the pages back into the system
before changing the bitmap without any risk of races.

Change-Id: I4989eb2891e502b08db8117a51bd86652e902778
CRs-Fixed: 619644
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
msm: kgsl: Fix memleak in IOMMU clock disable

IOMMU clock disable on timestamp allocates memory and passes
the pointer to event created, this memory should be freed
when the event fires.

Change-Id: Ia714550ce8a05958fb6668293cd0400a0f69d4af
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
gpio: qpnp-pin: Fix probe cleanup code

In case of probe failure cleanup code un-registers gpio chip
without checking if chip is registered with the gpio framework.
Add a variable to maintain the gpio chip registration status and
un-register gpio chip only if the variable is set.

Change-Id: I5453fa43e1ff63b590a36151100bbfd4822a73f1
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
(cherry picked from commit 68b3121549db24c90694b2054b9506df6249b9f3)
mmc: core: get drive types supported by eMMC cards

Get the various drive types other than the default supported
by the card.

Change-Id: I122971e4fb4a3ab98f0078ceafca3380e9c0e2d1
Signed-off-by: Krishna Konda <kkonda@codeaurora.org>