Lines Matching full:dpll
7 #include <linux/dpll.h>
113 * @dpll: pointer to dpll
114 * @dpll_priv: private data pointer passed on dpll registration
128 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_frequency_set() argument
152 * @dpll: pointer to dpll
153 * @dpll_priv: private data pointer passed on dpll registration
166 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_input_frequency_set() argument
169 return ice_dpll_frequency_set(pin, pin_priv, dpll, dpll_priv, frequency, in ice_dpll_input_frequency_set()
177 * @dpll: pointer to dpll
178 * @dpll_priv: private data pointer passed on dpll registration
191 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_output_frequency_set() argument
194 return ice_dpll_frequency_set(pin, pin_priv, dpll, dpll_priv, frequency, in ice_dpll_output_frequency_set()
202 * @dpll: pointer to dpll
203 * @dpll_priv: private data pointer passed on dpll registration
217 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_frequency_get() argument
236 * @dpll: pointer to dpll
237 * @dpll_priv: private data pointer passed on dpll registration
250 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_input_frequency_get() argument
253 return ice_dpll_frequency_get(pin, pin_priv, dpll, dpll_priv, frequency, in ice_dpll_input_frequency_get()
261 * @dpll: pointer to dpll
262 * @dpll_priv: private data pointer passed on dpll registration
275 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_output_frequency_get() argument
278 return ice_dpll_frequency_get(pin, pin_priv, dpll, dpll_priv, frequency, in ice_dpll_output_frequency_get()
286 * @dpll_idx: dpll index to connect to output pin
386 * dpll, for rclk pins states are separated for each parent.
498 * @dpll: ice dpll pointer
500 * @prio: priority value being set on a dpll
511 ice_dpll_hw_input_prio_set(struct ice_pf *pf, struct ice_dpll *dpll, in ice_dpll_hw_input_prio_set() argument
517 ret = ice_aq_set_cgu_ref_prio(&pf->hw, dpll->dpll_idx, pin->idx, in ice_dpll_hw_input_prio_set()
526 dpll->input_prio[pin->idx] = prio; in ice_dpll_hw_input_prio_set()
532 * ice_dpll_lock_status_get - get dpll lock status callback
533 * @dpll: registered dpll pointer
534 * @dpll_priv: private data pointer passed on dpll registration
535 * @status: on success holds dpll's lock status
539 * Dpll subsystem callback, provides dpll's lock status.
547 ice_dpll_lock_status_get(const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_lock_status_get() argument
563 * ice_dpll_mode_get - get dpll's working mode
564 * @dpll: registered dpll pointer
565 * @dpll_priv: private data pointer passed on dpll registration
566 * @mode: on success holds current working mode of dpll
569 * Dpll subsystem callback. Provides working mode of dpll.
576 static int ice_dpll_mode_get(const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_mode_get() argument
591 * ice_dpll_pin_state_set - set pin's state on dpll
594 * @dpll: registered dpll pointer
595 * @dpll_priv: private data pointer passed on dpll registration
609 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_pin_state_set() argument
635 * ice_dpll_output_state_set - enable/disable output pin on dpll device
638 * @dpll: dpll being configured
639 * @dpll_priv: private data pointer passed on dpll registration
643 * Dpll subsystem callback. Set given state on output type pin.
652 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_output_state_set() argument
665 return ice_dpll_pin_state_set(pin, pin_priv, dpll, dpll_priv, enable, in ice_dpll_output_state_set()
670 * ice_dpll_input_state_set - enable/disable input pin on dpll levice
673 * @dpll: dpll being configured
674 * @dpll_priv: private data pointer passed on dpll registration
678 * Dpll subsystem callback. Enables given mode on input type pin.
687 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_input_state_set() argument
693 return ice_dpll_pin_state_set(pin, pin_priv, dpll, dpll_priv, enable, in ice_dpll_input_state_set()
698 * ice_dpll_pin_state_get - set pin's state on dpll
701 * @dpll: registered dpll pointer
702 * @dpll_priv: private data pointer passed on dpll registration
716 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_pin_state_get() argument
744 * ice_dpll_output_state_get - get output pin state on dpll device
747 * @dpll: registered dpll pointer
748 * @dpll_priv: private data pointer passed on dpll registration
752 * Dpll subsystem callback. Check state of a pin.
761 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_output_state_get() argument
765 return ice_dpll_pin_state_get(pin, pin_priv, dpll, dpll_priv, state, in ice_dpll_output_state_get()
770 * ice_dpll_input_state_get - get input pin state on dpll device
773 * @dpll: registered dpll pointer
774 * @dpll_priv: private data pointer passed on dpll registration
778 * Dpll subsystem callback. Check state of a input pin.
787 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_input_state_get() argument
791 return ice_dpll_pin_state_get(pin, pin_priv, dpll, dpll_priv, state, in ice_dpll_input_state_get()
796 * ice_dpll_input_prio_get - get dpll's input prio
799 * @dpll: registered dpll pointer
800 * @dpll_priv: private data pointer passed on dpll registration
801 * @prio: on success - returns input priority on dpll
804 * Dpll subsystem callback. Handler for getting priority of a input pin.
813 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_input_prio_get() argument
828 * ice_dpll_input_prio_set - set dpll input prio
831 * @dpll: registered dpll pointer
832 * @dpll_priv: private data pointer passed on dpll registration
833 * @prio: input priority to be set on dpll
836 * Dpll subsystem callback. Handler for setting priority of a input pin.
845 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_input_prio_set() argument
867 * @dpll: registered dpll pointer
868 * @dpll_priv: private data pointer passed on dpll registration
872 * Dpll subsystem callback. Handler for getting direction of a input pin.
879 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_input_direction() argument
892 * @dpll: registered dpll pointer
893 * @dpll_priv: private data pointer passed on dpll registration
897 * Dpll subsystem callback. Handler for getting direction of an output pin.
904 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_output_direction() argument
917 * @dpll: registered dpll pointer
918 * @dpll_priv: private data pointer passed on dpll registration
922 * Dpll subsystem callback. Handler for getting phase adjust value of a pin.
931 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_pin_phase_adjust_get() argument
949 * @dpll: registered dpll pointer
950 * @dpll_priv: private data pointer passed on dpll registration
955 * Helper for dpll subsystem callback. Handler for setting phase adjust value
965 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_pin_phase_adjust_set() argument
1007 "err:%d %s failed to set pin phase_adjust:%d for pin:%u on dpll:%u\n", in ice_dpll_pin_phase_adjust_set()
1019 * @dpll: registered dpll pointer
1020 * @dpll_priv: private data pointer passed on dpll registration
1024 * Dpll subsystem callback. Wraps a handler for setting phase adjust on input
1034 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_input_phase_adjust_set() argument
1038 return ice_dpll_pin_phase_adjust_set(pin, pin_priv, dpll, dpll_priv, in ice_dpll_input_phase_adjust_set()
1047 * @dpll: registered dpll pointer
1048 * @dpll_priv: private data pointer passed on dpll registration
1052 * Dpll subsystem callback. Wraps a handler for setting phase adjust on output
1062 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_output_phase_adjust_set() argument
1066 return ice_dpll_pin_phase_adjust_set(pin, pin_priv, dpll, dpll_priv, in ice_dpll_output_phase_adjust_set()
1075 * ice_dpll_phase_offset_get - callback for get dpll phase shift value
1078 * @dpll: registered dpll pointer
1079 * @dpll_priv: private data pointer passed on dpll registration
1083 * Dpll subsystem callback. Handler for getting phase shift value between
1084 * dpll's input and output.
1093 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_phase_offset_get() argument
1113 * @dpll: registered dpll pointer
1114 * @dpll_priv: private data pointer passed on dpll registration
1118 * Dpll subsystem callback. Handler for setting embedded sync frequency value
1128 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_output_esync_set() argument
1168 * @dpll: registered dpll pointer
1169 * @dpll_priv: private data pointer passed on dpll registration
1173 * Dpll subsystem callback. Handler for getting embedded sync frequency value
1183 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_output_esync_get() argument
1217 * @dpll: registered dpll pointer
1218 * @dpll_priv: private data pointer passed on dpll registration
1222 * Dpll subsystem callback. Handler for setting embedded sync frequency value
1232 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_input_esync_set() argument
1272 * @dpll: registered dpll pointer
1273 * @dpll_priv: private data pointer passed on dpll registration
1277 * Dpll subsystem callback. Handler for getting embedded sync frequency value
1287 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_input_esync_get() argument
1326 * Dpll subsystem callback, set a state of a rclk pin on a parent pin
1384 * dpll subsystem callback, get a state of a recovered clock pin.
1463 * ice_generate_clock_id - generates unique clock_id for registering dpll.
1466 * Generates unique (per board) clock_id for allocation and search of dpll
1467 * devices in Linux dpll subsystem.
1477 * ice_dpll_notify_changes - notify dpll subsystem about changes
1478 * @d: pointer do dpll
1480 * Once change detected appropriate event is submitted to the dpll subsystem.
1488 dpll_device_change_ntf(d->dpll); in ice_dpll_notify_changes()
1507 * ice_dpll_update_state - update dpll state
1509 * @d: pointer to queried dpll device
1510 * @init: if function called on initialization of ice dpll
1512 * Poll current state of dpll from hw and update ice_dpll struct.
1530 "update dpll=%d, prev_src_idx:%u, src_idx:%u, state:%d, prev:%d mode:%d\n", in ice_dpll_update_state()
1535 "update dpll=%d state failed, ret=%d %s\n", in ice_dpll_update_state()
1583 * DPLLs periodic worker is responsible for polling state of dpll.
1623 * ice_dpll_release_pins - release pins resources from dpll subsystem
1627 * Release resources of given pins array in the dpll subsystem.
1638 * ice_dpll_get_pins - get pins from dpll subsystem
1643 * @clock_id: clock_id of dpll device
1645 * Get pins - allocate - in dpll subsystem, store them in pin field of given
1676 * ice_dpll_unregister_pins - unregister pins from a dpll
1677 * @dpll: dpll device pointer
1682 * Unregister pins of a given array of pins from given dpll device registered in
1683 * dpll subsystem.
1686 ice_dpll_unregister_pins(struct dpll_device *dpll, struct ice_dpll_pin *pins, in ice_dpll_unregister_pins() argument
1692 dpll_pin_unregister(dpll, pins[i].pin, ops, &pins[i]); in ice_dpll_unregister_pins()
1696 * ice_dpll_register_pins - register pins with a dpll
1697 * @dpll: dpll pointer to register pins with
1702 * Register pins of a given array with given dpll in dpll subsystem.
1709 ice_dpll_register_pins(struct dpll_device *dpll, struct ice_dpll_pin *pins, in ice_dpll_register_pins() argument
1715 ret = dpll_pin_register(dpll, pins[i].pin, ops, &pins[i]); in ice_dpll_register_pins()
1724 dpll_pin_unregister(dpll, pins[i].pin, ops, &pins[i]); in ice_dpll_register_pins()
1734 * @first: dpll device pointer
1735 * @second: dpll device pointer
1738 * Release pins resources to the dpll subsystem.
1758 * @start_idx: on which index shall allocation start in dpll subsystem
1761 * @first: dpll device pointer
1762 * @second: dpll device pointer
1764 * Allocate directly connected pins of a given array in dpll subsystem.
1804 * Deregister rclk pin from parent pins and release resources in dpll subsystem.
1830 * @start_idx: on which index shall allocation start in dpll subsystem
1833 * Allocate resource for recovered clock pin in dpll subsystem. Register the
1886 * Release resources of directly connected pins from the dpll subsystem.
1900 ice_dpll_unregister_pins(dp->dpll, inputs, &ice_dpll_input_ops, in ice_dpll_deinit_pins()
1902 ice_dpll_unregister_pins(de->dpll, inputs, &ice_dpll_input_ops, in ice_dpll_deinit_pins()
1907 ice_dpll_unregister_pins(dp->dpll, outputs, in ice_dpll_deinit_pins()
1909 ice_dpll_unregister_pins(de->dpll, outputs, in ice_dpll_deinit_pins()
1920 * Initialize directly connected pf's pins within pf's dplls in a Linux dpll
1935 pf->dplls.eec.dpll, pf->dplls.pps.dpll); in ice_dpll_init_pins()
1943 pf->dplls.eec.dpll, in ice_dpll_init_pins()
1944 pf->dplls.pps.dpll); in ice_dpll_init_pins()
1958 &ice_dpll_output_ops, pf->dplls.pps.dpll, in ice_dpll_init_pins()
1959 pf->dplls.eec.dpll); in ice_dpll_init_pins()
1962 &ice_dpll_input_ops, pf->dplls.pps.dpll, in ice_dpll_init_pins()
1963 pf->dplls.eec.dpll); in ice_dpll_init_pins()
1968 * ice_dpll_deinit_dpll - deinitialize dpll device
1973 * If cgu is owned unregister the dpll from dpll subsystem.
1974 * Release resources of dpll device from dpll subsystem.
1980 dpll_device_unregister(d->dpll, &ice_dpll_ops, d); in ice_dpll_deinit_dpll()
1981 dpll_device_put(d->dpll); in ice_dpll_deinit_dpll()
1985 * ice_dpll_init_dpll - initialize dpll device in dpll subsystem
1987 * @d: dpll to be initialized
1989 * @type: type of dpll being initialized
1991 * Allocate dpll instance for this board in dpll subsystem, if cgu is controlled
1992 * by this NIC, register dpll with the callback ops.
2005 d->dpll = dpll_device_get(clock_id, d->dpll_idx, THIS_MODULE); in ice_dpll_init_dpll()
2006 if (IS_ERR(d->dpll)) { in ice_dpll_init_dpll()
2007 ret = PTR_ERR(d->dpll); in ice_dpll_init_dpll()
2015 ret = dpll_device_register(d->dpll, type, &ice_dpll_ops, d); in ice_dpll_init_dpll()
2017 dpll_device_put(d->dpll); in ice_dpll_init_dpll()
2026 * ice_dpll_deinit_worker - deinitialize dpll kworker
2029 * Stop dpll's kworker, release it's resources.
2279 * ice_dpll_init_info - prepare pf's dpll information structure
2283 * Acquire (from HW) and set basic dpll information (on pf->dplls struct).
2373 * ice_dpll_deinit - Disable the driver/HW support for dpll subsystem
2374 * the dpll device.
2377 * Handles the cleanup work required after dpll initialization, freeing
2378 * resources and unregistering the dpll, pin and all resources used for
2399 * ice_dpll_init - initialize support for dpll subsystem
2402 * Set up the device dplls, register them and pins connected within Linux dpll
2403 * subsystem. Allow userspace to obtain state of DPLL and handling of DPLL