mbox series

[v4,resend,0/9] use for_each_endpoint_of_node()

Message ID 87v828s7v0.wl-kuninori.morimoto.gx@renesas.com
Headers show
Series use for_each_endpoint_of_node() | expand

Message

Kuninori Morimoto June 17, 2024, 12:58 a.m. UTC
Hi Rob, Helge, +Sakari, +Hans

2 weeks past. This is resend v4 patch-set.
I add +Sakari, +Hans on To.

We already have for_each_endpoint_of_node(), but some drivers are
not using it. This patch-set replace it.

This patch-set is related to "OF" (= Rob), but many driveres are for
"MultiMedia" (= Helge). I'm not sure who handle these.

I noticed that my posted 1 patch on (A) was not yet included on
linus/master. I have included it.

Dan is indicating it needs _scoped() macro, but it is new new feature.
So I think we want to have separate this patch-set and _scoped() patch-set.
I asked it to ML/Maintainer but no responce, so v4 doesn't include it.
It will be handled by other patch-set in the future.

[o] done
[*] this patch-set

	[o] tidyup of_graph_get_endpoint_count()
(A)	[o] replace endpoint func - use endpoint_by_regs()
	[*] replace endpoint func - use for_each()
	[ ] add new port function
	[ ] add new endpoint function

v3 -> v4
	- fixup ret handling

v2 -> v3
	- don't initialize pointer.
	- add Reviewed-by / Acked-by
	- include not-yet applied missing patch

v1 -> v2
	- fixup TI patch

Link: https://lore.kernel.org/r/8734sf6mgn.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87cyrauf0x.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87le3soy08.wl-kuninori.morimoto.gx@renesas.com

Kuninori Morimoto (9):
  gpu: drm: replace of_graph_get_next_endpoint()
  gpu: drm: use for_each_endpoint_of_node()
  hwtracing: use for_each_endpoint_of_node()
  media: platform: microchip: use for_each_endpoint_of_node()
  media: platform: ti: use for_each_endpoint_of_node()
  media: platform: xilinx: use for_each_endpoint_of_node()
  staging: media: atmel: use for_each_endpoint_of_node()
  video: fbdev: use for_each_endpoint_of_node()
  fbdev: omapfb: use of_graph_get_remote_port()

 drivers/gpu/drm/drm_of.c                      |  4 +++-
 drivers/gpu/drm/omapdrm/dss/base.c            |  3 +--
 .../drm/panel/panel-raspberrypi-touchscreen.c |  2 +-
 drivers/gpu/drm/tiny/arcpgu.c                 |  2 +-
 .../hwtracing/coresight/coresight-platform.c  |  4 ++--
 .../microchip/microchip-sama5d2-isc.c         | 21 +++++++------------
 .../microchip/microchip-sama7g5-isc.c         | 21 +++++++------------
 .../media/platform/ti/am437x/am437x-vpfe.c    | 12 +++++------
 .../media/platform/ti/davinci/vpif_capture.c  | 14 ++++++-------
 drivers/media/platform/xilinx/xilinx-vipp.c   |  9 ++------
 .../deprecated/atmel/atmel-sama5d2-isc.c      | 10 +++------
 .../deprecated/atmel/atmel-sama7g5-isc.c      | 10 +++------
 drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | 15 +------------
 .../omap2/omapfb/dss/omapdss-boot-init.c      |  3 +--
 14 files changed, 46 insertions(+), 84 deletions(-)

Comments

Helge Deller June 17, 2024, 5:53 a.m. UTC | #1
On 6/17/24 02:59, Kuninori Morimoto wrote:
> We already have of_graph_get_remote_port(), Let's use it.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

applied to fbdev git tree.

Thanks!
Helge

