-For ov32c4c,must write reg 0x1001=0x4 to switch iic addr to 0x20
before any iic operation.
-add preInitSetting,it will be wroten into sensor before init.
-add IICAddrSwitch,it will be wroten into sensor before probe.
Change-Id: I0d0d3959371355843fc4e384042e4ad44a42243d
Signed-off-by: chenlj26 <chenlj26@motorola.com>
Reviewed-on: https://gerrit.mot.com/2218769
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Liu <liuwang2@lenovo.com>
Reviewed-by: Shuo Wang <wangsh18@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Submit-Approved: Jira Key
detalis:
switch the cci device to read the flash ID
Change-Id: Idf29474ca4946afb122339eeefe01b7dacfc0485
Signed-off-by: liuzy55 <liuzy55@motorola.com>
Reviewed-on: https://gerrit.mot.com/2191857
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Long Cheng <chengl1@motorola.com>
Tested-by: Jira Key
Reviewed-by: XiaoFeng Wang <wangxf32@lenovo.com>
Reviewed-by: Shuo Wang <wangsh18@motorola.com>
Reviewed-by: Xingyun Fu <fuxy7@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Submit-Approved: Jira Key
Read ois status and mode in vsync thread.
If ois is not enabled and not in move mode, skip vsync handle.
Change-Id: I2ddbf839b089da75550aef03b63fe136cbd4bc43
Signed-off-by: liuwang2 <liuwang2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2175243
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: XiaoFeng Wang <wangxf32@lenovo.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Submit-Approved: Jira Key
Adding back: msm: camera: ife: Add ife num outport bound checks. QC helped us to
investigate the stability issue on Berlin/BerlinNA caused by the reverted change.
ISP output number was being set incorectly on camx for Astro165.
This reverts commit f3bb3c280110fb2961afac73d214f1411e0cb839
Change-Id: I3e9aac8ae3bf81ccb6ffa7434a8db609c3c76525
Reviewed-on: https://gerrit.mot.com/2165129
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Gilberto Gambugge Neto <gambugge@motorola.com>
Reviewed-by: Monica Mabuchi <monicam@motorola.com>
Submit-Approved: Jira Key
Qcom cci read function will use kzalloc()/kfree() to alloc temp
buf for cci read data.
As ois vsync irq thread use cci read very frequently,
so don't alloc/free temp buf when cci read.
Change-Id: I67a912d6ef5ba3f1820d5b571ff5bd55f8c1f561
Signed-off-by: liuwang2 <liuwang2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2155763
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: XiaoFeng Wang <wangxf32@lenovo.com>
Reviewed-by: <liuzy55@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Submit-Approved: Jira Key
sm6375 cci only support read 0xE bytes each time.
if we read 0xE bytes, it will access invalid memory.
so change to read 0xC bytes each time.
Change-Id: Id59620df4e5cb16bfb31396fdc6fc65c60449600
Signed-off-by: liuwang2 <liuwang2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2155699
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: XiaoFeng Wang <wangxf32@lenovo.com>
Reviewed-by: <liuzy55@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Submit-Approved: Jira Key
when vsync arrived, ois data has updated.
read it in the vsync thread.
Change-Id: I1bde6a76cf85d051cdd72bdff7a6df91364c906c
Signed-off-by: liuwang2 <liuwang2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2143947
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: XiaoFeng Wang <wangxf32@lenovo.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Submit-Approved: Jira Key
-On xpeng,rear main camera s5khm2 will have two type(SP03&SD03), we need
set correct DVDD voltage for each sensor per module pin_20 value.
-Use gpio_48 to read module pin_20
-1 means hm2SP03,DVDD is 1.1v. 0 means hm2SD03,DVDD is 1.05v.
Change-Id: I119d9c17795867c84b21ff0e8afa6b69f0579778
Signed-off-by: wangshuo18 <wangshuo18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1960645
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Shuo Wang <wangsh18@motorola.com>
Reviewed-by: Ji Zhao <zhaoji1@lenovo.com>
Reviewed-by: Bolei Shang <shangbl1@lenovo.com>
Reviewed-by: Zhuoran Xu <xuzr3@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
-when use quick-draw to open camera,vibrator will be trigger first,and
mot_acatuator will power on and pull lens to specify DAC position,
DAC is 900 on berlin.And then camera will take control of
actuator and init actuator,this will cause lens fall back from a
high position to a low position,it will cause a obvious hit noise.
-This change will move lens back to low position step-by-step,befor
camera take control of actuator.
-It will cause about 38ms delay,will affect focus lock performance of
opening tele camera after vibration.
Change-Id: Icded21d8a863af79abcb9e9f98559757158d75ba
Signed-off-by: wangshuo18 <wangshuo18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1989392
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Shuo Wang <wangsh18@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
-Sometimes system will suspend during the delaywork.
so add wakelock to ensure system is awake.
-port from 1984717
Change-Id: Ie081d6d3e6642c7d6f77b2a1f3eb9a3d82c9f69c
Signed-off-by: wangshuo18 <wangshuo18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1985991
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Zhuoran Xu <xuzr3@motorola.com>
Reviewed-by: Bolei Shang <shangbl1@lenovo.com>
Reviewed-by: Shuo Wang <wangsh18@motorola.com>
Reviewed-by: Yongqin Wan <wanyq1@motorola.com>
Reviewed-by: Zhilong Wang <wangzl30@motorola.com>
Reviewed-by: Quanlin Zhu <zhuql3@motorola.com>
Submit-Approved: Jira Key
1.Reduces the number and length of launch_lens,to reduce delay of vibrating.
-Optimize delay of vibrating,but it still have about 110ms delay.
2.Do not init actuator when camera APP is holding actuator.
-Fix the wide camera image shaking issue when the phone was vibrating
Change-Id: I7ee1c1a063cb6428d36544b6958e1b2f19f518ed
Signed-off-by: wangshuo18 <wangshuo18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1976594
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Liu <liuwang2@lenovo.com>
Reviewed-by: Darong Huang <huangdra@motorola.com>
Reviewed-by: Jian Zhang <zhangjo@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Xingyun Fu <fuxy7@motorola.com>
Reviewed-by: Qiang Guo <guoq8@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
-On berlin gt9772, according to KP's testing,safe DAC pose is 900, it's too
close to the edge,and may cause a small tick noise.So use launch_lens to move
lens step-by-step to reduce tick noise.
-It may cause about 180ms delay to move lens to specify location.
-This change just take effect during vibrating, don't affect normal camera.
-add some delay after camera action,to allow lens to be pulled into position
-try to init cci again when meet cci init failed on the first time.
-change log level and add some debug method to debug low probability resonance
noise issues on berlna
Change-Id: I7188a5fe2a7697af19b6830fc82a5f99195b7c44
Signed-off-by: wangshuo18 <wangshuo18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1954392
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Wang Liu <liuwang2@lenovo.com>
Reviewed-by: Zhilong Wang <wangzl30@motorola.com>
Reviewed-by: Bolei Shang <shangbl1@lenovo.com>
Reviewed-by: Darong Huang <huangdra@motorola.com>
Reviewed-by: Xu Ji <jixu@motorola.com>
Reviewed-by: Jian Zhang <zhangjo@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
-According KP's request,update DAC value to 900 for gt9772 on berlin.
-This value may cause a small hit noise when actuator power on during vibrating.
Change-Id: If366e101d0319fda77458827f400d91ad06f83cc
Signed-off-by: wangshuo18 <wangshuo18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1949296
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Shuo Wang <wangsh18@motorola.com>
Reviewed-by: Zilong Zhang <zhangzl7@lenovo.com>
Reviewed-by: Bolei Shang <shangbl1@lenovo.com>
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Submit-Approved: Jira Key
-To eliminate the resonance noise during system vibrator vibrating, set actuator to
specified DAC position(480 on GT9772), then the resonance noise can be obviously improved.
To achieve the conbination between vibrator and camera AF actuator,we implemnte:
- Actuator separately control during camera power off.
- Actuator policy to avoid vibrating disturb normal camera AF.
- reinitialize when the safe_pos parameter is manually configured.
Change-Id: I8f674eb441e8382f4de77acbca27179f8302139e
Signed-off-by: wangshuo18 <wangshuo18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1928778
Reviewed-by: Shuo Wang <wangsh18@motorola.com>
Tested-by: Jira Key
Reviewed-by: Long Cheng <chengl1@motorola.com>
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
-To eliminate the resonance noise during system vibrator vibrating, set actuator to
specified DAC position(480 on DW9714), then the resonance noise can be obviously improved.
To achieve the conbination between vibrator and camera AF actuator,we implemnte:
- Actuator separately control during camera power off.
- Actuator policy to avoid vibrating disturb normal camera AF.
port from (CR),fix berlna wide camera resonance noise issue.
-Port from (CR): cam/actuator: Add CCI access lock to avoid conflicts.
Usually actuator initial setting will execute power down reset(PD), actuator can't respond
CCI access for a while after PD. Add lock to avoid access actuator while PD operation.
-Port from (CR): cam/actuator: Create separate work queue for park lens.
Park lens may cost more than 100ms for different camera modules, create seperate
work queue for actuator to avoid park lens operation block system_wq too long.
-Port from (CR): cam/actautor: Optimizing park lens for vibrating.
Move lens to noise reduction postion after camera exited.
-Port from (CR): cam/actuator: Avoid error releasing CCI/regulator.
Avoid unbalanced aquire/release of CCI/regulator when actuator init failed.
Due to when CCI init for vibrator failed, regulators had been released.
-For new baseline sm8350,compile this standalone actuator diver into camera.ko
Change-Id: If77d10badfb4147c467ebae238f4e6af317d466f
Signed-off-by: wangshuo18 <wangshuo18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1906964
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Darong Huang <huangdra@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Xu Ji <jixu@motorola.com>
Reviewed-by: Jian Zhang <zhangjo@motorola.com>
Reviewed-by: Zhuoran Xu <xuzr3@motorola.com>
Reviewed-by: Bolei Shang <shangbl1@lenovo.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
Add new fields to OIS data structures, support to apply ois
preprog data, precoeff data and postcalibration data
Change-Id: Ic8546882e053c10981698bc5ef5182571e6afc0b
Signed-off-by: wangdw10 <wangdw10@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1898786
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Zhuoran Xu <xuzr3@motorola.com>
Reviewed-by: Xu Ji <jixu@motorola.com>
Reviewed-by: Shuo Wang <wangsh18@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
[detail]
Read using address and data type provided in xml
CRs-Fixed: 2675042
Change-Id: Ice85f2ce4a6fa38a7de4b1bf4233449c52cd39e2
Signed-off-by: Vishal Verma <vishverm@codeaurora.org>
Reviewed-on: https://gerrit.mot.com/1761431
Submit-Approved: Jira Key
Tested-by: Jira Key
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Wang Liu <liuwang2@lenovo.com>
(cherry picked from commit cab465769a5a610d37bccb99e8fb722ab2ffe188)
Reviewed-on: https://gerrit.mot.com/1763255
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
(cherry picked from commit f1f2e1f642f7d1526d9ceb51e9947ceb98292862)
Reviewed-on: https://gerrit.mot.com/1893806
Reviewed-by: Shuo Wang <wangsh18@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Jian Zhang <zhangjo@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Reviewed-by: Zhuoran Xu <xuzr3@motorola.com>
-Adds Active OIS packet decoding logic
-Adds logic to read Active OIS data out of the OIS chip
Change-Id: I428e912d401fd18d555df62fe4cdea1d8a3ca18d
Reviewed-on: https://gerrit.mot.com/1738888
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jian Luan <jamesluan@motorola.com>
Submit-Approved: Jira Key
-Add new fields to OIS data structures
-Add capability to program OIS more flexibly
Change-Id: I97988cc3a6d7fa2241016bd4a269618c8ff10ad0
Reviewed-on: https://gerrit.mot.com/1736525
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Rav(CR) Vembu <raviv@motorola.com>
Submit-Approved: Jira Key
In kernel 5.4, camera driver would compile to camera.ko as GKI requirements,
and cci_intf driver need to call cam_cci_get_subdev function,
so export symbol cam_cci_get_subdev to it.
Change-Id: Ic299d9135f147d703d082604d02b43d88b7eb5ef
Signed-off-by: liuwang2 <liuwang2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1679152
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key