msm: camera: Add proper error handling during msm_open

Currently VFE and VPE are singleton. Hence only one camera
instance can use the ISP modules. Added check for the same.
Also added proper error handling to reset the reference count
and free the pcam instance incase of failure

CRs-Fixed: 340315
Change-Id: Ia12a3f305aa03eb70b9ce8b5ed526f1d5e4e7568
Signed-off-by: Sunid Wilson <sunidw@codeaurora.org>
msm: qdss: add support for qdss_get/put and qdss_enable/disable

Implement qdss_get/put and qdss_enable/disable external apis. Add
qdss platform virtual device and platform data to support the
implementation. Also split the QDSS driver initcall to allow early
init of data structures required to support qdss_get calls made by
other trace source drivers that want to use the services of the
qdss driver.

QDSS source drivers will use these apis to setup QDSS to collect
the trace data that they will generate. QDSS logical driver will
internally call the apis for the etb, funnel and tpiu device
drivers.

Change-Id: I06ece3fba110398b346c86f8b479153c60777540
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
msm: qdss: separate initialization of different drivers

Let all drivers (etm, etb, funnel, tpiu, qdss) initialize separately
to allow them to initialize at different initcall levels when required.

Change-Id: I6b0a36785f2e114cb1ac209fb0c2209733ad38dd
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
msm: qdss: switch to using qdss apis in the etm driver

ETM driver is a qdss source and currently directly calls the etb,
funnel and tpiu apis causing tight coupling between the drivers.
Instead switch to using the new external apis (qdss_get/put,
qdss_enable/disable) provided by the qdss driver.

Qdss apis will be used by other qdss sources as well and going
through the qdss driver apis will decouple the etm source driver
from the link (funnel) and sink (etb, tpiu) drivers that are part
of the qdss block.

Change-Id: I0dc64d88aa9647787946ba1d4e351231a74a3cf9
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
msm: qdss: enable qdss support for 8064

This allows qdss sources (krait pft trace and oxili trace) to be
used for debugging on 8064.

Change-Id: Iee6305ee8cb4522b63b48dc8b9f66757ea36fd4e
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
usb: diag: Avoid NULL pointer dereference in debugfs

The debugfs entry functions used to read and clear the statistics
counters loop over the list of open diag channels. However, a
channel might not be bound to a gadget interface if diag_function_add
doesn't get called, hence its priv_usb member may be NULL. In that
case simply avoid accessing it altogether as its counters aren't used
anyway.

CRs-fixed: 346598
Change-Id: Icbd84ae0df83a5fe4c62b19fd7c95585e8e6e491
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Merge "msm: kgsl: flush cache otherwise memory will be uninitialized" into msm-3.0
Merge "msm: memory: Fix section mismatch warning" into msm-3.0
Merge "Bluetooth: Allow AMP move to wait for Cfm Rsp before LL complete" into msm-3.0
[media] rc: Add support for GPIO based IR Receiver driver

Adds GPIO based IR Receiver driver. It decodes signals using decoders
available in rc framework.

Change-Id: Ifc4cbb6d5a507aeb9671fb0d559b97b1a95ea09c
Signed-off-by: Ravi Kumar V <kumarrav@codeaurora.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
msm: board-msm7627a-wlan: Enable QRD3 and QRD7 wifi

Enable wifi by configuring wlan sys reset en gpio for
QRD3/QRD3-1 and QRD7 devices.

Change-Id: I61dc2a5eaf62b373b372a52f96f19809f70e7e80
Signed-off-by: Aparna Mallavarapu <aparnam@codeaurora.org>
Merge "ASoC: WCD9310: Add 5ms delay during slimbus port shutdown" into msm-3.0
Merge "arm: gic: Add empty stub for gic_set_irq_secure function" into msm-3.0
Merge "of: spmi: Remove excessive loop in dev-container traversal" into msm-3.0
Merge "msm_serial_hs_lite: Decouple line number from device ID" into msm-3.0
Merge "msm: qdss: separate initialization of different drivers" into msm-3.0
Merge "of: spmi: Verify that nodes are available before creating devices" into msm-3.0
Merge changes Iee6305ee,I0dc64d88,I06ece3fb into msm-3.0

* changes:
  msm: qdss: enable qdss support for 8064
  msm: qdss: switch to using qdss apis in the etm driver
  msm: qdss: add support for qdss_get/put and qdss_enable/disable
msm: clock-8960: Add xo mapping for msm_xo driver

The msm_xo driver needs a mapping to the CXO clock so that it can
turn the buffer on and off via the clock API. The table for 8930
was added around the same time the the patch to move msm_xo to
the clock API was merged so this was missed. We replace the USB
mapping as well because the usb driver is voting on D0 via the
msm_xo interface and not the clock API.

Change-Id: I506a5e54448c994a64af763360b4c080b09b5708
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Bluetooth: Ensure socket pointer is set during callback

Fix issue where when setting up an AMP link the socket pointer
is not set when the logical link complete callback is called,
resulting in the L2CAP channel being disconnected.

The socket pointer must be set before the HCI logical link
create command is sent, as it is possible for the logical link
complete event to arrive before the HCI command send logic
has returned.

Change-Id: I5d89c14d45bd6b4cf47d5754f822b435ce8076a8
Signed-off-by: Peter Krystad <pkrystad@codeaurora.org>
CRs-fixed: 344553