msm: camera: add kernel driver for ov8865/ov5648

Support for 8M Omnivision image sensor and 5M
Omnivision image sensor for 8926 platform.

Change-Id: I9d801a59de28a6ac4c6db3c7088afd46fe3dcb26
Signed-off-by: Su Liu <suliu@codeaurora.org>

Conflicts:
	drivers/media/platform/msm/camera_v2/sensor/Makefile
msm: camera: Change CCI I2C write interface

Every CCI I2C write involves one I2C transaction to CCI core.
Since CCI queue has maximum of 64 words, Write CCI commands
to CCI core and handle it in hardware.

Change-Id: Ic3b03bf70b1a5a23d4bdd42d2cbf8528fa8bd413
Signed-off-by: Sreesudhan Ramakrish Ramkumar <srramku@codeaurora.org>
msm:camera: Add support for AV time stamp for VT call

For vt call we need to update the camera buffers with AVTimer
timestamp instead of normal kernel time stamp to prevent
AV sync issues

Change-Id: I4aecf03c45b7dc36c255b122385cee561c7ae40f
Signed-off-by: Abhishek Kondaveeti <akondave@codeaurora.org>
Signed-off-by: Alok Kediya <kediya@codeaurora.org>
msm: camera: Kconfig Add support for IMX134

Support for Omnivision image sensor imx134 on
8610 platform.

Change-Id: I2909442c048cbb94587ebf63d0a77c1b568d9f8a
Signed-off-by: Aditya Jonnalagadda <ajonnala@codeaurora.org>
msm: camera: Add kernel driver for imx134

Support for image sensor imx134 on 8610 platform.

Change-Id: I1e3cfc31baec01e043cd7ae20adb681e0aab0d61
Signed-off-by: Aditya Jonnalagadda <ajonnala@codeaurora.org>
msm: camera: Enabling all CSI clocks for ISPIF hw reset.

To perform complete ISPIF HW reset need to enable all CSI
clocks. Earlier only csi0 clock was enabled, causing problems
in reseting RDI interface. Also added change to disable clocks
before returning from hw reset if there is a timeout.

Change-Id: Ia0befc058f06596688b9310ee6c8bf4b017a13ce
Signed-off-by: Sagar Gore <csgore@codeaurora.org>
msm: camera2: cpp: Reset MICRO block before clock enable

The MICRO can be triggered to enter in bad state when the
corresponding clock is enabled. This patch resets MICRO block and
then enables clock.

Change-Id: I08128211e561026eed76041e73fa971ba369576a
Signed-off-by: Rajakumar Govindaram <rajakuma@codeaurora.org>
msm: camera: To prevent the unbounded copy

To prevent the unbounded copy in EEPROM driver
to avoid kernel memory disclosure

Change-Id: Ib7f8719351ff72720c55394fdd0fcd5e876e2c09
CRs-fixed: 553389
Signed-off-by: Cherian Deepak <dcheri@codeaurora.org>
msm : camera: Implement Video HDR on IMX134.

Add videoHDR support for kernel and also change number of
write master from 4 to 5 inorder to accomodate stats for
video HDR.

Change-Id: I5314a8972fc17aebc640c4de76c4ce3722cfe27f
Signed-off-by: Aditya Jonnalagadda <ajonnala@codeaurora.org>
msm: camera: fix signal error for function msm_post_event

Fix msm_post_event timeout error due to signal,
if return ERESTARTSYS, will re-call wait_event_interruptible_timeout.

Change-Id: I37b8f71564528dea1c436769adcead80bbc1ed3a
Signed-off-by: chiz <chiz@codeaurora.org>
Signed-off-by: yuyang <yuyang@codeaurora.org>

Conflicts:
	drivers/media/platform/msm/camera_v2/msm.c
msm: camera: Fix various small issues in vpe driver

Upper and lower bound checks are enforced for num_buff
which is passed from userspace and memset inst_info
to zero to avoid unwanted data passed to userspace

CRs-fixed: 547927
Change-Id: I0d589ef26e57bb26dc006b5927461edcc95e593e
Signed-off-by: Hariram Purushothaman <hpurus@codeaurora.org>
msm: camera: camera power up sequence optimize

Fix the high latency of camera cold start,
optimize hi256 sensor power up sequence.

Change-Id: I4938a412e993d9ecbc3d74b4c927231e1357b424
Signed-off-by: chiz <chiz@codeaurora.org>
msm: camera: Prevent camera suspend while active

Prevent camera from getting suspended from external
sources while the camera is active

Change-Id: Iaf3ebe8bb3ea568fb76bdcadacfe1923a872ce73
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
msm: camera: Checking an enum value greater than zero

An enum value cci_i2c_master is not checked to be greater than 0.
Add the check.

Change-Id: Ibe75ab7155def45d81b8127c5eda3fa2ed570bce
Signed-off-by: Xu Han <hanxu@codeaurora.org>
msm-camera: Add placeholders  for 3A features in YUV sensor for 8x10.

Adding support for 3A feature in PORed YUV sensor for 8x10.Features will
not be functional because we are just adding placeholders for now.

Change-Id: I8c99881d50a3b2306d2b9c05844725c13c5e292b
Signed-off-by: Chandan Gera <cgera@codeaurora.org>
msm: camera: support simple led flash controlled by one gpio for SKUAB

SKUAB uses a low cost led for camera flash, the led is driven by
system power, and use a transistor controlled by external pin to
gate its on/off state. This is also a single mode flash led with
no difference between flash mode and torch mode. So we need to add
support for this in camera driver.

CRs-fixed: 561538
Change-Id: Ia0c9f6a33e404457c018a719d68fe5f7a6f22029
Signed-off-by: Xu Kai <kaixu@codeaurora.org>
msm: actuator: fix to prevent untrusted pointer to lead DoS

fix to prevent untrusted userspace pointer in actuator kernel
driver to lead DoS

Change-Id: I1b64270deb494530d268539e7b420be5ec79b658
Signed-off-by: Vasko Kalanoski <vaskok@codeaurora.org>
msm: actuator: fix to prevent kernel heap buffer overflow

fix to prevent kernel heap buffer overflow allows user
controlled data to be written to the heap via the
msm_camera actuator IOCTLs

Change-Id: I4458831e28e0081fb2f5ae55506be866100e1b4f
Signed-off-by: Vasko Kalanoski <vaskok@codeaurora.org>
msm: cci: fix for invalid error handle

fix for invalid error handle in msm cci
- msm_cci_flush_queue function never return
error because variable rc is unsigned int
- msm_cci_init function return result int32_t
but variable rc is int

Change-Id: I2610b08f4eceedfbb8bd07d8027310f43b9ee6bf
Signed-off-by: Vasko Kalanoski <vaskok@codeaurora.org>
msm: camera: Fix for invalid kernel memory access

Adjust the length of the command based on command type
to avoid invalid memory access in ISP driver.

Change-Id: Ie1c23b45426f9598dba3ad1ee91e6598e8232134
Signed-off-by: Aditya Jonnalagadda <ajonnala@codeaurora.org>