Commit Graph

9 Commits

Author SHA1 Message Date
Ankur Pawar
41762524a3 media:i2c: fix ar1335 control command
When ar1335_common.c was ported to K5.15 it was refactored
based on the review comments. During that process index
in mcu_send_ctrl_cmd() was set to 0xFFFF which was causing
issue in setting sensor format. Pass the index from the
caller of mcu_send_ctrl_cmd().

Bug 4389285

Change-Id: Ic84a8de58051fe947f0f4d6597d1a55bc29ef9e6
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3024535
cherry-picked fom <7096cb09a537bb6385489bc93148b80ff5e8fdd9>
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2848593
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Shubham Chandra <shubhamc@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-27 20:30:09 -08:00
Laxman Dewangan
e49269929e media: ar1335: Use conftest to determine remove return type
Use conftest to determine the return type of .remove() of
struct i2c_driver is int or void type instead of kernel version.

The return type got changed with commit ed5c2f5fd10d ("i2c:
Make remove callback return void")

Bug 4387902

Change-Id: Iceb50b0c9cd78fefb35aef0831b1ea7e8f74d619
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037915
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-19 19:38:51 -08:00
Laxman Dewangan
1eab65044c i2c: Use conftest to find return type of .remove of i2c_driver struct
Use conftest to determine the return type of .remove() of
struct i2c_driver is int or void type instead of kernel version.

The return type got changed with commmit ed5c2f5fd10d ("i2c:
Make remove callback return void")

Bug 4387902

Change-Id: Id64466613156e0efaf6cce7492d70cab1c1d1af7
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3036799
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-18 22:09:58 -08:00
Laxman Dewangan
2884c4b380 i2c: Use conftest to find if i2c driver probe has i2c_device_i2d arg
Determine if probe of struct i2c_driver has i2c_device_id argument
or not.

This argument get removed from commit 03c835f498b5 ("i2c: Switch
.probe() to not take an id parameter") form Linux 6.3.

Bug 4346767

Change-Id: Ife73b29946246fce5bfcedcabe15992432d86348
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3030809
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-08 18:37:09 -08:00
Kartik Rajput
e0558096ef oot: drivers: Replace gpio_cansleep() with gpiod_cansleep()
Upstream commit "7d0b80647f73"

[gpiolib: remove unused gpio_cansleep()]

Removed gpio_cansleep() API as there are no upstream users.

Replace the usage of gpio_cansleep() with gpiod_cansleep(). This is also
backwards compatible with older Kernels.

Bug 4276500

Change-Id: I37230d4371298d724e2311c803409108e93a4fed
Signed-off-by: Kartik Rajput <kkartik@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2978834
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-09-14 20:45:05 -07:00
Jon Hunter
79e8e9cf3a media: Allow drivers to be built without V4L2
When building the NVIDIA out-of-tree drivers against 3rd party Linux
kernels where V4L2 support is not be enabled by default, the camera
drivers fail to build. Although this is expected, it is preferred that
the driver can still be built but then fail when loaded. Update the
camera drivers to guard around the V4L2 functions so that the drivers
can still be built but will return an error where needed.

Bug 4119327

Change-Id: I3a1115e5f0451153831c396244c01d7525cb51a1
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2979254
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-09-14 13:32:09 -07:00
Ankur Pawar
f4b8e44a5e media: i2c: camera cert-c and coverity fixes
Cert-C fixes in camera ar1335, imx219 and imx477 driver.

Cert-C
CID:566165
CID:566166
CID:566168
CID:566169
CID:566170
CID:566171
CID:683423
CID:566021

Coverity
CID:10179834

Bug 3959323

Change-Id: Id68deab8051206b6eae3da917d83c32365186fc5
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2939548
Reviewed-by: Praveen AC <pac@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-13 22:21:06 -07:00
Ankur Pawar
0d04975aed media: i2c: Fix camera driver Coverity defects
Fix the below Coverity defects for lt6911uxc driver

Unchecked return value
CID: 10174208

Dereference null return value
CID: 10174210

Unchecked return value
CID: 10175851

Bug 3952896

Change-Id: I43132879e31f8a27db8fd41c717d598fb2c33490
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2915435
Reviewed-by: Praveen AC <pac@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-21 01:24:49 -07:00
Ankur Pawar
8a40c778bf media: add ar1335 sensor driver
Add ar1335 camera sensor driver code,
firmware bin and makefile changes.

Bug 3583587
Bug 4111978

Change-Id: I340eb797233fb62ca9e107d0f774f1110e4c27fe
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2889070
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-06-24 07:23:21 -07:00