]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net/mlx5: Add init and destruction functions for a single HW clock
authorJianbo Liu <jianbol@nvidia.com>
Mon, 3 Feb 2025 21:35:04 +0000 (23:35 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 6 Feb 2025 09:14:00 +0000 (10:14 +0100)
commitccb717a88b2ed57e464c3099d2e8b0c9db7cef21
tree4adc7b3c574992a19da5ed9227711a0fe1a75e5b
parent9f722fb105216771f3a494a83dfad445de8a7f2b
net/mlx5: Add init and destruction functions for a single HW clock

Move hardware clock initialization and destruction to the functions,
which will be used for dynamically allocated clock. Such clock is
shared by all the devices if the queried clock identities are same.

The out_work is for PPS out event, which can't be triggered when clock
is shared, so INIT_WORK is not moved to the initialization function.
Besides, we still need to register notifier for each device.

Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Carolina Jubran <cjubran@nvidia.com>
Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c