Lines Matching defs:sink

35  * struct coresight_node - elements of a path, from source to sink
353 * ETF devices are tricky... They can be a link or a sink,
355 * selected as a sink it will be configured as a sink, otherwise
431 * ETF devices are tricky... They can be a link or a sink,
433 * selected as a sink it will be configured as a sink, otherwise
446 * failed to enable the sink, there are no components
514 * coresight_get_sink_by_id - returns the sink that matches the id
515 * @id: Id of the sink to match
517 * The name of a sink is unique, whether it is found on the AMBA bus or
519 * a sink.
618 * _coresight_build_path - recursively build a path from a @csdev to a sink.
620 * @sink: The final sink we want in this path.
623 * The tree of Coresight device is traversed until @sink is found.
624 * From there the sink is added to the list along with all the devices that led
625 * to that point - the end result is a list from source to sink. In that list
626 * the source is the first device and the sink the last one.
629 struct coresight_device *sink,
636 /* The sink has been found. Enqueue the element */
637 if (csdev == sink)
640 if (coresight_is_percpu_source(csdev) && coresight_is_percpu_sink(sink) &&
641 sink == per_cpu(csdev_sink, source_ops(csdev)->cpu_id(csdev))) {
642 if (_coresight_build_path(sink, sink, path) == 0) {
648 /* Not a sink - recursively explore each port found on this element */
654 _coresight_build_path(child_dev, sink, path) == 0) {
665 * A path from this element to a sink has been found. The elements
666 * leading to the sink are already enqueued, all that is left to do
685 struct coresight_device *sink)
690 if (!sink)
699 rc = _coresight_build_path(source, sink, path);
731 /* return true if the device is a suitable type for a default sink */
734 /* sink & correct subtype */
743 * coresight_select_best_sink - return the best sink for use as default from
746 * @sink: current best sink.
747 * @depth: search depth where current sink was found.
748 * @new_sink: new sink for comparison with current sink.
749 * @new_depth: search depth where new sink was found.
754 * Where two sinks of equal priority are found, the sink closest to the
757 * return @new_sink & update @depth if better than @sink, else return @sink.
760 coresight_select_best_sink(struct coresight_device *sink, int *depth,
765 if (!sink) {
769 sink->subtype.sink_subtype) {
770 /* found better sink */
773 sink->subtype.sink_subtype) &&
775 /* found same but closer sink */
781 return update ? new_sink : sink;
786 * source to find a suitable default sink.
789 * @depth: [in] search depth of calling dev, [out] depth of found sink.
792 * sink is encountered and return that sink to the original caller.
794 * If current device is a plain sink return that & depth, otherwise recursively
795 * call child connections looking for a sink. Select best possible using
798 * return best sink found, or NULL if not found at this node or child nodes.
815 * Not a sink we want - or possible child sink may be better.
819 struct coresight_device *child_dev, *sink = NULL;
824 sink = coresight_find_sink(child_dev, &child_depth);
826 if (sink)
829 sink,
834 /* return found sink and depth */
841 * coresight_find_default_sink: Find a sink suitable for use as a
842 * default sink.
844 * @csdev: starting source to find a connected sink.
846 * Walks connections graph looking for a suitable sink to enable for the
848 * to select the best sink.
850 * If a sink is found, then the default sink for this device is set and
854 * sink.
861 /* look for a default sink if we have not found for this device */
873 struct coresight_device *sink = data;
876 if (source->def_sink == sink)
882 * coresight_clear_default_sink: Remove all default sink references to the
883 * supplied sink.
885 * If supplied device is a sink, then check all the bus devices and clear
886 * out all the references to this sink from the coresight_device def_sink
889 * @csdev: coresight sink - remove references to this from all sources.