Commit Graph

7 Commits

Author SHA1 Message Date
Jon Hunter
10fd025187 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>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-16 15:23:14 -08:00
Laxman Dewangan
b7cbe748e1 pwm: Use conftest to find if pwm_ops has config
Use conftest to determine if pwm_ops struct has config
callback or not. This call back is deprecated from
commit 0829c35dc534 ("pwm: Drop support for legacy drivers")
in Linux 6.0.

Bug 4387902

Change-Id: Ic56d5955e5cfd15acb664fc11b549b9b91277182
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037039
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-19 04:03:13 -08:00
Laxman Dewangan
b0bfc4b801 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
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-06 22:40:57 -08:00
Laxman Dewangan
9de2a9da7f pwm: Drop owner from pwm_ops for Linux 6.7
The member "owner" is removed from the pwm_ops from
Linux 6.7 onwards with below change.
***
commit 384461abcab6602abc06c2dfb8fb99beeeaa12b0
Author: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

    pwm: Manage owner assignment implicitly for drivers
***

Remove this member.

Bug 4346767

Change-Id: I7893c29641d15ac7ef56d29625a2df696872c659
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3019999
Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-23 11:09:33 -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