Commit Graph

6 Commits

Author SHA1 Message Date
Jon Hunter
0104837e60 pwm: tachometer: Fix build for Linux v6.10
In Linux v6.10, a pointer to a dynamically allocated 'struct device'
was replaced with a statically allocated 'struct device' in the
'pwm_chip' structure. Update the Tegra PWM Tachometer driver accordingly
to fix the build for Linux v6.10.

Bug 4593750

Change-Id: I9d629746290282b5c1858f8308128d94ff155c49
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123219
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-05-24 07:39:53 -07: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
Laxman Dewangan
efbbf91f79 pwm: Use conftest to findout if pwm_ops has owner
Use conftest method to find out the pwm_ops has
owner member or not. The owner member from pwm_ops
struct has been removed from Linux 6.7 with
commit 384461abcab6 ("pwm: Manage owner assignment
implicitly for drivers").

Bug 4346767

Change-Id: I7b98463b16d400a656a79db3a0c7aa645f20085d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028573
(cherry picked from commit b0bfc4b801)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3030107
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-18 09:11:34 -08:00
Laxman Dewangan
d9abb90f16 pwm: tachometer: Remove unused APIs
From Linux kernel version 6.0, some of the callback ops are
removed from pwm like config, enable, disable.

Remove the implementation of these callbacks for Linux kernel
version 6.0 and above. Add the required callback for version 6.0

Note: This change is not tested on V6.0. This is the compilation fix.

Bug 3767126
Bug 3789780


Change-Id: If95ccf584208d351a5478c77a7d417fcd6cdbc21
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2773474
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-09-10 23:43:31 -07:00
Sandipan Patra
9b754839fb tach: Add show_rpm attribute on pwm-tegra-tach
Below changes are supported:
  - Added show rpm attribute to pwm-tegra-tachometer
  - Added HWMON registration for pwm-tegra-tachometer
  - Disbale interrupt to skip overrun/underrun configurations, so that
    rpm regiseter is configured properly to provide correct rpm reading.

Bug 3771589

Change-Id: Ie4a45eab03c4dbefb3b5abfd76f8dba8909d61ec
Signed-off-by: Sandipan Patra <spatra@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2768987
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-09-05 06:35:07 -07:00
Laxman Dewangan
3a5b645b03 pwm: Add pwm based Tegra tachometer
Add PWM based NVIDIA tegra tachometer which capture the pwm
and reports the speed.

Bug 3621819

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