Commit 995a9090b2b7dc734351f3ac0ba8d913ffb87001
Committed by
David S. Miller
1 parent
2173bff5dc
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
ptp: Add a method for obtaining the device index.
This commit adds a method that MAC drivers may call in order to find out the device number of their associated PTP Hardware Clock. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 2 changed files with 14 additions and 0 deletions Side-by-side Diff
drivers/ptp/ptp_clock.c
include/linux/ptp_clock_kernel.h
... | ... | @@ -136,5 +136,13 @@ |
136 | 136 | extern void ptp_clock_event(struct ptp_clock *ptp, |
137 | 137 | struct ptp_clock_event *event); |
138 | 138 | |
139 | +/** | |
140 | + * ptp_clock_index() - obtain the device index of a PTP clock | |
141 | + * | |
142 | + * @ptp: The clock obtained from ptp_clock_register(). | |
143 | + */ | |
144 | + | |
145 | +extern int ptp_clock_index(struct ptp_clock *ptp); | |
146 | + | |
139 | 147 | #endif |