> ---
>   drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | 15 +--------------
>   1 file changed, 1 insertion(+), 14 deletions(-)
>
> diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c
> index 14965a3fd05b7..4040e247e026e 100644
> --- a/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c
> +++ b/drivers/video/fbdev/omap2/omapfb/dss/dss-of.c
> @@ -117,19 +117,6 @@ u32 dss_of_port_get_port_number(struct device_node *port)
>   	return reg;
>   }
>
> -static struct device_node *omapdss_of_get_remote_port(const struct device_node *node)
> -{
> -	struct device_node *np;
> -
> -	np = of_graph_get_remote_endpoint(node);
> -	if (!np)
> -		return NULL;
> -
> -	np = of_get_next_parent(np);
> -
> -	return np;
> -}
> -
>   struct omap_dss_device *
>   omapdss_of_find_source_for_first_ep(struct device_node *node)
>   {
> @@ -141,7 +128,7 @@ omapdss_of_find_source_for_first_ep(struct device_node *node)
>   	if (!ep)
>   		return ERR_PTR(-EINVAL);
>
> -	src_port = omapdss_of_get_remote_port(ep);
> +	src_port = of_graph_get_remote_port(ep);
>   	if (!src_port) {
>   		of_node_put(ep);
>   		return ERR_PTR(-EINVAL);
Helge Deller June 17, 2024, 5:58 a.m. UTC | #2
On 6/17/24 02:58, Kuninori Morimoto wrote:
> Hi Rob, Helge, +Sakari, +Hans

Hi Kuninori,

> 2 weeks past. This is resend v4 patch-set.
> I add +Sakari, +Hans on To.
>
> We already have for_each_endpoint_of_node(), but some drivers are
> not using it. This patch-set replace it.
>
> This patch-set is related to "OF" (= Rob), but many driveres are for
> "MultiMedia" (= Helge). I'm not sure who handle these.

I applied the two fbdev patches (#8 and #9), but I'm not maintainer for "multimedia".
For multimedia I expect people from linux-media@vger.kernel.org to pick your patches.

Helge

>
> I noticed that my posted 1 patch on (A) was not yet included on
> linus/master. I have included it.
>
> Dan is indicating it needs _scoped() macro, but it is new new feature.
> So I think we want to have separate this patch-set and _scoped() patch-set.
> I asked it to ML/Maintainer but no responce, so v4 doesn't include it.
> It will be handled by other patch-set in the future.
>
> [o] done
> [*] this patch-set
>
> 	[o] tidyup of_graph_get_endpoint_count()
> (A)	[o] replace endpoint func - use endpoint_by_regs()
> 	[*] replace endpoint func - use for_each()
> 	[ ] add new port function
> 	[ ] add new endpoint function
>
> v3 -> v4
> 	- fixup ret handling
>
> v2 -> v3
> 	- don't initialize pointer.
> 	- add Reviewed-by / Acked-by
> 	- include not-yet applied missing patch
>
> v1 -> v2
> 	- fixup TI patch
>
> Link: https://lore.kernel.org/r/8734sf6mgn.wl-kuninori.morimoto.gx@renesas.com
> Link: https://lore.kernel.org/r/87cyrauf0x.wl-kuninori.morimoto.gx@renesas.com
> Link: https://lore.kernel.org/r/87le3soy08.wl-kuninori.morimoto.gx@renesas.com
>
> Kuninori Morimoto (9):
>    gpu: drm: replace of_graph_get_next_endpoint()
>    gpu: drm: use for_each_endpoint_of_node()
>    hwtracing: use for_each_endpoint_of_node()
>    media: platform: microchip: use for_each_endpoint_of_node()
>    media: platform: ti: use for_each_endpoint_of_node()
>    media: platform: xilinx: use for_each_endpoint_of_node()
>    staging: media: atmel: use for_each_endpoint_of_node()
>    video: fbdev: use for_each_endpoint_of_node()
>    fbdev: omapfb: use of_graph_get_remote_port()
>
>   drivers/gpu/drm/drm_of.c                      |  4 +++-
>   drivers/gpu/drm/omapdrm/dss/base.c            |  3 +--
>   .../drm/panel/panel-raspberrypi-touchscreen.c |  2 +-
>   drivers/gpu/drm/tiny/arcpgu.c                 |  2 +-
>   .../hwtracing/coresight/coresight-platform.c  |  4 ++--
>   .../microchip/microchip-sama5d2-isc.c         | 21 +++++++------------
>   .../microchip/microchip-sama7g5-isc.c         | 21 +++++++------------
>   .../media/platform/ti/am437x/am437x-vpfe.c    | 12 +++++------
>   .../media/platform/ti/davinci/vpif_capture.c  | 14 ++++++-------
>   drivers/media/platform/xilinx/xilinx-vipp.c   |  9 ++------
>   .../deprecated/atmel/atmel-sama5d2-isc.c      | 10 +++------
>   .../deprecated/atmel/atmel-sama7g5-isc.c      | 10 +++------
>   drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | 15 +------------
>   .../omap2/omapfb/dss/omapdss-boot-init.c      |  3 +--
>   14 files changed, 46 insertions(+), 84 deletions(-)
>