msm: buspm: Correct size type in buspm_xfer_req

Variable size inside buspm_xfer_req
can be negative and thus would be a
large positive number resulting in arbitary
Kernel read. This patch corrects this value.

CRs-Fixed: 563529
Change-Id: I877db6960530d6c7d1486da9cfdc15a43e57e152
Signed-off-by: Sana Venkat Raju <c_vsana@codeaurora.org>
msm:camera: Limit prints in default cases

Change pr_err to pr_err_ratelimited in default
case prints of userspace ioctl. pr_err would
keep printing when passing invalid parameters
in ioctl which would cause watchdog reset.

Change-Id: Ic35f63c4e8923aa49ac013a59af08cae4d3d176b
CRs-fixed: 586318
Signed-off-by: Yiduo Wang <yiduow@codeaurora.org>
msm: cpp: Fix potential dereference of NULL pointer

Pointers should be checked for NULL before they are
dereferenced. If it is not done segmentation fault
can appear.

Change-Id: I8b36f3553292b41386e231f12867ff78f8e2379d
Signed-off-by: Iliya Varadzhakov <ivarad@codeaurora.org>
msm: camera2: cpp: Append frame buffers to the list

In case of late buffer allocation, allocated buffers
have to be appended to the existing queues.

Change-Id: Ie14f00038e86b9d7c8caa01587a2ed1aee7d80e8
Signed-off-by: Iliya Varadzhakov <ivarad@codeaurora.org>
ASoC: msm: Add sample rates to PCM front-end

Add two additional sample rates to the PCM front-
end: 88200 KHz and 176400 KHz.

CRs-Fixed: 601715
Change-Id: If61fb034a60f41b5c63a00fd764da50db7333cb5
Signed-off-by: Kenneth Westfield <kwestfie@codeaurora.org>
ASoC: msm: qdsp6v2: Add upper bounds check on index

Add upper bounds check for return value of
q6audio_get_port_index().

CRs-Fixed: 575227
Change-Id: I263fc6d759beffd2c2fecc7794c279939ab25401
Signed-off-by: Kenneth Westfield <kwestfie@codeaurora.org>
ASoC: msm: qdsp6v2: Check for null pointers

Add check for null data pointer in
adm_callback() and log error message if
true.

CRs-Fixed: 575222
Change-Id: I88a4d19cc2e78610249e404bce93831557995fab
Signed-off-by: Kenneth Westfield <kwestfie@codeaurora.org>
Merge "msm: buspm: Correct size type in buspm_xfer_req"
Merge "Merge "msm: buspm: Correct size type in buspm_xfer_req""
USB: msm_otg: Print warning message when not able to turn USB CLKs

This change prints warning message failures with call stack when
not able to turn ON USB core_clk and pclk in msm_otg_resume() and
msm_otg_link_clk_reset()

CRs-Fixed: 612896
Change-Id: I9f53751b9ff0254205231656e01ed84302067bef
Signed-off-by: Saket Saurabh <ssaurabh@codeaurora.org>
Merge "Merge "Merge "msm: buspm: Correct size type in buspm_xfer_req"""
Merge "Merge "msm: buspm: Correct size type in buspm_xfer_req""
msm: camera: Improve calibration data parsing.

Add checksum verification for calibration data.
Regroup calibration data parsing into a
msm_eeprom_memory_block_t struct, so that related
routines can be reused to read other data later.

Change-Id: Idc21ee132f609131ebd29903f8ac515ee800c204
Signed-off-by: Sreesudhan Ramakrish Ramkumar <srramku@codeaurora.org>
Signed-off-by: Vasko Kalanoski <vaskok@codeaurora.org>
(cherry picked from commit e69eab10d4b6df8a5b15d09ed367d4bb5ec5df09)
(cherry picked from commit afbdcd2e1a99968cbaf4f25b5debe70e9a1f279b)

Signed-off-by: Satish Kamuju <skamuj@codeaurora.org>
msm: camera: Multi module support in sensor architecture.

In current sensor architecture, one platform device is created for
every sensor defined in dtsi for that platform. It creates redundancy
since only one camera can be connected in camera slot for particular
target. To avoid this redundancy, create platform device for every
camera slot for that platform and probe using single compatible name
"qcom,camera" for all drivers. Add sensor utility functions to be
used by all camera sensors.

