Commit Graph

3040 Commits

Author SHA1 Message Date
Jon Hunter
233a7eb320 drivers: Fix missing headers for Linux v6.8
For Linux v6.8, commit ef175b29a242 ("of: Stop circularly including
of_device.h and of_platform.h") updated the OF headers included by these
header files. This breaks the build for various drivers and so fix this
by including the headers that are actually needed for each driver.

Bug 4448428

Change-Id: Ia40ab13f865d5631c96855ecc49145848f99c996
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3032442
(cherry picked from commit ab65399274)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3063003
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-25 13:55:11 -08:00
Jon Hunter
753583f1e3 misc: mods: Fix headers for Linux v6.8
For Linux v6.8, commit ef175b29a242 ("of: Stop circularly including
of_device.h and of_platform.h") updated the OF headers included by these
header files. This breaks the build for various drivers and so fix this
by including the headers that are actually needed for each driver.

Bug 4448428

Change-Id: Ifb484189524a3ec86aa252e71b4489f4dba5aacd
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3059458
(cherry picked from commit 0899829704)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3063002
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-25 13:55:06 -08:00
Jon Hunter
1ccb6edda2 drivers: Don't use strlcpy()
For Linux v6.8, the function strlcpy() has been removed. The function
strscpy() was added in Linux v4.3 and has been preferred over strlcpy().
See upstream Linux commit 30035e45753b ("string: provide strscpy()") for
more details. The Linux checkpatch.pl script warns against using
strlcpy().

The function strscpy() takes the same arguments as strlcpy(), but
returns a type of ssize_t instead of size_t. Update the drivers to use
strscpy() instead of strlcpy().

Bug 4448428

Change-Id: Id6f196f0e81decf1545f9aa4f74f5c63a7f72a48
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3059457
(cherry picked from commit ecf383265b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3063000
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-25 13:55:01 -08:00
Anubhav Rai
1b6db0ce3c camera: lt6911uxc update with Shadow EDID
Update the Lontium driver to flash shadow EDID
to lt6911uxc chip. This will ensure that the requested
resolution through the application is flashed to the
chip and the source is forced to select the
requested resolution only.

bug 4266018
bug 4301203
bug 4168489
Signed-off-by: Anubhav Rai <arai@nvidia.com>

Change-Id: I945a9658b52c82956535f3710312d317c0098be7
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3007702
(cherry picked from commit c3ddb23392)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3015613
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
rel-36_eng_2024-01-24
2024-01-23 19:09:34 -08:00
Jon Hunter
26e357d588 misc: mods: Drop DMAENGINE slave_id support
Only Tegra234+ devices are currently supported and for these devices the
only DMA drivers that are supported for Linux are the Tegra210 ADMA and
Tegra186 GPCDMA drivers. Neither of these drivers ever supported the
'slave_id' parameter for configuring the DMA request ID for a given
channel. These drivers have always used device-tree to retrieve this
information. Only the Tegra20 APBDMA controller supported the 'slave_id'
field and this was dropped in Linux v5.17. The Tegra20 APBDMA driver was
supported in Tegra devices up until Tegra210, but starting with Tegra186
it is no longer supported.

Given that this is a legacy feature only supported for legacy Tegra
devices and drivers, drop the 'slave_id' support completely.

Bug 4425688

Change-Id: Id9bb6440805826dfb0cf0d862d6b15fd856e61ff
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3038964
(cherry picked from commit c87f90c7b8)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3058562
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-22 05:11:28 -08:00
Jon Hunter
7635873f3d misc: mods: Fix build when OPTEE is a module
If the Linux kernel driver OPTEE is built as a module (CONFIG_OPTEE=m)
then building the MODS driver for Tegra fails with the following error
...

 drivers/misc/mods/mods_optee.c:22:5:
 error: no previous prototype for 'esc_mods_invoke_optee_ta'
 [-Werror=missing-prototypes]
   22 | int esc_mods_invoke_optee_ta(struct mods_client *client,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~

The problem is in the mods_internal.h file that wraps the prototype for
the above function with '#ifdef CONFIG_OPTEE'. This works fine for when
CONFIG_OPTEE=y but not if CONFIG_OPTEE=m. To ensure that this prototype
is present when the OPTEE driver is built into the kernel or a module,
we need to use '#if IS_ENABLED(CONFIG_OPTEE)'. Update the MODS driver
accordingly to fix this.

Bug 4429280

Change-Id: I48054f60cf26c04d2cacff8d8affc46254020aff
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3038965
(cherry picked from commit 0bd71e49bd)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3055962
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-22 05:11:23 -08:00
Laxman Dewangan
176a1bff8d tegra_hv: Use conftest to find if class_attribute function has const type arg
Determine if struct class_attribute function has const type
"struct class_attribute" argument or not.

Modified the argument by change
commit 75a2d4226b5371 ("driver core: class: mark the struct class
for sysfs callbacks as constant") for Linux 6.3

Bug 4346767

Change-Id: I2a36025b23af80761faf1da406481731289eedd2
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3030734
(cherry picked from commit de4295cfa6)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3059278
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-22 05:10:56 -08:00
Manish Bhardwaj
e997e8ae5a hv: port tegra hypervisor driver on noble kernel
Bug 4377196

Change-Id: Idecaac1915c444fe04c40f0e848e36bd3f90b78f
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3018492
(cherry picked from commit 912dda68d1)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3059277
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-22 05:10:51 -08:00
Laxman Dewangan
d1c969184b tegra_hv: Use const in class attributes APIs for Linux 6.4 and above
The callback APIs of class attribute are updated on
Linux6.4 and above to have the constant type pointer
argument.

Update the driver compatible with the updated APIs
for Linux 6.4 and above.

Bug 4370594

Change-Id: Ic06cb0d752797bb272f110aa0bb35bdd3afa1e6a
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3013107
(cherry picked from commit c8a83b5692)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3059176
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-22 05:10:46 -08:00
Laxman Dewangan
e02b9efcc4 tegra_hv: Enable driver for Linux 6.2 and above
The driver tegra_hv was disabled for the Linux 6.2 and above
due to build failure. All build issue is fixed and re-enabling
driver for all kernel.

Bug 4370594

Change-Id: I9edef01a4f204b138204d583d9f7f61dc6112a25
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3014191
(cherry picked from commit af936f3b1e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3059175
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-22 05:10:41 -08:00
Laxman Dewangan
2ac404f410 nvidia-oot: Remove unused CONFIG_TEGRA_IVC_LEGACY_DISABLE
The export of config CONFIG_TEGRA_IVC_LEGACY_DISABLE is
no more required as all drivers which was disabled from
build due to IVC API changes are ported to handle the
new APIs from core kernel.

Remove unused config CONFIG_TEGRA_IVC_LEGACY_DISABLE.

Bug 4346767

Change-Id: I7830f962735b293f9c78cd03acfa1413f9eb4cff
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3033025
(cherry picked from commit 2179242ba9)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3059174
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-22 05:10:36 -08:00
Laxman Dewangan
e7868529f3 misc: Enable build of mods module
Build of mods module disabled due to not supporting legacy IVC
from Linux 6.2.
Enable build of mods.

Bug 4346767

Change-Id: I4eccc831dba2820467f5d455bb5cba387f879b23
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3033023
(cherry picked from commit 00f3315faf)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3038669
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-22 05:10:31 -08:00
Jon Hunter
3f5ba8f70b tty: wch: Fix build for Linux v6.8
In Linux v6.8, the argument for the struct tty_operations::send_xchar
function was updated from char to u8 and this breaks the build for the
'wch' driver. Add a test to the conftest script to detect the argument
type for this function and use the definition generated to fix the build
for the 'wch' driver.

Bug 4448428

Change-Id: I051861cf76e56cacb4b33053d4e6644265552df7
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3057714
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-19 06:39:15 -08:00
Jon Hunter
f1f3771dec conftest: Fix 'type' compile tests
The Conftest Makefile was incorrectly updated changing variable
NV_CONFTEST_TYPE_COMPILE_TESTS to NV_CONFTEST_TYPES_COMPILE_TESTS. Fix
this by correcting the name.

Bug 4346767

Change-Id: Ia34c076526a1ee6870301382e01bfdcc8cd550d3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053809
(cherry picked from commit 93360eb080)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3055874
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-01-17 20:39:37 -08:00
Laxman Dewangan
e30e21ebd1 v4l2: Add conftest for v4l2 API changes in Linux 6.6
Add conftest to determine the API changes/deprecation
for V4L2 in Linux6.6. The changes are:
  The device argument is added in the API v4l2_async_nf_init() with
  commit b8ec754ae4c5 ("media: v4l: async: Set v4l2_device and subdev
  in async notifier init") in Linux 6.6.

  The API is removed with commit bda8953e8c3e ("media: v4l: async: Drop
  v4l2_async_nf_parse_fwnode_endpoints()") in Linux 6.6

Bug 4346767

Change-Id: Ia225be8b4fb17003ec2899e872573dc05e9fde87
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3042900
(cherry picked from commit 8df8cfc8e6)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3055495
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-17 15:24:14 -08:00
Jon Hunter
ac6a53078b ufs: Remove UFSHCD_QUIRK_ENABLE_STREAM_ID
Remove the legacy downstream quirk 'UFSHCD_QUIRK_ENABLE_STREAM_ID' and
always use the supported upstream quirk from now on. The legacy quirk
will never be upstreamed and so to support 3rd Party Linux distributions
that will not have this quirk, we should only support the official
upstream quirk.

Bug 4346767
Bug 4450187

Change-Id: Iabec6beb63b99ada7e8893cfa2acc0ed5e7ee92f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3045039
(cherry picked from commit ce916e3f13)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3055492
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2024-01-17 09:10:08 -08:00
Laxman Dewangan
56c05f8e3f ufs: Use UFS headers directly if it is public header in core kernel
The UFS headers are moved to include as public headers from
Linux 5.19. Use the headers directly from the core kernel
instead of making the copy in drivers-private for nvidia-oot.

Keep copy of only those drivers which are still in the
drivers folder in core kernel.

This will help to align all definition which driver needs to
sync with core driver available in the core kernel.

Bug 4346767

Change-Id: I1e59e32bee0f89591e50fff2f61e35d468f4207c
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3039312
(cherry picked from commit b2dcbdbc93)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3055490
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
2024-01-17 09:10:02 -08:00
Laxman Dewangan
822abd1943 ufs: Port UFS driver to use headers from core kernel for Linux 6.7
Some of the drivers-private headers are now available in public
header path in core kernel. Use such headers directly from the
core kernel for Linux 6.7 and later instead of copying it in the
nvidia-oot/include/driver-private.

Also match the quirks definition with core kernel for Linux 6.0 and
later.

Bug 4346767

Change-Id: If994466a3cabc6df8eeb0e97018f48d48a8306dc
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3038489
(cherry picked from commit dfff2311c3)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3055485
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-01-17 09:09:57 -08:00
Laxman Dewangan
71876127a2 UFS: Port driver-private headers for the Linux 6.7
The headers of UFS got changed for Linux 6.7 over Linux 6.1.
Make the copy the of the headers and modify according to
Linux 6.7 core kernel headers.

Note: These headers will be removed and use directly from
core kernel in follow on cleanups.

Bug 4346767

Change-Id: I12cb4eac187bb3414efcc5bfb6246a322e917094
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037996
(cherry picked from commit b282d21004)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3055487
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
2024-01-17 09:09:46 -08:00
Jon Hunter
abeacc3534 scsi: ufs: Use conftest for Tegra264
The chip ID for Tegra264 was added in Linux v6.5 and not Linux v6.1 as
indicated in the Tegra UFS driver. Hence, the Tegra UFS driver does not
build against any generic Linux v6.1 to v6.4 kernel. Fix this by using
conftest to determine if the chip ID definition is present in the
kernel.

Bug 4221847

Change-Id: If2ca1202b2a69bf7de36fc327406f1579d2f4969
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3054870
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-01-17 06:54:45 -08:00
Jon Hunter
902712a236 scsi: ufs: Use conftest for suspend differences
In Linux v5.19, the arguments to the 'suspend' function pointer defined
in the structure 'ufs_hba_variant_ops' was updated to add a 'status'
argument. Add a new test to the conftest script that checks if the
'suspend' function has a 'status' argument and use the definition
created by conftest to select which structure member is used.

This is beneficial for working with 3rd party Linux kernels that may
have back-ported upstream changes into their kernel and so the kernel
version checks do not work.

Bug 4221847

Change-Id: I05011a4a1aff7c54cd258147d6519b696904a2de
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2996214
(cherry picked from commit f748f0ef72)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3032086
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-01-17 06:54:34 -08:00
Jon Hunter
ff6f3c6916 scsi: ufs: Clean-up headers
Clean-up the UFS headers by adding a new top-level header for ufshcd.h,
ufshci.h and unipro.h that will include the appropriate header
depending on kernel version. This saves replicating the kernel version
check for every source file that includes these headers.

Note that the ufshcd-pltfrm.h header is identical between v5.15, v5.16
and 6.1 kernels and so remove the duplicated versions of this header and
just use a common header for all kernel versions.

Bug 4221847

Change-Id: I0e0ba2f4389af7e34ab62e3131141405d87aeeb1
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2996211
(cherry picked from commit 54e01347ea)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3031885
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-17 06:54:24 -08:00
Jon Hunter
11e0abc8a3 media: camera: Fix build for Linux v6.8
In Linux v6.8, the 'g_frame_interval' function pointer was removed from
the 'v4l2_subdev_video_ops' structure and replaced by
'get_frame_interval' that was added to the 'v4l2_subdev_pad_ops'
structure. Add a test to conftest to detect if 'get_frame_interval' is
supported and update the camera CSI driver accordingly to populate the
appropriate function pointer.

Note that the new 'get_frame_interval' function pointer has an
additional 'state' argument but is otherwise the same as the previous
'g_frame_interval' function pointer.

Bug 4448428

Change-Id: Iff049c3bffda11c677ac879b2b91e10deb78060c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053901
(cherry picked from commit a1f59dfc30)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3055255
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-17 04:40:24 -08:00
Jon Hunter
5d31085674 net: nvethernet: Fix build for Linux v6.8
The ethtool_ops function pointers get_rxfh and set_rxfh were updated for
Linux v6.8 to pass arguments via a new 'ethtool_rxfh_param' structure.
Add a new test for conftest to detect if the get_rxfh and set_rxfh
functions support the 'ethtool_rxfh_param' structure and update the
nvethernet driver accordingly for Linux v6.8.

Bug 4448428

Change-Id: Ia1c49d88c4ac73539454b010af92c261e14be4bf
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037949
(cherry picked from commit 0356a563b3)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3055254
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-17 04:40:20 -08:00
Jon Hunter
a86b3af506 drivers: pwm: Fix build for Linux v6.8
Commit 54c86dd20bba ("pwm: Replace PWM chip unique base by unique ID")
removed the 'base' field of the 'pwm_chip' structure replacing it with
an 'id' field. The new 'id' is initialised by the PWM driver core and
does not need to be configured by the PWM drivers.

Add a test for conftest to detect if the 'pwm_chip' structure has the
'base' field and update the various PWM driver to only set this field if
present.

Bug 4448428

Change-Id: I7cf466eddba4aedb57db84534e3cbf99be64151e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3027486
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
(cherry picked from commit 10fd025187)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3055253
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-17 04:40:15 -08:00
Jon Hunter
32f23c8ab2 gpu/drm: tegra: Fix build for Linux v6.8
Building the Tegra DRM driver with Linux v6.8 fails with the following
error ...

 drivers/gpu/drm/tegra/hdmi.c:623:25: error: implicit declaration of
 function ‘drm_eld_size’; did you mean ‘mm_cid_size’?
 [-Werror=implicit-function-declaration]
  623 |    size_t length = drm_eld_size(hdmi->output.connector.eld), i;
      |                    ^~~~~~~~~~~~

Commit ("8eb80946ab0c drm/edid: split out drm_eld.h from drm_edid.h")
added the header file 'drm/drm_eld.h' which now needs to be included to
build the Tegra DRM driver. Fix the build issue by using conftest to
detect the presence of the header 'drm/drm_eld.h' and include this
header if present.

Bug 4448428

Change-Id: Ifb17648d1dc721e1f0de3f864f4cc76450eea394
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3027485
(cherry picked from commit 8d5286c379)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3055252
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-17 04:40:10 -08:00
Laxman Dewangan
259736545b crypto: Enable few of crypto driver for Linux6.6
Enable crypto drivers which are getting build properly
with Linux 6.6 and keep disabling the compilation of
build failed drivers.

Bug 4346767

Change-Id: Ia5c67759b6c839a874ea9e38d601c722596e0008
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3010492
(cherry picked from commit 9b0b059027)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053821
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-16 14:56:09 -08:00
Bitan Biswas
34fd7d68dc crypto: fix crypto_engine_ctx build error
struct crypto_engine_ctx removed in k6.6 hence use
conftest helper based macro to select updated data types

Bug 4346767

Change-Id: I2c00f99251e90f0dd3641703ba24a2a8ac23e927
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2994021
(cherry picked from commit 48e59e9d42)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053820
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-16 14:56:04 -08:00
Bitan Biswas
4a32aa94e5 crypto: conftest struct crypto_engine_ctx support
struct crypto_engine_ctx removed in k6.6 hence use
conftest helper based macro to select updated data types

Bug 4346767

Change-Id: I23e8f054719f399877b11f42d355f940d8e07186
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3026513
(cherry picked from commit 2a9ce8d0e2)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053713
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-01-16 14:55:59 -08:00
Bitan Biswas
e4d4103ebe nvidia-oot: enable noble crypto
Enable crypto build with noble

Change-Id: Ib4ab440fdd75a3663c717992c3c80eae1fe77f88
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3011180
(cherry picked from commit b185ee48be)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053822
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-16 14:55:49 -08:00
Laxman Dewangan
7abc2d8726 camera: vi: Use proper APIs from v4l2 for Linux6.6
The earlier porting of the driver for Linux 6.6 is not
matching with the previous kernel implementation.

Few V4L2 APIs have been deprecated from Linux 6.6. and
added the new APIs.

Use the correct API available from Linux6.6 for the
replacement as the previous supported kernel APIs.

For reference, the changes in core kernels are:
  The device argument is added in the API v4l2_async_nf_init() with
  commit b8ec754ae4c5 ("media: v4l: async: Set v4l2_device and subdev
  in async notifier init") in Linux 6.6.

  The API is removed with commit bda8953e8c3e ("media: v4l: async: Drop
  v4l2_async_nf_parse_fwnode_endpoints()") in Linux 6.6

Bug 4346767

Change-Id: I94877a8fe6a6764fc3c913fea7ecdbfdc7c793d6
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3042993
(cherry picked from commit 7d931ef33d)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053710
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-16 14:55:44 -08:00
Laxman Dewangan
f8e977a8c9 camera: Use conftest to find if v4l2_async_notifier_* present
use conftest to determine if APIs v4l2_async_notifier_*()
present or not.
These APIs have been renamed in
commit 3c8c15391481 ("media: v4l: async: Rename async
nf functions, clean up long lines") in Linux 5.16

Bug 4387902

Change-Id: Id2023543f487c3867ef4e140662141803ac63f04
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037918
(cherry picked from commit 702def895c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053709
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-01-16 14:55:39 -08:00
Laxman Dewangan
1f0954f43d media: Use conftest to find if v4l2_async_subdev_nf_init() present
Use conftest to find if function v4l2_async_subdev_nf_init() is present
or not.

In Linux 6.5, with change commit bda8953e8c3e7e ("media: v4l: async:
Drop v4l2_async_nf_parse_fwnode_endpoints()"), added the function
v4l2_async_subdev_nf_init() and dropped v4l2_async_nf_init().

Bug 4346767

Change-Id: I345db2acf0a07d05722611d9eacc7134aff0c35a
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028766
(cherry picked from commit 3839cecd1c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053708
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-01-16 14:55:29 -08:00
Laxman Dewangan
711d4aee8d media: Use conftest to find if enum v4l2_async_match_type present
Use conftest to determine if the 'enum v4l2_async_match_type'
has the "TYPE" in its name.

In Linux 6.5, with change commit 7a2259fc5182b ("media: v4l: async:
Rename V4L2_ASYNC_MATCH_ macros, add TYPE_"), the enum names has "TYPE" also.

Bug 4346767

Change-Id: I863da8496337d4003188b654673c67cdb3eef155
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028745
(cherry picked from commit 5f77d6d51a)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053707
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-01-16 14:55:19 -08:00
Laxman Dewangan
afe9bdc7c0 media: Use conftest to find if struct v4l2_async_connection present
Use conftest to find if struct v4l2_async_connection present
or not. The struct v4l2_async_subdev is renamed to struct
v4l2_async_connection with change commit adb2dcd5f2d49d3
("media: v4l: async: Rename v4l2_async_subdev as v4l2_async_connection")
in Linux 6.5

Bug 4346767

Change-Id: Id15c8ce747a8642b7831b79f45e15f26e95744b2
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028744
(cherry picked from commit 234ba9c75f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053706
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-01-16 14:55:08 -08:00
Laxman Dewangan
5b4a093e24 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
(cherry picked from commit 1eab65044c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053705
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-16 06:39:23 -08:00
Laxman Dewangan
14abda2794 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
(cherry picked from commit 2884c4b380)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3054211
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-16 06:39:18 -08:00
Laxman Dewangan
6ad6325734 i2c: Use conftest to find if i2c_driver struct has new_probe
Use conftest method to find if i2c_driver struct has the
member as new_probe. This is dropped from Linux 6.6 with
commit 5eb1e6e459cf ("i2c: Drop legacy callback .probe_new()")

Bug 4346767

Change-Id: I10b539dfa1bb363ad6cf5fc28a9ebd0ca4e88b48
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028631
(cherry picked from commit 537a307ffd)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053704
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
2024-01-16 02:10:25 -08:00
Laxman Dewangan
a39a2be24e serial: Use conftest to find if uart_ops has set_termios has const arg
Use conftest to determine if set_termios of struct uart_ops
has const type argument or not. The argument type is changed
from commit bec5b814d46c ("serial: Make ->set_termios() old
ktermios const") in Linux 6.1

Bug 4387902

Change-Id: I175aac51ac2c2b99b9eedc69260ccb6b0c38571e
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037040
(cherry picked from commit 32516f4878)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053703
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
2024-01-16 02:10:18 -08:00
Laxman Dewangan
9c2c4a695c tty: Use conftest to find if tty_operations::write() has argument u8 ptr
Use conftest to find if the function write() of tty_operations
struct has the argument as U8 pointer data type. This datatype
is changed from Linux 6.5 with commit 69851e4ab8feeb ("tty:
propagate u8 data to tty_operations::write()")

Bug 4346767

Change-Id: I49f9ef844da0dee8e209e597989f1d179a2a804b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028632
(cherry picked from commit a757343f2e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053702
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
2024-01-16 02:10:13 -08:00
Laxman Dewangan
3a35e1c2b1 sound: Use conftest to find if snd_soc_dai_ops has probe callback
Use conftest to find if struct snd_soc_dai_ops have the probe()
callback or not. In Linux 6.5, commit 516ee7009ff20 ("ASoC:
tegra: merge DAI call back functions into ops") added probe()
callback into the struct snd_soc_dai_ops.

Bug 4346767

Change-Id: If292f10d6e52a2cf80c7700ff7aba5805041531f
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028743
(cherry picked from commit 350a86106e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053701
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-16 02:10:08 -08:00
Laxman Dewangan
0d940461d4 media: {cdi,is}_gpio: Initialize parent dev for gpio chip
Set the parent node of the gc to the gpio device so that
core will get the of_node of device from parent node.

Bug 4387902

Change-Id: I795e612c11bdf72067b85d23ce5914abdcc3c139
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3052126
(cherry picked from commit d09293e954)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053104
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-15 23:55:00 -08:00
Jon Hunter
e3fc979712 camera: Fix build when CONFIG_MEDIA_SUPPORT is not enabled
Some camera drivers are dependent upon CONFIG_MEDIA_SUPPORT being
enabled in the kernel and if it is not enabled, building these drivers
fail. Fix this by only building the camera drivers dependent upon
CONFIG_MEDIA_SUPPORT when this option is actually enabled.

Bug 4449072

Change-Id: I3637b5763667fbc9965bbeaf126115010e711c7e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3050559
(cherry picked from commit 9de3e799ae)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053101
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-15 23:54:55 -08:00
Laxman Dewangan
e3f7ab90e1 rtcpu: capture-ivc: Enable build for Linux 6.2
The driver of rtcpu/capture-ivc is modified to support
the new APIs of the IVC from core kernel using conftest.

Enable build of this driver.

Bug 4346767

Change-Id: I427bb8b7d5dad02e805d0707fb67e45772fead31
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3033024
(cherry picked from commit bf1cfb5fb4)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053700
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
2024-01-15 23:54:46 -08:00
Laxman Dewangan
2fc926c8fe firmware: bpmp-tegra186-hv: Enable build for Linux 6.2
The build of bpmp-tegra186-hv was disabled due to change
in core kernel to move the Tegra BPMP IVC to IOSYS-MAP
framework by commit 4c1e0a97351a5e ("firmware: tegra:
bpmp: Use iosys-map helpers") in Linux 6.1.

Bug 4346767

Change-Id: I704ef454192613ade8e97f708e997fa74a186b7b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3031778
(cherry picked from commit 1fc6fc17f2)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3038670
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
2024-01-15 23:54:41 -08:00
Jon Hunter
f7d42ed1c4 media: i2c: Fix build for GCC 6/7
Building nv_ar0234 and nv_hawk_owl sensor drivers with GCC 6/7 fails
with the following errors ...

 drivers/media/i2c/nv_ar0234.c:797:66: error: initialiser element is not
 constant
 .compound_ctrl_size = {sizeof(struct NvCamSyncSensorCalibData),
                        alternating_exposure_cfg_size},
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 drivers/media/i2c/nv_hawk_owl.c:883:59: error: initialiser element is
 not constant
 .compound_ctrl_size = {sizeof(NvCamSyncSensorCalibData),
                        alternating_exposure_cfg_size},
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

These older versions of GCC are not able to reconcile the size from the
variable 'alternating_exposure_cfg_size' even though it is defined as
const. Given that the variable 'alternating_exposure_cfg_size' is only
used here, fix this by removing this variable and directly defining the
size in the declaration of the 'compound_ctrl_size' parameter.

Note that the minimum GCC compiler currently supported by the Linux
kernel is v5.1.

Bug 4448563

Change-Id: I4d3ac6eeb961a944901e73a1d92e753cae44220c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3050272
(cherry picked from commit 8b3ebff940)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3051959
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-14 15:24:13 -08:00
Laxman Dewangan
560b7c1345 Makefile: Remove CONFIG_TEGRA_GPIO_LEGACY_DISABLE
Remove config CONFIG_TEGRA_GPIO_LEGACY_DISABLE which
was added to avoid the build of few modules due to
API changes in core kernel from Linux 6.2.

ALl modules drivers are updated to support the Linux 6.2
and above.

Bug 4346767

Change-Id: I81c56eda77bfb42f56f01216c721f410dac39d77
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3031555
(cherry picked from commit e290576b47)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3051590
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-14 13:09:30 -08: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
82f8d2b998 bludroid_pm: Enable build of driver with Linux6.2
The build of driver is disabled from Linux 6.2 due to
changes in core kernel where API of_get_named_gpio_flags()
has been removed.

This APIS is removed in commit 40fc56ee608cdb ("gpiolib:
of: remove of_get_gpio[_flags]() and of_get_named_gpio_flags()")
in Linux 6.2.

Add support to use the new APIs for Linux 6.2 onwards.

Bug 4346767

Change-Id: I573c13398945db93d2a3a3db81bfd53f1be159f6
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
(cherry picked from commit f777618023)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3050579
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-01-12 20:24:19 -08:00
Laxman Dewangan
b27e2e49de cdi_gpio: Enable build of cdi_gpio for Linux 6.2
The build of cdi_gpio driver was disabled for Linux 6.2
as there is change in API in core kernel.

Enable build of cdi_gpio driver with appropriate
modification in driver for Linux 6.2.

Bug 4346767

Change-Id: If2d67a87a37bb868b217346d0dbfb5d56e4617e1
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3031552
(cherry picked from commit 6fcf226b96)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3051583
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:43 -08:00