Commit Graph

6 Commits

Author SHA1 Message Date
Jon Hunter
8f1e881a2f 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
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-07-31 08:06:25 -07: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
537a307ffd 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
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-07 18:19:16 -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