Lines Matching full: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, in coresight_disable_path_from()
355 * selected as a sink it will be configured as a sink, otherwise in coresight_disable_path_from()
431 * ETF devices are tricky... They can be a link or a sink, in coresight_enable_path()
433 * selected as a sink it will be configured as a sink, otherwise in coresight_enable_path()
445 * Sink is the first component turned on. If we in coresight_enable_path()
446 * failed to enable the sink, there are no components in coresight_enable_path()
516 * coresight_get_sink_by_id - returns the sink that matches the id
517 * @id: Id of the sink to match
519 * The name of a sink is unique, whether it is found on the AMBA bus or
521 * a sink.
620 * _coresight_build_path - recursively build a path from a @csdev to a sink.
622 * @sink: The final sink we want in this path.
625 * The tree of Coresight device is traversed until @sink is found.
626 * From there the sink is added to the list along with all the devices that led
627 * to that point - the end result is a list from source to sink. In that list
628 * the source is the first device and the sink the last one.
631 struct coresight_device *sink, in _coresight_build_path() argument
638 /* The sink has been found. Enqueue the element */ in _coresight_build_path()
639 if (csdev == sink) in _coresight_build_path()
642 if (coresight_is_percpu_source(csdev) && coresight_is_percpu_sink(sink) && in _coresight_build_path()
643 sink == per_cpu(csdev_sink, source_ops(csdev)->cpu_id(csdev))) { in _coresight_build_path()
644 if (_coresight_build_path(sink, sink, path) == 0) { in _coresight_build_path()
650 /* Not a sink - recursively explore each port found on this element */ in _coresight_build_path()
656 _coresight_build_path(child_dev, sink, path) == 0) { in _coresight_build_path()
667 * A path from this element to a sink has been found. The elements in _coresight_build_path()
668 * leading to the sink are already enqueued, all that is left to do in _coresight_build_path()
687 struct coresight_device *sink) in coresight_build_path() argument
692 if (!sink) in coresight_build_path()
701 rc = _coresight_build_path(source, sink, path); in coresight_build_path()
733 /* return true if the device is a suitable type for a default sink */
736 /* sink & correct subtype */ in coresight_is_def_sink_type()
745 * coresight_select_best_sink - return the best sink for use as default from
748 * @sink: current best sink.
749 * @depth: search depth where current sink was found.
750 * @new_sink: new sink for comparison with current sink.
751 * @new_depth: search depth where new sink was found.
756 * Where two sinks of equal priority are found, the sink closest to the
759 * return @new_sink & update @depth if better than @sink, else return @sink.
762 coresight_select_best_sink(struct coresight_device *sink, int *depth, in coresight_select_best_sink() argument
767 if (!sink) { in coresight_select_best_sink()
771 sink->subtype.sink_subtype) { in coresight_select_best_sink()
772 /* found better sink */ in coresight_select_best_sink()
775 sink->subtype.sink_subtype) && in coresight_select_best_sink()
777 /* found same but closer sink */ in coresight_select_best_sink()
783 return update ? new_sink : sink; in coresight_select_best_sink()
788 * source to find a suitable default sink.
791 * @depth: [in] search depth of calling dev, [out] depth of found sink.
794 * sink is encountered and return that sink to the original caller.
796 * If current device is a plain sink return that & depth, otherwise recursively
797 * call child connections looking for a sink. Select best possible using
800 * return best sink found, or NULL if not found at this node or child nodes.
817 * Not a sink we want - or possible child sink may be better. in coresight_find_sink()
821 struct coresight_device *child_dev, *sink = NULL; in coresight_find_sink() local
826 sink = coresight_find_sink(child_dev, &child_depth); in coresight_find_sink()
828 if (sink) in coresight_find_sink()
831 sink, in coresight_find_sink()
836 /* return found sink and depth */ in coresight_find_sink()
843 * coresight_find_default_sink: Find a sink suitable for use as a
844 * default sink.
846 * @csdev: starting source to find a connected sink.
848 * Walks connections graph looking for a suitable sink to enable for the
850 * to select the best sink.
852 * If a sink is found, then the default sink for this device is set and
856 * sink.
863 /* look for a default sink if we have not found for this device */ in coresight_find_default_sink()
875 struct coresight_device *sink = data; in coresight_remove_sink_ref() local
878 if (source->def_sink == sink) in coresight_remove_sink_ref()
884 * coresight_clear_default_sink: Remove all default sink references to the
885 * supplied sink.
887 * If supplied device is a sink, then check all the bus devices and clear
888 * out all the references to this sink from the coresight_device def_sink
891 * @csdev: coresight sink - remove references to this from all sources.