diff options
Diffstat (limited to 'include/linux/ptp_clock_kernel.h')
| -rw-r--r-- | include/linux/ptp_clock_kernel.h | 19 | 
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/ptp_clock_kernel.h b/include/linux/ptp_clock_kernel.h index c64a1ef87240..121a7eda4593 100644 --- a/include/linux/ptp_clock_kernel.h +++ b/include/linux/ptp_clock_kernel.h @@ -223,6 +223,12 @@ extern s32 scaled_ppm_to_ppb(long ppm);  /**   * ptp_find_pin() - obtain the pin index of a given auxiliary function   * + * The caller must hold ptp_clock::pincfg_mux.  Drivers do not have + * access to that mutex as ptp_clock is an opaque type.  However, the + * core code acquires the mutex before invoking the driver's + * ptp_clock_info::enable() callback, and so drivers may call this + * function from that context. + *   * @ptp:    The clock obtained from ptp_clock_register().   * @func:   One of the ptp_pin_function enumerated values.   * @chan:   The particular functional channel to find. @@ -234,6 +240,19 @@ int ptp_find_pin(struct ptp_clock *ptp,  		 enum ptp_pin_function func, unsigned int chan);  /** + * ptp_find_pin_unlocked() - wrapper for ptp_find_pin() + * + * This function acquires the ptp_clock::pincfg_mux mutex before + * invoking ptp_find_pin().  Instead of using this function, drivers + * should most likely call ptp_find_pin() directly from their + * ptp_clock_info::enable() method. + * + */ + +int ptp_find_pin_unlocked(struct ptp_clock *ptp, +			  enum ptp_pin_function func, unsigned int chan); + +/**   * ptp_schedule_worker() - schedule ptp auxiliary work   *   * @ptp:    The clock obtained from ptp_clock_register().  |