diff options
| author | Maxime Ripard <maxime@cerno.tech> | 2020-04-14 09:19:50 +0200 |
|---|---|---|
| committer | Maxime Ripard <maxime@cerno.tech> | 2020-04-14 09:19:50 +0200 |
| commit | a4721ced760684d1776bf31f7925aa41bb3f4846 (patch) | |
| tree | a76e23b60ecceed68b5fa4904f677fe20e304b6e /include/linux/ptp_clock_kernel.h | |
| parent | 83a196773b8bc6702f49df1eddc848180e350340 (diff) | |
| parent | 8f3d9f354286745c751374f5f1fcafee6b3f3136 (diff) | |
Merge v5.7-rc1 into drm-misc-fixes
Start the new drm-misc-fixes cycle.
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
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(). |
