sue, but I think
it is just luck, I think.
Thank you for your test !!
I will post the patch with below tag if our test team could confirm it.
Tested-by: Detlev Casanova
Best regards
---
Kuninori Morimoto
Thank you for your help !!
Best regards
---
Kuninori Morimoto
From 3995478ae84240b24964a458ecbefe9fb6dc2272 Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto
Date: Tue, 25 Feb 2025 09:54:47 +0900
Subject: [PATCH] ASoC: simple-card-utils: Don't use __free(device_node) at
graph_util_parse_dai()
Hi Detlev
Thank you for Cc:ing to me.
Sorry for my late response. Monday was holiday in Japan.
> I'm really feel like simple_util_clean_reference(card) in simple_probe()
> errors path should not be called anymore, since
(snip)
> I'm adding Kuninori Morimoto in the to list
gt; Thomas has merged v6 in drm-misc in commit
> 17558f97fe62fbe14757880a0aa998bfd194ea95
Yeah, I have noticed about it, and could find it on linux-next/master
before, but can't today. So I thought it was rejected for some reasons...
Thank you for your help !!
Best regards
---
Kuninori Morimoto
xx, NULL);
+ of_graph_get_endpoint_by_regs(xxx, 0, -1);
Signed-off-by: Kuninori Morimoto
Reviewed-by: Laurent Pinchart
Reviewed-by: Dmitry Baryshkov
---
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/panel/panel-raspberrypi-touchscr
xx, NULL);
+ of_graph_get_endpoint_by_regs(xxx, 0, -1);
Signed-off-by: Kuninori Morimoto
Reviewed-by: Laurent Pinchart
Reviewed-by: Dmitry Baryshkov
---
drivers/gpu/drm/tiny/arcpgu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/tiny/arcpgu.c b/drivers/gpu/drm/tiny/arcpgu.c
index 81abe
xx, NULL);
+ of_graph_get_endpoint_by_regs(xxx, 0, -1);
Signed-off-by: Kuninori Morimoto
Reviewed-by: Laurent Pinchart
Reviewed-by: Dmitry Baryshkov
---
drivers/gpu/drm/drm_of.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c
index 5c2ab
Hi Maarten, Maxime, Thomas
Cc Laurent
The patch has been created as 1 patch for "drivers/gpu/drm", but this time
I have finely disassembled the patch into 3 patches.
v6 -> v7
- created as 3 patches
Kuninori Morimoto (3):
gpu: drm: drm_of: replace of_graph_get_next_end
h_get_next_endpoint(xxx, NULL);
> + of_graph_get_endpoint_by_regs(xxx, 0, -1);
>
> Link: https://lore.kernel.org/r/20240202174941.ga310089-r...@kernel.org
> Signed-off-by: Kuninori Morimoto
> Reviewed-by: Laurent Pinchart
> Reviewed-by: Dmitry Bary
xx, NULL);
+ of_graph_get_endpoint_by_regs(xxx, 0, -1);
Link: https://lore.kernel.org/r/20240202174941.ga310089-r...@kernel.org
Signed-off-by: Kuninori Morimoto
Reviewed-by: Laurent Pinchart
Reviewed-by: Dmitry Baryshkov
---
v5 ->v6
- based on latest kernel branch
drivers/gpu/drm/drm_of.c
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Acked-by: Mark Brown
---
sound/soc/generic/audio-graph-card2.c | 104 --
1 file changed, 48 insertions(+), 56 deletions(-)
diff --git a/sound/soc/generic/audio-graph
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Reviewed-by: Tomi Valkeinen
Acked-by: Sakari Ailus
---
drivers/media/platform/xilinx/xilinx-tpg.c | 14 +++---
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/drivers
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Acked-by: Helge Deller
---
drivers/video/fbdev/omap2/omapfb/dss/dpi.c| 3 +-
drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | 66 ---
drivers/video/fbdev/omap2/omapfb/dss
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Reviewed-by: Tomi Valkeinen
Acked-by: Helge Deller
---
drivers/gpu/drm/omapdrm/dss/dpi.c | 3 ++-
drivers/gpu/drm/omapdrm/dss/sdi.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions
of_graph_get_next_port_endpoint(port1, P10); // P11
of_graph_get_next_port_endpoint(port1, P11); // NULL
Signed-off-by: Kuninori Morimoto
---
drivers/of/property.c| 27 +++
include/linux/of_graph.h | 21 +
2 files changed,
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Acked-by: Mark Brown
---
sound/soc/generic/audio-graph-card.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/generic/audio-graph-card.c
b/sound/soc/generic/audio
_each function from "endpoint" base to "port" base.
Signed-off-by: Kuninori Morimoto
Acked-by: Mark Brown
---
sound/soc/generic/test-component.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/generic/test-component.c
b/sound/soc/generic/tes
Current of_graph_get_next_endpoint() can be replaced by using
new of_graph_get_next_port().
Signed-off-by: Kuninori Morimoto
---
drivers/of/property.c | 18 +-
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/drivers/of/property.c b/drivers/of/property.c
index
on-endpoint node
- tidyup each git-log
v2 -> v3
- return NULL if it it doesn't have ports / port
- add visible comment on of_graph_get_next_ports()
v1 -> v2
- add each Reviewed-by / Acked-by
- tidyup/update Kernel Docs
- use prev as param
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"
ted in
> Documentation/process/coding-style.rst as well as the commit message of the
> patch removing the warning.
OK, I will update it and post v8 patch
Thank you for your help !!
Best regards
---
Kuninori Morimoto
dc48fa11e46f867ea4d75fa59ee87a7f48be144
("checkpatch/coding-style: deprecate 80-column warning")
Thank you for your help !!
Best regards
---
Kuninori Morimoto
tch-set, but what is the best way for you ?
Thank you for your help !!
Best regards
---
Kuninori Morimoto
xx, NULL);
+ of_graph_get_endpoint_by_regs(xxx, 0, -1);
Link: https://lore.kernel.org/r/20240202174941.ga310089-r...@kernel.org
Signed-off-by: Kuninori Morimoto
Reviewed-by: Laurent Pinchart
Reviewed-by: Dmitry Baryshkov
---
- 1 month passed, but nothing happened.
- rebased on latest linus branch
- add Dmitry Reviewed-by
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Reviewed-by: Tomi Valkeinen
---
drivers/media/platform/xilinx/xilinx-tpg.c | 14 +++---
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/drivers/media/platform/xilinx
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
---
drivers/video/fbdev/omap2/omapfb/dss/dpi.c| 3 +-
drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | 66 ---
drivers/video/fbdev/omap2/omapfb/dss/dss.c| 20
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Reviewed-by: Tomi Valkeinen
---
drivers/gpu/drm/omapdrm/dss/dpi.c | 3 ++-
drivers/gpu/drm/omapdrm/dss/sdi.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Acked-by: Mark Brown
---
sound/soc/generic/audio-graph-card2.c | 104 --
1 file changed, 48 insertions(+), 56 deletions(-)
diff --git a/sound/soc/generic/audio-graph
_each function from "endpoint" base to "port" base.
Signed-off-by: Kuninori Morimoto
Acked-by: Mark Brown
---
sound/soc/generic/test-component.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/generic/test-component.c
b/sound/soc/generic/test-co
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Acked-by: Mark Brown
---
sound/soc/generic/audio-graph-card.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/generic/audio-graph-card.c
b/sound/soc/generic/audio
Current of_graph_get_next_endpoint() can be replaced by using
new of_graph_get_next_port().
Signed-off-by: Kuninori Morimoto
---
drivers/of/property.c | 18 +-
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/drivers/of/property.c b/drivers/of/property.c
index
of_graph_get_next_port_endpoint(port1, P10); // P11
of_graph_get_next_port_endpoint(port1, P11); // NULL
Signed-off-by: Kuninori Morimoto
---
drivers/of/property.c| 27 +++
include/linux/of_graph.h | 21 +
2 files changed
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"
it it doesn't have ports / port
- add visible comment on of_graph_get_next_ports()
v1 -> v2
- add each Reviewed-by / Acked-by
- tidyup/update Kernel Docs
- use prev as parameter
- update git-log explanation
- remove extra changes
Kuninori Mo
xx, NULL);
+ of_graph_get_endpoint_by_regs(xxx, 0, -1);
Link: https://lore.kernel.org/r/20240202174941.ga310089-r...@kernel.org
Signed-off-by: Kuninori Morimoto
Reviewed-by: Laurent Pinchart
---
v3 -> v4
- based on latest linus/master branch
v2 -> v3
- based on latest linux-next/master
- Add
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Reviewed-by: Tomi Valkeinen
---
drivers/media/platform/xilinx/xilinx-tpg.c | 14 +++---
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/drivers/media/platform/xilinx
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
---
drivers/video/fbdev/omap2/omapfb/dss/dpi.c| 3 +-
drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | 66 ---
drivers/video/fbdev/omap2/omapfb/dss/dss.c| 20
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Reviewed-by: Tomi Valkeinen
---
drivers/gpu/drm/omapdrm/dss/dpi.c | 3 ++-
drivers/gpu/drm/omapdrm/dss/sdi.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Acked-by: Mark Brown
---
sound/soc/generic/audio-graph-card2.c | 104 --
1 file changed, 48 insertions(+), 56 deletions(-)
diff --git a/sound/soc/generic/audio-graph
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Acked-by: Mark Brown
---
sound/soc/generic/audio-graph-card.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/generic/audio-graph-card.c
b/sound/soc/generic/audio
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Acked-by: Mark Brown
---
sound/soc/sh/rcar/core.c | 21 +++--
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
_each function from "endpoint" base to "port" base.
Signed-off-by: Kuninori Morimoto
Acked-by: Mark Brown
---
sound/soc/generic/test-component.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/generic/test-component.c
b/sound/soc/generic/tes
of_graph_get_next_port_endpoint(port1, P10); // P11
of_graph_get_next_port_endpoint(port1, P11); // NULL
Signed-off-by: Kuninori Morimoto
---
drivers/of/property.c| 27 +++
include/linux/of_graph.h | 21 +
2 files changed,
some reasons.
node {
=> ports@0 {
port@0 { ... };
port@1 { ... };
...
};
=> ports@1 {
...
};
};
Add "ports
ve ports / port
- add visible comment on of_graph_get_next_ports()
v1 -> v2
- add each Reviewed-by / Acked-by
- tidyup/update Kernel Docs
- use prev as parameter
- update git-log explanation
- remove extra changes
Kuninori Morimoto (9):
of: prope
xx, NULL);
+ of_graph_get_endpoint_by_regs(xxx, 0, -1);
Link: https://lore.kernel.org/r/20240202174941.ga310089-r...@kernel.org
Signed-off-by: Kuninori Morimoto
Reviewed-by: Laurent Pinchart
---
v2 -> v3
- based on latest linux-next/master
- Add someone to "To" who is thought to be Maintai
Hi
> Now we can use new port related functions for port parsing. Use it.
>
> Signed-off-by: Kuninori Morimoto
> Reviewed-by: Tomi Valkeinen
> ---
I'm sorry, but this patch will get below warning
drivers/media/platform/xilinx/xilinx-tpg.c: In function 'xtpg_pa
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Reviewed-by: Tomi Valkeinen
---
drivers/media/platform/xilinx/xilinx-tpg.c | 13 +++--
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/drivers/media/platform/xilinx
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
---
drivers/video/fbdev/omap2/omapfb/dss/dpi.c| 3 +-
drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | 66 ---
drivers/video/fbdev/omap2/omapfb/dss/dss.c| 15
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Reviewed-by: Tomi Valkeinen
---
drivers/gpu/drm/omapdrm/dss/dpi.c | 3 ++-
drivers/gpu/drm/omapdrm/dss/sdi.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Acked-by: Mark Brown
---
sound/soc/generic/audio-graph-card2.c | 113 +++---
1 file changed, 48 insertions(+), 65 deletions(-)
diff --git a/sound/soc/generic/audio-graph
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Acked-by: Mark Brown
---
sound/soc/generic/audio-graph-card.c | 11 ++-
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/sound/soc/generic/audio-graph-card.c
b/sound/soc
_each function from "endpoint" base to "port" base.
Signed-off-by: Kuninori Morimoto
Acked-by: Mark Brown
---
sound/soc/generic/test-component.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/generic/test-component.c
b/sound/soc/generic/tes
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Acked-by: Mark Brown
---
sound/soc/sh/rcar/core.c | 21 +++--
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
of_graph_get_next_port_endpoint(port1, P10); // P11
of_graph_get_next_port_endpoint(port1, P11); // NULL
Signed-off-by: Kuninori Morimoto
---
drivers/of/property.c| 27 +++
include/linux/of_graph.h | 21 +
2 files changed,
some reasons.
node {
=> ports@0 {
port@0 { ... };
port@1 { ... };
...
};
=> ports@1 {
...
};
};
Add "ports
v2
- add each Reviewed-by / Acked-by
- tidyup/update Kernel Docs
- use prev as parameter
- update git-log explanation
- remove extra changes
Kuninori Morimoto (9):
of: property: add of_graph_get_next_port()
of: property: add of_graph_get_next_port_endpoint()
ASoC:
/* do something */
}
(C) xxx = node;
In this case, "(A) node" and "(C) node" are same, but "(B) node" are different.
New user might confuse about this behavior.
Thank you for your help !!
Best regards
---
Kuninori Morimoto
=> prev = of_node_get(parent);
...
}
Or I can do it if we can remove "const" from there.
Thank you for your help !!
Best regards
---
Kuninori Morimoto
sion board +
|| +--+|
|+->|Codec2|| Sound Card1
| +--+|
+---+
Here (A) is handled by ports0, and (B) is handled by ports1,
and each ports has many port nodes.
Thank you for your help !!
Best regards
---
Kuninori Morimoto
r cases.
Yes, indeed.
will update in v5
Thank you for your help !!
Best regards
---
Kuninori Morimoto
intain.
This code checks how many "port" node exists, because it needs to
manage data connection based on each "port".
The code was a little bit changed, but becomes more readable,
and was tested on my board.
Thank you for your help !!
Best regards
---
Kuninori Morimoto
t; #include
> > +#include
> > #include
> > #include
> >
> > @@ -744,7 +745,7 @@ static int xtpg_parse_of(struct xtpg_device *xtpg)
> > }
> >
>
> This function is looping over port nodes, why don't you make it use
> for_each_of
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Reviewed-by: Tomi Valkeinen
---
drivers/media/platform/xilinx/xilinx-tpg.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/xilinx/xilinx-tpg.c
b
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
---
drivers/video/fbdev/omap2/omapfb/dss/dpi.c| 3 +-
drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | 66 ---
drivers/video/fbdev/omap2/omapfb/dss/dss.c| 9 +--
drivers
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Reviewed-by: Tomi Valkeinen
---
drivers/gpu/drm/omapdrm/dss/dpi.c | 3 ++-
drivers/gpu/drm/omapdrm/dss/sdi.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Acked-by: Mark Brown
---
sound/soc/generic/audio-graph-card2.c | 113 +++---
1 file changed, 48 insertions(+), 65 deletions(-)
diff --git a/sound/soc/generic/audio-graph
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Acked-by: Mark Brown
---
sound/soc/generic/audio-graph-card.c | 11 ++-
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/sound/soc/generic/audio-graph-card.c
b/sound/soc
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Acked-by: Mark Brown
---
sound/soc/sh/rcar/core.c | 21 +++--
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
_each function from "endpoint" base to "port" base.
Signed-off-by: Kuninori Morimoto
Acked-by: Mark Brown
---
sound/soc/generic/test-component.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/generic/test-component.c
b/sound/soc/generic/tes
of_graph_get_next_port_endpoint(port1, P10); // P11
of_graph_get_next_port_endpoint(port1, P11); // NULL
Signed-off-by: Kuninori Morimoto
---
drivers/of/property.c| 27 +++
include/linux/of_graph.h | 21 +
2 files changed,
some reasons.
node {
=> ports@0 {
port@0 { ... };
port@1 { ... };
...
};
=> ports@1 {
...
};
};
Add "ports
p/update Kernel Docs
- use prev as parameter
- update git-log explanation
- remove extra changes
Kuninori Morimoto (9):
of: property: add of_graph_get_next_port()
of: property: add of_graph_get_next_port_endpoint()
ASoC: test-component: use new of_graph functions
ASo
_scoped(port, endpoint)
> > if (xxx == yyy)
> > return of_node_get(endpoint)
>
> Actually, you would do "return_ptr(endpoint)" here.
OK, nice to know about this
I will try to use this style on v4
Thank you for your help !!
Best regards
---
Kuninori Morimoto
oop too ?
For example, when user want to use the param.
for_each_of_graph_port_endpoint(port, endpoint)
if (xxx == yyy)
return endpoint;
for_each_of_graph_port_endpoint_scoped(port, endpoint)
if (xxx == yyy)
return of_node_get(endpoint)
Thank you for your help !!
Best regards
---
Kuninori Morimoto
struct device_node *port __free(device_node) =
> > + of_get_child_by_name(prev, "port");
> > +
> > + if (!port)
> > + prev = NULL;
>
> It looks like you leak here "prev".
Oops, yes ineed.
Thank you for pointing it, will fix it in v4
Best regards
---
Kuninori Morimoto
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Reviewed-by: Tomi Valkeinen
---
drivers/media/platform/xilinx/xilinx-tpg.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/xilinx/xilinx-tpg.c
b
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
---
drivers/video/fbdev/omap2/omapfb/dss/dpi.c| 3 +-
drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | 66 ---
drivers/video/fbdev/omap2/omapfb/dss/dss.c| 9 +--
drivers
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Reviewed-by: Tomi Valkeinen
---
drivers/gpu/drm/omapdrm/dss/dpi.c | 3 ++-
drivers/gpu/drm/omapdrm/dss/sdi.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Acked-by: Mark Brown
---
sound/soc/generic/audio-graph-card2.c | 111 --
1 file changed, 49 insertions(+), 62 deletions(-)
diff --git a/sound/soc/generic/audio-graph
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Acked-by: Mark Brown
---
sound/soc/generic/audio-graph-card.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/generic/audio-graph-card.c
b/sound/soc/generic
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Acked-by: Mark Brown
---
sound/soc/sh/rcar/core.c | 12 +++-
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index
_each function from "endpoint" base to "port" base.
Signed-off-by: Kuninori Morimoto
Acked-by: Mark Brown
---
sound/soc/generic/test-component.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/generic/test-component.c
b/sound/soc/generic/tes
x27;t check node name (= "endpoint").
To handle endpoint more intuitive, create of_graph_get_next_port_endpoint()
of_graph_get_next_port_endpoint(port1, NULL); // P10
of_graph_get_next_port_endpoint(port1, P10); // P11
of_graph_get_next_port_endpoint(port1, P11); // N
ot;, like below
node {
port { };
};
node {
ports {
port { };
};
};
Signed-off-by: Kuninori Morimoto
---
drivers/of/property.c| 112 +++
include/linu
; v3
- return NULL if it it doesn't have ports / port
- add visible comment on of_graph_get_next_ports()
v1 -> v2
- add each Reviewed-by / Acked-by
- tidyup/update Kernel Docs
- use prev as parameter
- update git-log explanation
- remo
xx, NULL);
+ of_graph_get_endpoint_by_regs(xxx, 0, -1);
Link: https://lore.kernel.org/r/20240202174941.ga310089-r...@kernel.org
Signed-off-by: Kuninori Morimoto
Reviewed-by: Laurent Pinchart
---
v1 -> v2
- based on latest linux-next/master
drivers/gpu/drm/drm_of.c | 4 +++-
driv
port {...};
};
};
both case (CASE1/2), we can use
of_graph_get_port_count(parent);
If the driver need to care multi ports, it should use such code, IMO.
nr = 0;
for_each_of_graph_ports(parent, ports) {
nr += of_graph_get_port_count(ports);
But of course we can handle it in v2 patch.
/* of_graph_get_port_count() cares multi ports inside */
of_graph_get_port_count(parent);
Thank you for your help !!
Best regards
---
Kuninori Morimoto
endpoint { ... };
};
};
};
Because it is *Generic* Sound Card driver, it need to know how many
"port" are used. In this case, using "endpoint" loop is not useful.
It want to use "port" base loop.
Thank you for your help !!
Best regards
---
Kuninori Morimoto
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Reviewed-by: Tomi Valkeinen
---
drivers/media/platform/xilinx/xilinx-tpg.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/xilinx/xilinx-tpg.c
b
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
---
drivers/video/fbdev/omap2/omapfb/dss/dpi.c| 3 +-
drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | 66 ---
drivers/video/fbdev/omap2/omapfb/dss/dss.c| 9 +--
drivers
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Reviewed-by: Tomi Valkeinen
---
drivers/gpu/drm/omapdrm/dss/dpi.c | 3 ++-
drivers/gpu/drm/omapdrm/dss/sdi.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Acked-by: Mark Brown
---
sound/soc/generic/audio-graph-card2.c | 111 --
1 file changed, 49 insertions(+), 62 deletions(-)
diff --git a/sound/soc/generic/audio-graph
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Acked-by: Mark Brown
---
sound/soc/generic/audio-graph-card.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/generic/audio-graph-card.c
b/sound/soc/generic
Now we can use new port related functions for port parsing. Use it.
Signed-off-by: Kuninori Morimoto
Acked-by: Mark Brown
---
sound/soc/sh/rcar/core.c | 12 +++-
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index
_each function from "endpoint" base to "port" base.
Signed-off-by: Kuninori Morimoto
---
sound/soc/generic/test-component.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/generic/test-component.c
b/sound/soc/generic/test-component.c
index e9
x27;t check node name (= "endpoint").
To handle endpoint more intuitive, create of_graph_get_next_port_endpoint()
of_graph_get_next_port_endpoint(port1, NULL); // A1
of_graph_get_next_port_endpoint(port1, A1); // A2
of_graph_get_next_port_endpoint(port1, A2); // NULL
Signed-off-by: Kuninori Morimo
quot; / "port" base functions.
For above case, we can use
for_each_of_graph_ports(node, ports) {
for_each_of_graph_port(ports, port) {
...
}
}
This loop works in case of "node" doesn't have "ports&
ndpoint base" loop only is not enough.
This patch-set add new "port base" for loop, and use it.
v1 -> v2
- add each Reviewed-by / Acked-by
- tidyup/update Kernel Docs
- use prev as parameter
- update git-log explanation
- remove extra cha
x in v2.
But it will use "prev" for param same as of_graph_get_next_endpoint()
> > +/**
> > + * for_each_of_graph_port_endpoint - iterate over every endpoint in a port
> > node
> > + * @parent: parent device or ports node
>
> Hmm, shouldn't the parent be a port node?
Thanks, will fix in v2
Thank you for your help !!
Best regards
---
Kuninori Morimoto
1 - 100 of 363 matches
Mail list logo