Commit Graph

12 Commits

Author SHA1 Message Date
Akhil R
84e4d456fa i2c: tegra-slave: Support 10-bit addressing
Support 10-bit addressing in Tegra I2C slave mode

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: I199e636d7c8058cd3d4ae83abcfd48cfa02febf2
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233634
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:10 +00:00
Jon Hunter
f01227d4ea 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
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:08 +00:00
Yi-Wei Wang
e049967a27 i2c: nvvrs11: Report power in milliWatts
The unit of the voltage is in milliVolts and the current is in Amperes
for VRS11. So, the power can be reported in milliWatts which provides
higher resolution for better profiling.

Bug 200718059

Change-Id: I0ae52dafa4c7dcc751d9c65b410205163a4fbc45
Signed-off-by: Yi-Wei Wang <yiweiw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3223011
(cherry picked from commit 3741667390)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3223041
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Jon Hunter
951b2423a8 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
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Tested-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-08-11 17:20:34 -07:00
Akhil R
75ea3b11d0 i2c: tegra-slave: Add I2C Tegra slave driver
Add back the removed i2c-tegra-slave-byte driver and add support
for it in kernel v6.1

Though not enabled in device tree by default, I2C slave driver is
used by customers and developers for various debug and application
use cases.

Bug 4288065
Bug 4061232

Change-Id: Idd012303f51456492a8392e51aee1edc8dcb487c
Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3048842
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-07 15:56:47 -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
Jon Hunter
a809f2cfb5 i2c: nvvrs11: Remove header file
The header file for the NVIDIA I2C NVRS11 driver is only used by this
driver and so remove the header and include the necessary definitions in
the driver source. This avoids having to distribute a header file along
with the main source file.

Bug 4008099

Change-Id: I7ff0e426e74810e34e94ee9ffa28923f40485715
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2893965
(cherry picked from commit 6e467aeef7848ad55b55b176b89c7fd14c34586d)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894562
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Shubhi Garg <shgarg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-01 23:45:14 -07:00
Akhil R
71cc664432 i2c: tegra: Remove i2c-slave-byte driver
Remove unused tegra-i2c-slave-byte driver from OOT.

Bug 4061232

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: I2d9d06ffcbd723bb8a714041fbda6b8b03ecce98
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2890523
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-22 09:59:06 -07:00
Laxman Dewangan
cf15a1f3df i2c: buses: nvvrs11: Copy driver from kernel/nvidia
Make the copy of drivers of i2c/busses/i2c-nvvrs11
from kernel/nvidia to kernel/nvidia-oot.
This will remove the dependency of the OOT drivers
with kernel/nvidia-oot repo.

Bug 4038415

Change-Id: I3353f2744915763c3e5f14164746fc540cd585dc
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2881573
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-04-04 21:56:16 -07:00
Jon Hunter
4ae4a15c9a i2c: nvvrs11: Build the NVIDIA VRS11 driver OOT module
Build the NVIDIA I2C VRS11 driver as an out-of-tree module. This device
is a high voltage current regulator that is used on Jetson AGX Orin.

Bug 4008099

Change-Id: Ica47495df427563996703dc5064b85330810380c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2865279
(cherry picked from commit 76c3a5b24626d9b5f18b7f48abeb92d6a8d0ca8f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2865481
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-03-16 13:12:03 -07:00
Laxman Dewangan
d7cfbd7ad1 i2c: busses: Add I2C tegra slave driver in byte mode
Add I2C slave driver for NVIDIA Tegra which works
in byte mode of data transfer i.e. rx/tx interrupts
per byte.

Bug 3631219

Change-Id: Ic40b868a3d195495550148a89d41f9d5d799d7ac
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2705958
GVS: Gerrit_Virtual_Submit
2022-05-02 23:16:55 -07:00