summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorabhijit <abhijit@nvidia.com>2017-06-17 16:24:25 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-06-29 14:12:54 -0400
commitbf111baf4a2e32cfdad44df3aacfba38ce7b3ec3 (patch)
tree68609e2ab2fa4b2d81770ee04be991130d4ac73b /include
parentb30d6b5f396f22d95ccff89560b10182e7c7f6a7 (diff)
ptp-notifier: Changed get_ptp_hwtime callback
Issue: Current callback directly uses the hw interface function without ptp_lock. This might give wrong HW PTP time. Fix: Defined wrapper function which uses ptp_lock for reading the HW PTP time. Added this wrapper function as callback for get_ptp_hwtime. Bug 200316642 Change-Id: I2db4fefbf5ffbea6353bcb6b4f9b675e0becb165 Signed-off-by: Abhijit <abhijit@nvidia.com> Reviewed-on: https://git-master/r/1504339 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/platform/tegra/ptp-notifier.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/platform/tegra/ptp-notifier.h b/include/linux/platform/tegra/ptp-notifier.h
index 57a7b0070..17bd5e52c 100644
--- a/include/linux/platform/tegra/ptp-notifier.h
+++ b/include/linux/platform/tegra/ptp-notifier.h
@@ -21,7 +21,7 @@
21 21
22#if IS_ENABLED(CONFIG_TEGRA_PTP_NOTIFIER) 22#if IS_ENABLED(CONFIG_TEGRA_PTP_NOTIFIER)
23/* register / unregister HW time source */ 23/* register / unregister HW time source */
24void tegra_register_hwtime_source(u64 (*func)(void)); 24void tegra_register_hwtime_source(u64 (*func)(void *), void *data);
25void tegra_unregister_hwtime_source(void); 25void tegra_unregister_hwtime_source(void);
26 26
27/* clients registering / unregistering for time update events */ 27/* clients registering / unregistering for time update events */
@@ -41,7 +41,8 @@ u64 get_ptp_hwtime(void);
41#else /* CONFIG_TEGRA_PTP_NOTIFIER */ 41#else /* CONFIG_TEGRA_PTP_NOTIFIER */
42 42
43/* register / unregister HW time source */ 43/* register / unregister HW time source */
44static inline void tegra_register_hwtime_source(u64 (*func)(void)) 44static inline void tegra_register_hwtime_source(u64 (*func)(void *),
45 void *data)
45{ 46{
46} 47}
47 48