New usecase for flash driver requires to be trigger at EOF.
This change adds the new operation code support in flash
driver along with EOF enable support in crm and across
other drivers. Also to improve the performance, this change
adds the logic to dynamically update the subscribe event to
CRM, so that CRM can enqueue EOF events when Flash or any other
device add the request for EOF.
CRs-Fixed: 2633194
Change-Id: I2f68ac7fc6a4699debd39b64319728cdf17bbcfa
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
EEPROM Read using QUP I2C returns the number of bytes
read from the EEPROM, While CCI/SPI returns zero value.
Return Error only when if the value is less than zero.
CRs-Fixed: 2617882
External Impact: No
Change-Id: I9a9674366c10de4efce779f75dd36b293838c47b
Signed-off-by: Shankar Ravi <rshankar@codeaurora.org>
Turn off the flash while flushing if the flushed request
turns off the flash.
CRs-Fixed: 2576732
Change-Id: I546fc6b6ee79f492af905d163515eb19eed78f41
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
Missing video unregister was causing list delete corruption.
Also, there were double free errors in Sync and CRM driver. Fix
v4l2 issues by adding the missing unregister calls and changing
release callback to empty, because we are freeing it during
cleanup. Improve logging during bind/unbind to better reflect what
is happening.
CRs-Fixed: 2584631
Change-Id: Idc5db655d22df54e8bdb470d29896e10f6987796
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
Updates maximum number of supported camera id to 9
CRs-Fixed: 2584631
Change-Id: I00a595d784b38030a7996a8da930ecdeaf05835c
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
Add support for qti flash along with updated max current DT
property. Remove support for enable/disable regulator as it
is no-op since a long time.
CRs-Fixed: 2584631
Change-Id: I3305e7b6e4d6ef34d90d38f5f25cfa5b8b817f8b
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
The devm_kfree call in remove is unbalanced without a devm_kzalloc.
Add required kzalloc and free during probe to balance it.
CRs-Fixed: 2584631
Change-Id: I14164405e62036f7918b858d978afe454e4feb4a
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
Toggle reset register in common and reset programming sequence.
CRs-Fixed: 2615460
Change-Id: Iba17fa3b2014be0bc27236169cf8456a7f8ededd
Signed-off-by: Tony Lijo Jose <tjose@codeaurora.org>
Due to the asynchronous nature of platform probes, inter
dependency between drivers needs to be taken care during
kernel boot up. Component helper provides the facility of
adding matching drivers in a list ordered in the way we want
to bind those drivers. The CRM driver acts as component master
to make sure all slave drivers are bound before it returns
from its own bind call. Add support for serializing platform
probes through component framework.
CRs-Fixed: 2584631
Change-Id: I345da1d2b9cccf6021ac6fc899143013b7714ec4
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
There is no need to wait till timeout in case of NACK or
underflow error irq is raised, so notify thread for rd_done
completion. Also, correct the error mask to catch the NACK
error for Master 1.
CRs-Fixed: 2598605
Change-Id: Ib8a16ee119dd81f1384283ac7e9f82d3ac2588bb
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
As per HPG revision L, there's a difference in the DPHY combo-mode
sequence settings between lito v1 and v2. This change adds a
separate sequence for lito v2, csiphy version 1.2.2.2.
CRs-Fixed: 2591712
Change-Id: Ic535bd2c98f47c33aa689d0e1bfe07d7dac8d9a2
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
If any subdev is reporting Nack, cci hardware gets into resetting.
During resetting if sensor tries to apply Init setting, it fails.
This change adds retry for INIT setting to reapply after sometime.
CRs-Fixed: 2598605
Change-Id: Iff13014d74abe6aebaec6cd428811de9d865f090
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Add a high-to-low transition in the CTRL0 register
during the common power-up sequence.
CRs-Fixed: 2580437
Change-Id: I66541d3d787fa2f161e5d8e647fb11c8075a1947
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
Correct the queue size for cci version 1.2 as below,
1. Queue 0 size = 64.
2. Queue 1 size = 16.
CRs-Fixed: 2594541
Change-Id: Ifc9407427fe2bf0996c77dc00c5dfe7e5ba22140
Signed-off-by: Tony Lijo Jose <tjose@codeaurora.org>
Currently image sensor need single source of the regulator per
category. Some sensor needs extra analog voltage for the functionality,
which require to draw power from multiple voltage regulator sources.
This change extends supports to add multiple voltage sources for
analog voltage.
CRs-Fixed: 2584631
Change-Id: I2d76cfb0fb971758c0d596ffd543aa3926a8886d
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Currently camera modules platform registration/remove function
is being called as a part of module_init function individually.
Building camera as module, current infrastructure cannot support
it, as DLKM only support single module_init/exit function.
This change enables that support by combining all platform
entry/remove functions centrally. Also, remove all submodule
makefiles and combined into one root makefile in order to generate
single kernel object file to dynamically loading the kernel module
in case of DLKM compilation.
CRs-Fixed: 2569808
Change-Id: I59db3ed6cef60123e474db2f222c39836056bd6e
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
Replace cma_alloc() api with vmalloc() in order to accommodate
kernel upgrade and DLKM/Builtin support.
CRs-Fixed: 2572607
Change-Id: If8caaefe5ac333998bd8c4868f16e586ee749e8a
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Supporting read operation for sensor and
sub modules OIS and actuator.
CRs-Fixed: 2538801
Change-Id: I83ad154dd577d5a664c4d68792a90489e725fbfd
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Signed-off-by: Sureshnaidu Laveti <lsuresh@codeaurora.org>
Add a transition of 1 to 0 in the PHY reset register
during the PHY reset sequence to fix UNBOUNDED_FRAME
errors for CPHY sensor.
CRs-Fixed: 2563019
Change-Id: I019e4cfdfa2042416e62b306dca0448d6a05c3b8
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
Adds fixes to makefile in order to support legacy kernel build systems.
CRs-Fixed: 2560543
Change-Id: Iab571871e5171aab501c41496cc09e3c5d942985
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
Fixes cci_get_subdev to return NULL or computed value depending on
camera driver configuration.
CRs-Fixed: 2554484
Change-Id: I79933ddf28e2c0d23739308b57b5b40d3b56d78e
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
DPHY combo mode bring up sequence is missing with some
important register settings. Correct and update required
register setting to bringup DPHY combo mode.
CRs-Fixed: 2545921
Change-Id: I1dfb71f1775aa6d6b1173a7de7f14ce74eac08e1
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
DPHY mission mode sequence is not full functional for
mission mode. Correct and add mandate register settings
for the bringup of DPHY mission mode.
CRs-Fixed: 2545921
Change-Id: Ia1bbf496c5aa993cf0e404c81f7b69b7b889c6f1
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>