Lines Matching full:dpll

7 #include <linux/dpll.h>
107 * @dpll: pointer to dpll
108 * @dpll_priv: private data pointer passed on dpll registration
122 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_frequency_set() argument
146 * @dpll: pointer to dpll
147 * @dpll_priv: private data pointer passed on dpll registration
160 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_input_frequency_set() argument
163 return ice_dpll_frequency_set(pin, pin_priv, dpll, dpll_priv, frequency, in ice_dpll_input_frequency_set()
171 * @dpll: pointer to dpll
172 * @dpll_priv: private data pointer passed on dpll registration
185 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_output_frequency_set() argument
188 return ice_dpll_frequency_set(pin, pin_priv, dpll, dpll_priv, frequency, in ice_dpll_output_frequency_set()
196 * @dpll: pointer to dpll
197 * @dpll_priv: private data pointer passed on dpll registration
211 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_frequency_get() argument
230 * @dpll: pointer to dpll
231 * @dpll_priv: private data pointer passed on dpll registration
244 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_input_frequency_get() argument
247 return ice_dpll_frequency_get(pin, pin_priv, dpll, dpll_priv, frequency, in ice_dpll_input_frequency_get()
255 * @dpll: pointer to dpll
256 * @dpll_priv: private data pointer passed on dpll registration
269 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_output_frequency_get() argument
272 return ice_dpll_frequency_get(pin, pin_priv, dpll, dpll_priv, frequency, in ice_dpll_output_frequency_get()
280 * @dpll_idx: dpll index to connect to output pin
380 * dpll, for rclk pins states are separated for each parent.
492 * @dpll: ice dpll pointer
494 * @prio: priority value being set on a dpll
505 ice_dpll_hw_input_prio_set(struct ice_pf *pf, struct ice_dpll *dpll, in ice_dpll_hw_input_prio_set() argument
511 ret = ice_aq_set_cgu_ref_prio(&pf->hw, dpll->dpll_idx, pin->idx, in ice_dpll_hw_input_prio_set()
520 dpll->input_prio[pin->idx] = prio; in ice_dpll_hw_input_prio_set()
526 * ice_dpll_lock_status_get - get dpll lock status callback
527 * @dpll: registered dpll pointer
528 * @dpll_priv: private data pointer passed on dpll registration
529 * @status: on success holds dpll's lock status
532 * Dpll subsystem callback, provides dpll's lock status.
540 ice_dpll_lock_status_get(const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_lock_status_get() argument
555 * ice_dpll_mode_get - get dpll's working mode
556 * @dpll: registered dpll pointer
557 * @dpll_priv: private data pointer passed on dpll registration
558 * @mode: on success holds current working mode of dpll
561 * Dpll subsystem callback. Provides working mode of dpll.
568 static int ice_dpll_mode_get(const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_mode_get() argument
583 * ice_dpll_pin_state_set - set pin's state on dpll
586 * @dpll: registered dpll pointer
587 * @dpll_priv: private data pointer passed on dpll registration
601 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_pin_state_set() argument
627 * ice_dpll_output_state_set - enable/disable output pin on dpll device
630 * @dpll: dpll being configured
631 * @dpll_priv: private data pointer passed on dpll registration
635 * Dpll subsystem callback. Set given state on output type pin.
644 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_output_state_set() argument
655 return ice_dpll_pin_state_set(pin, pin_priv, dpll, dpll_priv, enable, in ice_dpll_output_state_set()
660 * ice_dpll_input_state_set - enable/disable input pin on dpll levice
663 * @dpll: dpll being configured
664 * @dpll_priv: private data pointer passed on dpll registration
668 * Dpll subsystem callback. Enables given mode on input type pin.
677 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_input_state_set() argument
683 return ice_dpll_pin_state_set(pin, pin_priv, dpll, dpll_priv, enable, in ice_dpll_input_state_set()
688 * ice_dpll_pin_state_get - set pin's state on dpll
691 * @dpll: registered dpll pointer
692 * @dpll_priv: private data pointer passed on dpll registration
706 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_pin_state_get() argument
734 * ice_dpll_output_state_get - get output pin state on dpll device
737 * @dpll: registered dpll pointer
738 * @dpll_priv: private data pointer passed on dpll registration
742 * Dpll subsystem callback. Check state of a pin.
751 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_output_state_get() argument
755 return ice_dpll_pin_state_get(pin, pin_priv, dpll, dpll_priv, state, in ice_dpll_output_state_get()
760 * ice_dpll_input_state_get - get input pin state on dpll device
763 * @dpll: registered dpll pointer
764 * @dpll_priv: private data pointer passed on dpll registration
768 * Dpll subsystem callback. Check state of a input pin.
777 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_input_state_get() argument
781 return ice_dpll_pin_state_get(pin, pin_priv, dpll, dpll_priv, state, in ice_dpll_input_state_get()
786 * ice_dpll_input_prio_get - get dpll's input prio
789 * @dpll: registered dpll pointer
790 * @dpll_priv: private data pointer passed on dpll registration
791 * @prio: on success - returns input priority on dpll
794 * Dpll subsystem callback. Handler for getting priority of a input pin.
803 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_input_prio_get() argument
818 * ice_dpll_input_prio_set - set dpll input prio
821 * @dpll: registered dpll pointer
822 * @dpll_priv: private data pointer passed on dpll registration
823 * @prio: input priority to be set on dpll
826 * Dpll subsystem callback. Handler for setting priority of a input pin.
835 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_input_prio_set() argument
857 * @dpll: registered dpll pointer
858 * @dpll_priv: private data pointer passed on dpll registration
862 * Dpll subsystem callback. Handler for getting direction of a input pin.
869 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_input_direction() argument
882 * @dpll: registered dpll pointer
883 * @dpll_priv: private data pointer passed on dpll registration
887 * Dpll subsystem callback. Handler for getting direction of an output pin.
894 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_output_direction() argument
907 * @dpll: registered dpll pointer
908 * @dpll_priv: private data pointer passed on dpll registration
912 * Dpll subsystem callback. Handler for getting phase adjust value of a pin.
921 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_pin_phase_adjust_get() argument
939 * @dpll: registered dpll pointer
940 * @dpll_priv: private data pointer passed on dpll registration
945 * Helper for dpll subsystem callback. Handler for setting phase adjust value
955 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_pin_phase_adjust_set() argument
997 "err:%d %s failed to set pin phase_adjust:%d for pin:%u on dpll:%u\n", in ice_dpll_pin_phase_adjust_set()
1009 * @dpll: registered dpll pointer
1010 * @dpll_priv: private data pointer passed on dpll registration
1014 * Dpll subsystem callback. Wraps a handler for setting phase adjust on input
1024 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_input_phase_adjust_set() argument
1028 return ice_dpll_pin_phase_adjust_set(pin, pin_priv, dpll, dpll_priv, in ice_dpll_input_phase_adjust_set()
1037 * @dpll: registered dpll pointer
1038 * @dpll_priv: private data pointer passed on dpll registration
1042 * Dpll subsystem callback. Wraps a handler for setting phase adjust on output
1052 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_output_phase_adjust_set() argument
1056 return ice_dpll_pin_phase_adjust_set(pin, pin_priv, dpll, dpll_priv, in ice_dpll_output_phase_adjust_set()
1065 * ice_dpll_phase_offset_get - callback for get dpll phase shift value
1068 * @dpll: registered dpll pointer
1069 * @dpll_priv: private data pointer passed on dpll registration
1073 * Dpll subsystem callback. Handler for getting phase shift value between
1074 * dpll's input and output.
1083 const struct dpll_device *dpll, void *dpll_priv, in ice_dpll_phase_offset_get() argument
1108 * Dpll subsystem callback, set a state of a rclk pin on a parent pin
1166 * dpll subsystem callback, get a state of a recovered clock pin.
1241 * ice_generate_clock_id - generates unique clock_id for registering dpll.
1244 * Generates unique (per board) clock_id for allocation and search of dpll
1245 * devices in Linux dpll subsystem.
1255 * ice_dpll_notify_changes - notify dpll subsystem about changes
1256 * @d: pointer do dpll
1258 * Once change detected appropriate event is submitted to the dpll subsystem.
1266 dpll_device_change_ntf(d->dpll); in ice_dpll_notify_changes()
1285 * ice_dpll_update_state - update dpll state
1287 * @d: pointer to queried dpll device
1288 * @init: if function called on initialization of ice dpll
1290 * Poll current state of dpll from hw and update ice_dpll struct.
1308 "update dpll=%d, prev_src_idx:%u, src_idx:%u, state:%d, prev:%d mode:%d\n", in ice_dpll_update_state()
1313 "update dpll=%d state failed, ret=%d %s\n", in ice_dpll_update_state()
1361 * DPLLs periodic worker is responsible for polling state of dpll.
1401 * ice_dpll_release_pins - release pins resources from dpll subsystem
1405 * Release resources of given pins array in the dpll subsystem.
1416 * ice_dpll_get_pins - get pins from dpll subsystem
1421 * @clock_id: clock_id of dpll device
1423 * Get pins - allocate - in dpll subsystem, store them in pin field of given
1454 * ice_dpll_unregister_pins - unregister pins from a dpll
1455 * @dpll: dpll device pointer
1460 * Unregister pins of a given array of pins from given dpll device registered in
1461 * dpll subsystem.
1464 ice_dpll_unregister_pins(struct dpll_device *dpll, struct ice_dpll_pin *pins, in ice_dpll_unregister_pins() argument
1470 dpll_pin_unregister(dpll, pins[i].pin, ops, &pins[i]); in ice_dpll_unregister_pins()
1474 * ice_dpll_register_pins - register pins with a dpll
1475 * @dpll: dpll pointer to register pins with
1480 * Register pins of a given array with given dpll in dpll subsystem.
1487 ice_dpll_register_pins(struct dpll_device *dpll, struct ice_dpll_pin *pins, in ice_dpll_register_pins() argument
1493 ret = dpll_pin_register(dpll, pins[i].pin, ops, &pins[i]); in ice_dpll_register_pins()
1502 dpll_pin_unregister(dpll, pins[i].pin, ops, &pins[i]); in ice_dpll_register_pins()
1512 * @first: dpll device pointer
1513 * @second: dpll device pointer
1516 * Release pins resources to the dpll subsystem.
1536 * @start_idx: on which index shall allocation start in dpll subsystem
1539 * @first: dpll device pointer
1540 * @second: dpll device pointer
1542 * Allocate directly connected pins of a given array in dpll subsystem.
1582 * Deregister rclk pin from parent pins and release resources in dpll subsystem.
1608 * @start_idx: on which index shall allocation start in dpll subsystem
1611 * Allocate resource for recovered clock pin in dpll subsystem. Register the
1664 * Release resources of directly connected pins from the dpll subsystem.
1678 ice_dpll_unregister_pins(dp->dpll, inputs, &ice_dpll_input_ops, in ice_dpll_deinit_pins()
1680 ice_dpll_unregister_pins(de->dpll, inputs, &ice_dpll_input_ops, in ice_dpll_deinit_pins()
1685 ice_dpll_unregister_pins(dp->dpll, outputs, in ice_dpll_deinit_pins()
1687 ice_dpll_unregister_pins(de->dpll, outputs, in ice_dpll_deinit_pins()
1698 * Initialize directly connected pf's pins within pf's dplls in a Linux dpll
1713 pf->dplls.eec.dpll, pf->dplls.pps.dpll); in ice_dpll_init_pins()
1721 pf->dplls.eec.dpll, in ice_dpll_init_pins()
1722 pf->dplls.pps.dpll); in ice_dpll_init_pins()
1736 &ice_dpll_output_ops, pf->dplls.pps.dpll, in ice_dpll_init_pins()
1737 pf->dplls.eec.dpll); in ice_dpll_init_pins()
1740 &ice_dpll_input_ops, pf->dplls.pps.dpll, in ice_dpll_init_pins()
1741 pf->dplls.eec.dpll); in ice_dpll_init_pins()
1746 * ice_dpll_deinit_dpll - deinitialize dpll device
1751 * If cgu is owned unregister the dpll from dpll subsystem.
1752 * Release resources of dpll device from dpll subsystem.
1758 dpll_device_unregister(d->dpll, &ice_dpll_ops, d); in ice_dpll_deinit_dpll()
1759 dpll_device_put(d->dpll); in ice_dpll_deinit_dpll()
1763 * ice_dpll_init_dpll - initialize dpll device in dpll subsystem
1765 * @d: dpll to be initialized
1767 * @type: type of dpll being initialized
1769 * Allocate dpll instance for this board in dpll subsystem, if cgu is controlled
1770 * by this NIC, register dpll with the callback ops.
1783 d->dpll = dpll_device_get(clock_id, d->dpll_idx, THIS_MODULE); in ice_dpll_init_dpll()
1784 if (IS_ERR(d->dpll)) { in ice_dpll_init_dpll()
1785 ret = PTR_ERR(d->dpll); in ice_dpll_init_dpll()
1793 ret = dpll_device_register(d->dpll, type, &ice_dpll_ops, d); in ice_dpll_init_dpll()
1795 dpll_device_put(d->dpll); in ice_dpll_init_dpll()
1804 * ice_dpll_deinit_worker - deinitialize dpll kworker
1807 * Stop dpll's kworker, release it's resources.
1988 * ice_dpll_init_info - prepare pf's dpll information structure
1992 * Acquire (from HW) and set basic dpll information (on pf->dplls struct).
2082 * ice_dpll_deinit - Disable the driver/HW support for dpll subsystem
2083 * the dpll device.
2086 * Handles the cleanup work required after dpll initialization, freeing
2087 * resources and unregistering the dpll, pin and all resources used for
2108 * ice_dpll_init - initialize support for dpll subsystem
2111 * Set up the device dplls, register them and pins connected within Linux dpll
2112 * subsystem. Allow userspace to obtain state of DPLL and handling of DPLL