* Wrapping proprietary nodes
@ 2010-10-22 21:44 David VomLehn
[not found] ` <20101022214454.GB24896-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: David VomLehn @ 2010-10-22 21:44 UTC (permalink / raw)
To: Device-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc,
Tree-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc,
Mailing-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc,
List-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ
I expect my device tree will have some proprietary, one-off devices in
it. Is it better to wrap these all up in one node:
cisco {
device1 {
...
};
device2 {
...
};
};
Or should they be specified one node at a time:
cisco-device1 {
...
};
cisco-device2 {
...
};
My inclination is for the former, but I'd prefer to follow existing usage,
if any.
--
David VL
^ permalink raw reply [flat|nested] 7+ messages in thread[parent not found: <20101022214454.GB24896-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org>]
* Re: Wrapping proprietary nodes [not found] ` <20101022214454.GB24896-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org> @ 2010-10-24 7:01 ` David Gibson 2010-10-25 18:32 ` Yoder Stuart-B08248 2010-10-26 11:25 ` Grant Likely 2 siblings, 0 replies; 7+ messages in thread From: David Gibson @ 2010-10-24 7:01 UTC (permalink / raw) To: David VomLehn Cc: Mailing-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Tree-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc, List-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc, Device-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc On Fri, Oct 22, 2010 at 02:44:54PM -0700, David VomLehn wrote: > I expect my device tree will have some proprietary, one-off devices in > it. Is it better to wrap these all up in one node: > > cisco { > device1 { > ... > }; > device2 { > ... > }; > }; > > Or should they be specified one node at a time: > > cisco-device1 { > ... > }; > cisco-device2 { > ... > }; > > My inclination is for the former, but I'd prefer to follow existing > usage, if any. Um.. what do you mean by "proprietary nodes". What is the reason from a hardware perspective that the devices would be logically grouped together? -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Wrapping proprietary nodes [not found] ` <20101022214454.GB24896-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org> 2010-10-24 7:01 ` David Gibson @ 2010-10-25 18:32 ` Yoder Stuart-B08248 [not found] ` <9696D7A991D0824DBA8DFAC74A9C5FA306911999-ofAVchDyotYzzZk0BCvKg5jmvxFtTJ+o0e7PPNI6Mm0@public.gmane.org> 2010-10-26 11:25 ` Grant Likely 2 siblings, 1 reply; 7+ messages in thread From: Yoder Stuart-B08248 @ 2010-10-25 18:32 UTC (permalink / raw) To: David VomLehn, Device-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2BxUpJ8fqYuDpWQv+KbWgnA, Tree-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2BxUpJ8fqYuDpWQv+KbWgnA, Mailing-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2BxUpJ8fqYuDpWQv+KbWgnA > -----Original Message----- > From: devicetree-discuss- > bounces+stuart.yoder=freescale.com-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org [mailto:devicetree- > discuss-bounces+stuart.yoder=freescale.com-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org] On Behalf Of > David VomLehn > Sent: Friday, October 22, 2010 4:45 PM > To: Device-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org; Tree-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org; > Mailing-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org; List-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org; > devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org > Subject: Wrapping proprietary nodes > > I expect my device tree will have some proprietary, one-off devices in it. > Is it better to wrap these all up in one node: > > cisco { > device1 { > ... > }; > device2 { > ... > }; > }; > > Or should they be specified one node at a time: > > cisco-device1 { > ... > }; > cisco-device2 { > ... > }; > > My inclination is for the former, but I'd prefer to follow existing usage, > if any. (David, long time no see...:) The device tree should represent your hardware as it is. If these devices sit on some bus, then you should probably represent the bus, with the devices as subnodes. Don't create logical container nodes unless they are warranted for some good reason. Stuart ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <9696D7A991D0824DBA8DFAC74A9C5FA306911999-ofAVchDyotYzzZk0BCvKg5jmvxFtTJ+o0e7PPNI6Mm0@public.gmane.org>]
* RE: Wrapping proprietary nodes [not found] ` <9696D7A991D0824DBA8DFAC74A9C5FA306911999-ofAVchDyotYzzZk0BCvKg5jmvxFtTJ+o0e7PPNI6Mm0@public.gmane.org> @ 2010-10-25 19:15 ` Segher Boessenkool 2010-10-25 20:40 ` David VomLehn 1 sibling, 0 replies; 7+ messages in thread From: Segher Boessenkool @ 2010-10-25 19:15 UTC (permalink / raw) To: Yoder Stuart-B08248 Cc: list-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2BxUpJ8fqYuDpWQv+KbWgnA, device-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2BxUpJ8fqYuDpWQv+KbWgnA, mailing-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2BxUpJ8fqYuDpWQv+KbWgnA, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, tree-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2BxUpJ8fqYuDpWQv+KbWgnA > The device tree should represent your hardware as it is. If these > devices sit on some bus, then you should probably represent the > bus, with the devices as subnodes. Don't create logical container > nodes unless they are warranted for some good reason. More importantly: no device tree client should ever require such container nodes; but also every client should allow it! No binding should require it, unless there is something really special of course. If you think you have such a special case: think again. Segher ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Wrapping proprietary nodes [not found] ` <9696D7A991D0824DBA8DFAC74A9C5FA306911999-ofAVchDyotYzzZk0BCvKg5jmvxFtTJ+o0e7PPNI6Mm0@public.gmane.org> 2010-10-25 19:15 ` Segher Boessenkool @ 2010-10-25 20:40 ` David VomLehn [not found] ` <20101025204054.GA1594-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org> 1 sibling, 1 reply; 7+ messages in thread From: David VomLehn @ 2010-10-25 20:40 UTC (permalink / raw) To: Yoder Stuart-B08248 Cc: Mailing-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Tree-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc, List-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc, Device-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc On Mon, Oct 25, 2010 at 11:32:46AM -0700, Yoder Stuart-B08248 wrote: > > > > -----Original Message----- > > From: devicetree-discuss- > > bounces+stuart.yoder=freescale.com-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org > [mailto:devicetree- > > discuss-bounces+stuart.yoder=freescale.com-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org] On Behalf > Of > > David VomLehn > > Sent: Friday, October 22, 2010 4:45 PM > > To: Device-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org; Tree-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org; > > Mailing-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org; List-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org; > > devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org > > Subject: Wrapping proprietary nodes > > > > I expect my device tree will have some proprietary, one-off devices in > it. ... > > Or should they be specified one node at a time: > > > > cisco-device1 { > > ... > > }; > > cisco-device2 { > > ... > > }; > > > > My inclination is for the former, but I'd prefer to follow existing > usage, > > if any. > > (David, long time no see...:) > > The device tree should represent your hardware as it is. If these > devices sit on some bus, then you should probably represent the > bus, with the devices as subnodes. Don't create logical container > nodes unless they are warranted for some good reason. > > Stuart Makes sense. My example uses the prefix "cisco-"; does this follow common usage? -- David VL ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <20101025204054.GA1594-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org>]
* RE: Wrapping proprietary nodes [not found] ` <20101025204054.GA1594-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org> @ 2010-10-25 21:15 ` Yoder Stuart-B08248 0 siblings, 0 replies; 7+ messages in thread From: Yoder Stuart-B08248 @ 2010-10-25 21:15 UTC (permalink / raw) To: David VomLehn Cc: Mailing-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Tree-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc, List-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc, Device-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc > -----Original Message----- > From: David VomLehn [mailto:dvomlehn-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org] > Sent: Monday, October 25, 2010 3:41 PM > To: Yoder Stuart-B08248 > Cc: Device-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org; Tree-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org; > Mailing-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org; List-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org; > devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org > Subject: Re: Wrapping proprietary nodes > > On Mon, Oct 25, 2010 at 11:32:46AM -0700, Yoder Stuart-B08248 wrote: > > > > > > > -----Original Message----- > > > From: devicetree-discuss- > > > bounces+stuart.yoder=freescale.com-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org > > [mailto:devicetree- > > > discuss-bounces+stuart.yoder=freescale.com-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org] On > > > discuss-bounces+Behalf > > Of > > > David VomLehn > > > Sent: Friday, October 22, 2010 4:45 PM > > > To: Device-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org; > > > Tree-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org; Mailing-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org; > > > List-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org; devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org > > > Subject: Wrapping proprietary nodes > > > > > > I expect my device tree will have some proprietary, one-off devices > > > in > > it. > ... > > > Or should they be specified one node at a time: > > > > > > cisco-device1 { > > > ... > > > }; > > > cisco-device2 { > > > ... > > > }; > > > > > > My inclination is for the former, but I'd prefer to follow existing > > usage, > > > if any. > > > > (David, long time no see...:) > > > > The device tree should represent your hardware as it is. If these > > devices sit on some bus, then you should probably represent the > > bus, with the devices as subnodes. Don't create logical container > > nodes unless they are warranted for some good reason. > > > > Stuart > > Makes sense. My example uses the prefix "cisco-"; does this follow common > usage? The general rule is that node names reflect the function of the device, so you typically wouldn't have a company name in the node name. See section 2.2.2 in the ePAPR, for some examples: <http://www.power.org/resources/downloads/Power_ePAPR_APPROVED_v1.0.pdf> For custom properties that you create, use a company specific prefix like a stock symbol or company name (e.g. cisco,foo). Stuart ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Wrapping proprietary nodes [not found] ` <20101022214454.GB24896-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org> 2010-10-24 7:01 ` David Gibson 2010-10-25 18:32 ` Yoder Stuart-B08248 @ 2010-10-26 11:25 ` Grant Likely 2 siblings, 0 replies; 7+ messages in thread From: Grant Likely @ 2010-10-26 11:25 UTC (permalink / raw) To: David VomLehn Cc: Mailing-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Tree-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc, List-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc, Device-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc On Fri, Oct 22, 2010 at 02:44:54PM -0700, David VomLehn wrote: > I expect my device tree will have some proprietary, one-off devices in > it. Is it better to wrap these all up in one node: > > cisco { > device1 { > ... > }; > device2 { > ... > }; > }; > > Or should they be specified one node at a time: > > cisco-device1 { > ... > }; > cisco-device2 { > ... > }; > > My inclination is for the former, but I'd prefer to follow existing usage, > if any. Neither. The layout should reflect the actual hardware layout, and the devices should follow the Generic Names recommended practice[1][2]. [1] http://playground.sun.com/1275/practice/gnames/gnamv14a.html [2] http://www.power.org/resources/downloads/Power_ePAPR_APPROVED_v1.0.pdf section 2.2.2 The correct way to differentiate between devices (regardless of whether or not the driver is proprietary, or if it is a custom device for the system) is to use the 'compatible' property. Therefore your tree might look something like this: input@<address> { compatible = "cisco,<part/device>"; ... }; dma-controller@<address> { compatible = "cisco,<part/device>"; ... }; g. > -- > David VL > _______________________________________________ > devicetree-discuss mailing list > devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org > https://lists.ozlabs.org/listinfo/devicetree-discuss ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-10-26 11:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-22 21:44 Wrapping proprietary nodes David VomLehn
[not found] ` <20101022214454.GB24896-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org>
2010-10-24 7:01 ` David Gibson
2010-10-25 18:32 ` Yoder Stuart-B08248
[not found] ` <9696D7A991D0824DBA8DFAC74A9C5FA306911999-ofAVchDyotYzzZk0BCvKg5jmvxFtTJ+o0e7PPNI6Mm0@public.gmane.org>
2010-10-25 19:15 ` Segher Boessenkool
2010-10-25 20:40 ` David VomLehn
[not found] ` <20101025204054.GA1594-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org>
2010-10-25 21:15 ` Yoder Stuart-B08248
2010-10-26 11:25 ` Grant Likely
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox