All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrzej Hajda <a.hajda-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
To: Laurent Pinchart
	<laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
Cc: Grant Likely
	<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Tomi Valkeinen <tomi.valkeinen-l0cyMroinI0@public.gmane.org>,
	Philipp Zabel <p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Russell King - ARM Linux
	<linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
	Mauro Carvalho Chehab
	<m.chehab-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Sylwester Nawrocki
	<s.nawrocki-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	Kyungmin Park
	<kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Philipp Zabel
	<philipp.zabel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH v4 1/3] [media] of: move graph helpers from drivers/media/v4l2-core to drivers/of
Date: Tue, 11 Mar 2014 14:55:28 +0100	[thread overview]
Message-ID: <531F15D0.50008@samsung.com> (raw)
In-Reply-To: <1401949.AJnxRNDZ0C@avalon>

On 03/10/2014 12:42 PM, Laurent Pinchart wrote:
> Hi Andrzej,
> 
>>> I like that idea. I would prefer making the 'port' nodes mandatory and the
>>> 'ports' and 'endpoint' nodes optional. Leaving the 'port' node out
>>> slightly decreases readability in my opinion, but making the 'endpoint'
>>> node optional increases it. That's just my point of view though.
>>
>> I want to propose another solution to simplify bindings, in fact I have
>> few ideas to consider:
>>
>> 1. Use named ports instead of address-cells/regs. Ie instead of
>> port@number schema, use port-function. This will allow to avoid ports
>> node and #address-cells, #size-cells, reg properties.
>> Additionally it should increase readability of the bindings.
>>
>> device {
>> 	port-dsi {
>> 		endpoint { ... };
>> 	};
>> 	port-rgb {
>> 		endpoint { ... };
>> 	};
>> };
>>
>> It is little bit like with gpios vs reset-gpios properties.
>> Another advantage I see we do not need do mappings of port numbers
>> to functions between dts, drivers and documentation.
> 
> The problem with this approach is that ports are identified by a number inside 
> the kernel, so we would still need to define name to number mappings, or 
> switch to port names internally first.

The mapping will be only internal in the driver.

Anyway the bindings should be kernel agnostic.

Andrzej

> 
>> 2. Similar approach can be taken to endpoint nodes, in fact
>> as endpoints are children of port node and as I understand port node
>> have no other children we can use any name instead of endpoint@number,
>> of course some convention can be helpful.
>>
>> device {
>> 	port-dsi {
>> 		ep-soc1 { ... };
>> 		ep-soc2 { ... };
>> 	};
>> 	port-rgb {
>> 		ep-panel { ... };
>> 	};
>> };
> 
> I see less issues here, as we don't need to number endpoints if I'm not 
> mistaken.
> 
>> I would like to add that those ideas would work nicely with Sylwester's
>> proposition of skipping endpoints nodes in case there is only one
>> endpoint - the most common cases are devices with one or two ports, each
>> port having only one remote endpoint.
>> The complete graph for DSI/LVDS bridge I work recently will look like:
>>
>> dsim {
>> 	dsim_ep: port-dsi {
>> 		remote-endpoint = <&bridge_dsi_ep>;
>> 	};
>> };
>>
>> bridge {
>> 	bridge_dsi_ep: port-dsi {
>> 		remote-endpoint = <&dsim_ep>;
>> 	};
>> 	bridge_lvds_ep: port-lvds {
>> 		remote-endpoint = <&panel_ep>;
>> 	};
>> };
>>
>> panel {
>> 	port-lvds {
>> 		remote-endpoint <&bridge_lvds_ep>;
>> 	};
>> };
> 

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Andrzej Hajda <a.hajda@samsung.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Grant Likely <grant.likely@linaro.org>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Rob Herring <robherring2@gmail.com>,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Mauro Carvalho Chehab <m.chehab@samsung.com>,
	Rob Herring <robh+dt@kernel.org>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Philipp Zabel <philipp.zabel@gmail.com>
Subject: Re: [PATCH v4 1/3] [media] of: move graph helpers from drivers/media/v4l2-core to drivers/of
Date: Tue, 11 Mar 2014 14:55:28 +0100	[thread overview]
Message-ID: <531F15D0.50008@samsung.com> (raw)
In-Reply-To: <1401949.AJnxRNDZ0C@avalon>

On 03/10/2014 12:42 PM, Laurent Pinchart wrote:
> Hi Andrzej,
> 
>>> I like that idea. I would prefer making the 'port' nodes mandatory and the
>>> 'ports' and 'endpoint' nodes optional. Leaving the 'port' node out
>>> slightly decreases readability in my opinion, but making the 'endpoint'
>>> node optional increases it. That's just my point of view though.
>>
>> I want to propose another solution to simplify bindings, in fact I have
>> few ideas to consider:
>>
>> 1. Use named ports instead of address-cells/regs. Ie instead of
>> port@number schema, use port-function. This will allow to avoid ports
>> node and #address-cells, #size-cells, reg properties.
>> Additionally it should increase readability of the bindings.
>>
>> device {
>> 	port-dsi {
>> 		endpoint { ... };
>> 	};
>> 	port-rgb {
>> 		endpoint { ... };
>> 	};
>> };
>>
>> It is little bit like with gpios vs reset-gpios properties.
>> Another advantage I see we do not need do mappings of port numbers
>> to functions between dts, drivers and documentation.
> 
> The problem with this approach is that ports are identified by a number inside 
> the kernel, so we would still need to define name to number mappings, or 
> switch to port names internally first.

The mapping will be only internal in the driver.

Anyway the bindings should be kernel agnostic.

Andrzej