Change-Id: I135bda007f8eec2f339a6b3dbf1116c5ab600b94
Signed-off-by: Sreesudhan Ramakrish Ramkumar <srramku@codeaurora.org>
Signed-off-by: Evgeniy Borisov <eborisov@codeaurora.org>
Signed-off-by: Vasko Kalanoski <vaskok@codeaurora.org>
(cherry picked from commit 2e31f9d73a4f72d23cb5d9f5d81767cca678fa05)
(cherry picked from commit e052ef266ffe4848800d8cbd82d516d98bf5aa9f)

Signed-off-by: Satish Kamuju <skamuj@codeaurora.org>
ARM: dts: msm: camera: Add generic camera node per HW socket.

We create separate node per camera hardware socket.All cameras
connected to same HW slot using the same node. We can use this
node structure in multimodule camera architecture.

Change-Id: I5dcc62b624f41282f1609afb843320453e7e41b4
Signed-off-by: Sreesudhan Ramakrish Ramkumar <srramku@codeaurora.org>
Signed-off-by: Evgeniy Borisov <eborisov@codeaurora.org>
Signed-off-by: Vasko Kalanoski <vaskok@codeaurora.org>
(cherry picked from commit d0514e02267fab4b75bb5a55e1c4a53f99fdcef2)
(cherry picked from commit 4a85c776a01d6498b3bad0baf71f4170be0f69e7)

Signed-off-by: Satish Kamuju <skamuj@codeaurora.org>
ARM: dts: Add generic camera node for 8974MTP slot #2.

All cameras connected to HW slot #2 can use
this qcom,camera@2 node. Fix for 8974pro device
camera clocks.

Change-Id: I46126987c0b093f8851bcf00c6be963b72ffe0cb
Signed-off-by: Evgeniy Borisov <eborisov@codeaurora.org>
Signed-off-by: Vasko Kalanoski <vaskok@codeaurora.org>
(cherry picked from commit 542c9e76cce6f782c1b7e1ac312e64ea401bb28d)
(cherry picked from commit e1b9ae7ceaf6486b6ceecd59e3425da961914f5b)

Signed-off-by: Satish Kamuju <skamuj@codeaurora.org>
ARM: dts: Add generic camera nodes for apq8084 and msm8926.

Add generic camera nodes for apq8084 and
msm8926 devices. All cameras connected to
same HW slot can use the same node.

Change-Id: If456cddc1fb856693c8e6a6e1d06653a78fd7f3b
Signed-off-by: Evgeniy Borisov <eborisov@codeaurora.org>
Signed-off-by: Vasko Kalanoski <vaskok@codeaurora.org>
(cherry picked from commit 3cd48269db9b5e3aedcbdb12657fde74fb1b40cc)
(cherry picked from commit 3c1c2d1458f5bb2060f7e5cd9a7cefa6b3991a91)

Signed-off-by: Satish Kamuju <skamuj@codeaurora.org>
ARM: dts: Add generic camera nodes for msmsamarium.

Add generic camera nodes for msmsamarium
device. All cameras connected to same HW
slot can use the same node.

Change-Id: I890666a0d5f96b70c84d865a83411714fc6885ee
Signed-off-by: Evgeniy Borisov <eborisov@codeaurora.org>
Signed-off-by: Vasko Kalanoski <vaskok@codeaurora.org>
(cherry picked from commit 28294c07a02a6fed24a7639f580833a63c40461b)
(cherry picked from commit 725153673841199b2ca8c1227a6598eb5518189d)

Signed-off-by: Satish Kamuju <skamuj@codeaurora.org>
ARM: dts: Add generic camera nodes for msm8612.

Add generic camera nodes for msm8612 device.
All cameras connected to same HW slot can use
the same node.

Change-Id: Ie19cefad1a20481a83d30cb12f3e3a4353a7443e
Signed-off-by: Evgeniy Borisov <eborisov@codeaurora.org>
Signed-off-by: Vasko Kalanoski <vaskok@codeaurora.org>
(cherry picked from commit 5bfecef9c6bce838056d23fa98c3eed9b48b41d1)

Signed-off-by: Satish Kamuju <skamuj@codeaurora.org>
msm: camera: Camera multimodule fixes for 8x10 platform.

Improve generic sensor driver to support qnp and cci i2c
HW. This change is a bugfix for camera multimodule

Change-Id: I6451ea3fa8f1549ff8dc5257c2055d929fc89472
Signed-off-by: Evgeniy Borisov <eborisov@codeaurora.org>
Signed-off-by: Vasko Kalanoski <vaskok@codeaurora.org>
(cherry picked from commit 77452f7b83f91779f7f383e6ee5ad20dac9132d6)

Signed-off-by: Satish Kamuju <skamuj@codeaurora.org>