Jon Hunter
74c0a6d16d
drivers: Drop inline from driver remove wrapper
...
The driver remove function is a function pointer and therefore, it does
not make sense to define the function as an 'inline'. Update the
coccinelle script and drivers to remove the inline statement.
Bug 4749580
Change-Id: Ia03691b75c4edffe609f27468b911a92a5ddbd68
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233980
(cherry picked from commit 2c3a31c9b72785ee35ad079422b624f59a35f622)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3276870
Reviewed-by: Brad Griffis <bgriffis@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
2025-01-06 06:09:10 -08:00
Jon Hunter
15ca4ff659
drivers: Fix platform_driver remove for Linux v6.11
...
In Linux v6.11, the 'platform_driver' structure 'remove' callback was
updated to return void instead of 'int'. Update all the impacted drivers
as necessary to fix this.
Bug 4749580
Change-Id: I3bb5c549777f7ccad0e3f870373fdd25726ad7ed
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3182878
(cherry picked from commit 951b2423a8 )
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3210788
Reviewed-by: Brad Griffis <bgriffis@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
2024-09-11 04:39:43 -07:00
Laxman Dewangan
e94f3bb6d8
{isc,cdi}_mgr: Use gpiod_count() for getting number of GPIO
...
The API gpiod_count() returns the number of the GPIO in given
property. This API is supported from long and continue to
support.
Use this API instead of of_gpio_named_count() which is deprecated
from Linux 6.2.
Bug 4387902
Change-Id: I2b647b8645e0dd8ff743515ac999fe035e636dc5
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3035503
(cherry picked from commit 6627276f82 )
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3051588
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-01-14 13:09:25 -08:00
Laxman Dewangan
a6fc43ecb8
cdi_mgr: Enable build of cdi_mgr for Linux 6.2
...
The build of cdi_mgr driver was disabled for Linux 6.2
as there is change in API in core kernel.
Enable build of cdi_mgr driver with appropriate modification
in driver for Linux 6.2.
Bug 4346767
Change-Id: I6315482b593926e1382a0ffc9ca8aa9a27740d11
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3031551
(cherry picked from commit 9174561352 )
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3051589
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
Tested-by: Jonathan Hunter <jonathanh@nvidia.com >
2024-01-12 18:24:38 -08:00
Jon Hunter
020bdeded8
media: camera: Use conftest for devnode
...
Use confest in the camera CDI and ISC drivers to determine if the
'devnode' function pointer under the class structure to take a const
device struct.
Also fix the commit in conftest that introduced the change to the
'devnode' function pointer.
Bug 4346767
Change-Id: I66de39e079c13219e0ff3e7154c0e7ceb609a29d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3034763
(cherry picked from commit 891d093a76 )
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037031
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-12-18 19:09:38 -08:00
Jon Hunter
e1471516b0
media: camera: Remove devm_fwnode_get_gpiod_from_child
...
The function devm_fwnode_get_gpiod_from_child() was removed in Linux
v6.2. This function has always called devm_fwnode_gpiod_get_index() and
this was first introduced in Linux v5.5. Therefore, remove
devm_fwnode_get_gpiod_from_child() and always use
devm_fwnode_gpiod_get_index().
Bug 4346767
Change-Id: Ie94a20ffda67569962fa48d7104c8ff706be079d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3034777
(cherry picked from commit 75c908beb6 )
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037030
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
2023-12-18 19:09:27 -08:00
Jon Hunter
ce678a37b1
drivers: Add conftest test for class_create
...
In Linux v6.4, the module pointer argument is removed from the
class_create() function. Add a test to the conftest script that checks
if this argument for the class_create() function has been removed and
use the definition created by conftest to select which version of the
function is used.
Bug 4183168
Bug 4221847
Change-Id: I440e4b318001886cd0319bb3499ba33178475e8c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2989020
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-10-05 17:54:05 -07:00
Ian Kaszubski
6e4e41ce95
media: tegra: cdi-mgr: Fix deser power down IOCTL
...
Add missing power down implementation for the
CDI_MGR_IOCTL_DISABLE_DES_POWER ioctl.
Bug 4148683
Change-Id: I3c25ac9cdde8c7799cd60a3a78590f24637d4c7e
Signed-off-by: Ian Kaszubski <ikaszubski@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2962131
(cherry picked from commit befa29f775ca44a058a2c460f02ac0f77807c78d)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2943106
Reviewed-by: Vincent Chung <vincentc@nvidia.com >
Reviewed-by: Shiva Dubey <sdubey@nvidia.com >
Reviewed-by: Justin Kim (SW-TEGRA) <juskim@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-09-01 12:50:28 -07:00
Aniket Bahadarpurkar
3e51976226
tegra: cdi: Add delay while setting gpio
...
On p3898 platform, VCC_CAM can't handle high
inrush current when gpios are set in parallel.
Hence, a SW WAR is required to add a delay of 5ms
after a gpio is set.
Bug 4125801
Change-Id: Ib235cb00b5ef42c7255be5d212dd9e190630d7bc
Signed-off-by: Aniket Bahadarpurkar <aniketb@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2943541
(cherry picked from commit 6e44996aae022c9e46fb431b75d60c8499bcd874)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2953356
Reviewed-by: Dipesh Gandhi <dipeshg@nvidia.com >
Reviewed-by: Frank Chen <frankc@nvidia.com >
2023-08-16 18:39:52 -07:00
Vincent Chung
c7f12c1ae6
media: tegra: cdi-mgr: fault code for tmr eq fail
...
Add the CDI_MGR_GPIO_INTR_FAULT code, and emit it when interrupt timer
enqueue fails.
Jira CAMERASW-11945
Bug 3902416
Change-Id: I7459c2bd7160cf8552007a0e299ad1f2a1f47b1f
Signed-off-by: Vincent Chung <vincentc@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2901738
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Frank Chen <frankc@nvidia.com >
Reviewed-by: Shiva Dubey <sdubey@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-12 04:58:08 -07:00
Vincent Chung
be01df015d
media: tegra: cdi-mgr: support interrupt timeouts
...
Add support for configurable interrupt timers and event notification
queues to SIPL Device Block to mirror the CDAC (QNX) pulse channel
interface.
The CDI_MGR_IOCTL_INTR_CONFIG IOCTL is added to set the timeout
duration at initialization, and existing GPIO interrupt code is
refactored.
Also removes the GPIO index limitation to the range of [0,31] by
returning the complete indices one at a time instead of a bit flag.
Jira CAMERASW-11100
Jira CAMERASW-11385
Jira CAMERASW-9366
Bug 3902416
Bug 3792904
Signed-off-by: Vincent Chung <vincentc@nvidia.com >
Change-Id: I62b6c0bd8be18922ab1fe5d40485a69274f2a18e
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2893327
Reviewed-by: Semi Malinen <smalinen@nvidia.com >
Reviewed-by: Shiva Dubey <sdubey@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-28 16:37:36 -07:00
Junghyun Kim
b8817415d5
drivers: media: CDI: Add Des's power control
...
Add the new IOCTL command to control the deserilaizer's PWDN signal
instead of enabling it when CDI root opens
Bug 3879569
Change-Id: Ia07c3b4266e1f137d197af130fb2bf12e52a1767
Signed-off-by: Junghyun Kim <juskim@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2835141
(cherry picked from commit 29fb31dad2e63d2669a6a6eb5c2751092b7097e2)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2847959
(cherry picked from commit bd9766952be10722f4cc6a17ff582005b3138b08)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2854722
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
Tested-by: Frank Chen <frankc@nvidia.com >
Reviewed-by: Frank Chen <frankc@nvidia.com >
Reviewed-by: Mohit Ingale <mohiti@nvidia.com >
Reviewed-by: Shiva Dubey <sdubey@nvidia.com >
2023-02-10 06:15:21 -08:00
Frank Chen
7514ddd6c0
media: camera: Fix CDI MGR driver for Linux v6.2
...
Upstream Linux kernel commit ff62b8e6588f ("driver core: make struct
class.devnode() take a const *") updated the 'devnode' function pointer
under the class structure to take a const device struct. This breaks
building the Tegra CDI MDR driver with Linux v6.2. Make the
necessary changes to the CDI MGR driver to fix the build breakage.
Also update CDI MGR GPIO code since devm_fwnode_get_gpiod_from_child()
is deprecated in Linux v6.2. Switch to use devm_fwnode_gpiod_get_index()
for Linux v6.2.
Bug 3936429
Change-Id: I327ebe1fa42d89a63e0b483d3ce1ff1b8b168532
Signed-off-by: Frank Chen <frankc@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2843858
Reviewed-by: Ian Kaszubski <ikaszubski@nvidia.com >
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-01-18 10:20:02 -08:00
Junghyun Kim
9269dac3ec
drivers: media: CDI: Add IO Expander support
...
Add IO Expander support in CDI Dev to control the FRSYNC multiplexer
with the speicific platform
Bug 3582660
Change-Id: I3ee376e7a0bccabcfa16efb228879d4df0d65748
Signed-off-by: Junghyun Kim <juskim@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2727256
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2824551
Reviewed-by: Frank Chen <frankc@nvidia.com >
Reviewed-by: Shiva Dubey <sdubey@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2022-12-13 06:27:42 -08:00
Frank Chen
3c67831fe8
media: camera: fix driver errors for kstable
...
Fix CDI and ISC driver errors when building for kstable (6.0.0)
Bug 3831575
Change-Id: Ie37be0dbe9c579ec396006fb466125b1e7e77e3f
Signed-off-by: Frank Chen <frankc@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2821524
Reviewed-by: Igor Mitsyanko <imitsyanko@nvidia.com >
Reviewed-by: Justin Kim (SW-TEGRA) <juskim@nvidia.com >
Reviewed-by: Shiva Dubey <sdubey@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2022-12-06 04:52:19 -08:00
Frank Chen
9ad6f3c84e
media: camera: Build CDI as OOT module
...
Convert automotive CDI kernel driver to OOT module.
Jira CAMERASW-7592
Change-Id: Ib19ee594cc65f8041f6eba9aff7faefb753b771b
Signed-off-by: Frank Chen <frankc@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2780572
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2022-10-04 05:17:35 -07:00