> 
>> 2. Similar approach can be taken to endpoint nodes, in fact
>> as endpoints are children of port node and as I understand port node
>> have no other children we can use any name instead of endpoint@number,
>> of course some convention can be helpful.
>>
>> device {
>> 	port-dsi {
>> 		ep-soc1 { ... };
>> 		ep-soc2 { ... };
>> 	};
>> 	port-rgb {
>> 		ep-panel { ... };
>> 	};
>> };
> 
> I see less issues here, as we don't need to number endpoints if I'm not 
> mistaken.
> 
>> I would like to add that those ideas would work nicely with Sylwester's
>> proposition of skipping endpoints nodes in case there is only one
>> endpoint - the most common cases are devices with one or two ports, each
>> port having only one remote endpoint.
>> The complete graph for DSI/LVDS bridge I work recently will look like:
>>
>> dsim {
>> 	dsim_ep: port-dsi {
>> 		remote-endpoint = <&bridge_dsi_ep>;
>> 	};
>> };
>>
>> bridge {
>> 	bridge_dsi_ep: port-dsi {
>> 		remote-endpoint = <&dsim_ep>;
>> 	};
>> 	bridge_lvds_ep: port-lvds {
>> 		remote-endpoint = <&panel_ep>;
>> 	};
>> };
>>
>> panel {
>> 	port-lvds {
>> 		remote-endpoint <&bridge_lvds_ep>;
>> 	};
>> };
> 


  reply	other threads:[~2014-03-11 13:55 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-25 14:58 [PATCH v4 0/3] Move device tree graph parsing helpers to drivers/of Philipp Zabel
     [not found] ` < 1393340304-19005-4-git-send-email-p.zabel@pengutronix.de>
     [not found] ` < 1393428297.3248.92.camel@paszta.hi.pengutronix.de>
     [not found]   ` <20140307171804. EF245C40A32@trevor.secretlab.ca>
     [not found] ` < 1393340304-19005-2-git-send-email-p.zabel@pengutronix.de>
     [not found]   ` <20140226113729. A9D5AC40A89@trevor.secretlab.ca>
     [not found] ` < 20140226113729.A9D5AC40A89@trevor.secretlab.ca>
2014-02-25 14:58 ` [PATCH v4 1/3] [media] of: move graph helpers from drivers/media/v4l2-core " Philipp Zabel
2014-02-26 11:37   ` Grant Likely
2014-02-26 11:37     ` Grant Likely
2014-02-26 15:24     ` Philipp Zabel
2014-03-07 17:18       ` Grant Likely
2014-03-08 10:46         ` Tomi Valkeinen
2014-03-08 10:46           ` Tomi Valkeinen
2014-03-08 12:23           ` Grant Likely
2014-03-08 15:50             ` Laurent Pinchart
2014-03-20 22:23               ` Grant Likely
     [not found]                 ` <20140320222347.CAB6DC412EA-WNowdnHR2B42iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2014-03-20 22:32                   ` Laurent Pinchart
2014-03-20 22:32                     ` Laurent Pinchart
2014-03-21 13:37                     ` Tomi Valkeinen
2014-03-21 13:37                       ` Tomi Valkeinen
2014-03-21 14:10                       ` Sylwester Nawrocki
     [not found]                       ` <532C408D.4070002-l0cyMroinI0@public.gmane.org>
2014-03-21 14:13                         ` Laurent Pinchart
2014-03-21 14:13                           ` Laurent Pinchart
2014-03-21 14:22                           ` Tomi Valkeinen
2014-03-21 14:22                             ` Tomi Valkeinen
     [not found]                             ` <532C4B3C.4030406-l0cyMroinI0@public.gmane.org>
2014-03-21 14:30                               ` Laurent Pinchart
2014-03-21 14:30                                 ` Laurent Pinchart
2014-03-10  6:34             ` Tomi Valkeinen
2014-03-10  6:34               ` Tomi Valkeinen
2014-03-20 22:26               ` Grant Likely
2014-03-08 12:07         ` Philipp Zabel
     [not found]           ` <CA+gwMcfgKre8S4KHPvTVuAuz672aehGrN1UfFpwKAueTAcrMZQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-08 15:54             ` Laurent Pinchart
2014-03-08 15:54               ` Laurent Pinchart
2014-03-10  6:00               ` Tomi Valkeinen
2014-03-10  6:00                 ` Tomi Valkeinen
     [not found]                 ` <531D54E2.8030303-l0cyMroinI0@public.gmane.org>
2014-03-10 13:57                   ` Laurent Pinchart
2014-03-10 13:57                     ` Laurent Pinchart
2014-03-10  8:58               ` Andrzej Hajda
2014-03-10  8:58                 ` Andrzej Hajda
     [not found]                 ` <531D7E9F.3090708-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-03-10  9:29                   ` Tomi Valkeinen
2014-03-10  9:29                     ` Tomi Valkeinen
2014-03-10 11:42                   ` Laurent Pinchart
2014-03-10 11:42                     ` Laurent Pinchart
2014-03-11 13:55                     ` Andrzej Hajda [this message]
2014-03-11 13:55                       ` Andrzej Hajda
2014-03-20 22:33             ` Grant Likely
2014-03-20 22:33               ` Grant Likely
2014-02-25 14:58 ` [PATCH v4 2/3] [media] of: move common endpoint parsing " Philipp Zabel
2014-02-25 14:58 ` [PATCH v4 3/3] Documentation: of: Document graph bindings Philipp Zabel
2014-02-26 13:14   ` Tomi Valkeinen
2014-02-26 13:14     ` Tomi Valkeinen
2014-02-26 14:57     ` Philipp Zabel
     [not found]       ` <1393426623.3248.70.camel-+qGW7pzALmz7o/J7KWpOmN53zsg1cpMQ@public.gmane.org>
2014-02-26 14:50         ` Tomi Valkeinen
2014-02-26 14:50           ` Tomi Valkeinen
2014-02-26 15:47           ` Philipp Zabel
     [not found]             ` <1393429676.3248.110.camel-+qGW7pzALmz7o/J7KWpOmN53zsg1cpMQ@public.gmane.org>
2014-02-27  8:08               ` Tomi Valkeinen
2014-02-27  8:08                 ` Tomi Valkeinen
2014-02-27 10:52                 ` Philipp Zabel
2014-02-27 10:41                   ` Tomi Valkeinen
2014-02-27 10:41                     ` Tomi Valkeinen
     [not found]       ` < 530DFF4C.8080807@ti.com>
     [not found]         ` <530DFF4C.8080807-l0cyMroinI0@public.gmane.org>
2014-03-07 18:11           ` Grant Likely
2014-03-07 18:11             ` Grant Likely
2014-03-08  9:35             ` Tomi Valkeinen
2014-03-08  9:35               ` Tomi Valkeinen
2014-03-08 12:25               ` Grant Likely
2014-03-08 15:43                 ` Laurent Pinchart
2014-03-10  6:53                 ` Tomi Valkeinen
2014-03-10  6:53                   ` Tomi Valkeinen
     [not found]                   ` <531D6178.3070906-l0cyMroinI0@public.gmane.org>
2014-03-11 13:47                     ` Sylwester Nawrocki
2014-03-11 13:47                       ` Sylwester Nawrocki
2014-03-07 17:20     ` Grant Likely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=531F15D0.50008@samsung.com \
    --to=a.hajda-sze3o3uu22jbdgjk7y7tuq@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
    --cc=linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=m.chehab-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=philipp.zabel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=s.nawrocki-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=tomi.valkeinen-l0cyMroinI0@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.