diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2024-10-24 02:20:02 +0000 |
---|---|---|
committer | Rob Herring (Arm) <robh@kernel.org> | 2024-10-24 16:35:48 -0500 |
commit | 02ac5f9d6caec96071103f7c62b5117526e47b64 (patch) | |
tree | f77b3063f748908f67a7e570fd2c53b48a2e1b3b /tools/perf/scripts/python/gecko.py | |
parent | 2e030910fa90a1e46333c092c8bd00746a911be5 (diff) | |
download | linux-02ac5f9d6caec96071103f7c62b5117526e47b64.tar.gz linux-02ac5f9d6caec96071103f7c62b5117526e47b64.tar.bz2 linux-02ac5f9d6caec96071103f7c62b5117526e47b64.zip |
of: property: add of_graph_get_next_port()
We have endpoint base functions
- of_graph_get_next_endpoint()
- of_graph_get_endpoint_count()
- for_each_endpoint_of_node()
Here, for_each_endpoint_of_node() loop finds each endpoints
ports {
port@0 {
(1) endpoint {...};
};
port@1 {
(2) endpoint {...};
};
...
};
In above case, it finds endpoint as (1) -> (2) -> ...
Basically, user/driver knows which port is used for what, but not in
all cases. For example on flexible/generic driver case, how many ports
are used is not fixed.
For example Sound Generic Card driver which is very flexible/generic and
used from many venders can't know how many ports are used, and used for
what, because it depends on each vender SoC and/or its used board.
And more, the port can have multi endpoints. For example Generic Sound
Card case, it supports many type of connection between CPU / Codec, and
some of them uses multi endpoint in one port. see below.
ports {
(A) port@0 {
(1) endpoint@0 {...};
(2) endpoint@1 {...};
};
(B) port@1 {
(3) endpoint {...};
};
...
};
Generic Sound Card want to handle each connection via "port" base instead
of "endpoint" base. But, it is very difficult to handle each "port" via
existing for_each_endpoint_of_node(). Because getting each "port" via
of_get_parent() from each "endpoint" doesn't work. For example in above
case, both (1) (2) endpoint has same "port" (= A).
Add "port" base functions.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87ldyeb5t9.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/gecko.py')
0 files changed, 0 insertions, 0 deletions