9 Commits

Author SHA1 Message Date
Jon Hunter
1ae45fbaa7 hwmon: f75308: Fix build for Linux v6.11
The macro of_property_for_each_u32() was updated for Linux v6.11 to
remove two of the arguments that were only used internally in the macro
and do not need to be passed. Add a test to conftest to detect the
version of the of_property_for_each_u32() that is present in the kernel
and fix the f75308 driver accordingly.

Bug 4749580

Change-Id: If787a40d0af49989d93d9563dd6a84e906cb5209
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3184092
(cherry picked from commit 8f1e881a2f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3185778
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-08-01 10:24:40 -07: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
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
c9b1539c37 hwmon: Replace probe_new to probe for Linux6.6
The probe_new is removed from the Linux 6.6. in
following change:
---
commit 5eb1e6e459cfa025f79c43014f66ff62a55542f1
Author: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

    i2c: Drop legacy callback .probe_new()
----

Bug 4346767

Change-Id: Idf90cd0f6536bb4e886467679b71c37f97e009a5
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3007384
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2023-11-01 09:00:01 -07:00
Jon Hunter
0dfc692f7d hwmon: f75308: Remove unused variable
Building the f75308 driver generates the following warning ...

 drivers/hwmon/f75308.c: In function ‘f75308_detect’:
 drivers/hwmon/f75308.c:1034:29: warning: unused variable ‘adapter’
 [-Wunused-variable]
 1034 |         struct i2c_adapter *adapter = client->adapter;
      |                             ^~~~~~~

Fix this by removing the unused variable 'adapter'.

Bug 4190165

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Change-Id: Ib8672b1e9288bb0684bc8bee617b068d01e1fc6d
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2934693
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Yi-Wei Wang <yiweiw@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-12 19:11:39 -07:00
Yi-Wei Wang
8e50cfd8ed driver: hwmon: Add f75308 hardware monitor driver
This change adds support for the hardware monitors of the f75308 series
that provide temperature readings, voltage readings, rpm readings, pwm
readings / writings and fan settings.

Bug 3854473
Bug 4129043

Signed-off-by: Yi-Wei Wang <yiweiw@nvidia.com>
Change-Id: If0ece9024d8a41f5935eeef3d44d907157989e26
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2911024
Reviewed-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-07 06:47:37 -07:00
Laxman Dewangan
013ae1a966 hwmon: Remove generic pwm tachometer
Remove HW monitor based generic PWM tachometer
driver as it is not required.

Along with driver, remove DT binding document and
dkms entry.

Bug 4061216

Change-Id: I28e1bf9d5223ad7f56332d90501ea7ddb55cd366
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2883862
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-07 00:12:26 -07:00
Jon Hunter
3c38a2fe6f pwm: tachometer: Fix build for Linux v6.1
Upstream Linux kernel commit b88c48bfdd85 ("pwm: core: Get rid of unused
devm_of_pwm_get()") has removed the function devm_of_pwm_get() which
breaks building the Tegra PWM tachometer driver with Linux v6.1-rc1.
Fix this by updating the driver to use the function
devm_fwnode_pwm_get() instead.

Bug 3831575

Change-Id: I89def599312baa4d3b6b25b1275835233e942af0
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2793510
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-10-18 11:24:33 -07:00
Laxman Dewangan
5ee5661688 hwmon: Add pwm based generic tachometer
Add PWM based generic tachometer which capture the pwm
and report the speed.

Bug 3621819

Change-Id: I08d7fc808c3a29d6876026ce539e3467887f8112
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2703728
GVS: Gerrit_Virtual_Submit
2022-04-29 06:17:12 -07:00