devicetree-spec.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Intended use of "model" property?
@ 2022-09-12 20:18 Marti Bolivar
       [not found] ` <dfc5b413eba67844ae65b27e0f926451.marti.bolivar-hR+23Fw+YnFSHonuZl5R5Q@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Marti Bolivar @ 2022-09-12 20:18 UTC (permalink / raw)
  To: devicetree-spec-u79uwXL29TY76Z2rM5mHXA; +Cc: galak-DgEjT+Ai2ygdnm+yROfE0A

I'm trying to understand the intended use of the model property
in DT spec v0.4-rc1 ยง2.3.2.

Specifically, can "model" be a property in any node of the devicetree?
The spec seems to indicate so, but grepping around the DTS files in
Linux, it seems to be primarily used as a property of the root node, as
a model name for the entire device.

There are a few exceptions in Documentation/devicetree/bindings/, but
they are mostly in sound/, so it's not clear to me whether this is the
"model" I'm referring to here, especially since that isn't present next
to "compatible", "reg", and friends in dt-schema/meta-schemas/core.yaml.

Is "model" in the ยง2.3.2 sense meant to be a property of the root node
only, or can it appear anywhere with the meaning defined there?

Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Intended use of "model" property?
       [not found] ` <dfc5b413eba67844ae65b27e0f926451.marti.bolivar-hR+23Fw+YnFSHonuZl5R5Q@public.gmane.org>
@ 2022-09-13  6:21   ` David Gibson
  2022-09-13 11:04   ` Rob Herring
  1 sibling, 0 replies; 3+ messages in thread
From: David Gibson @ 2022-09-13  6:21 UTC (permalink / raw)
  To: Marti Bolivar
  Cc: devicetree-spec-u79uwXL29TY76Z2rM5mHXA, galak-DgEjT+Ai2ygdnm+yROfE0A

[-- Attachment #1: Type: text/plain, Size: 1243 bytes --]

On Mon, Sep 12, 2022 at 01:18:08PM -0700, Marti Bolivar wrote:
> I'm trying to understand the intended use of the model property
> in DT spec v0.4-rc1 §2.3.2.
> 
> Specifically, can "model" be a property in any node of the devicetree?
> The spec seems to indicate so, but grepping around the DTS files in
> Linux, it seems to be primarily used as a property of the root node, as
> a model name for the entire device.
> 
> There are a few exceptions in Documentation/devicetree/bindings/, but
> they are mostly in sound/, so it's not clear to me whether this is the
> "model" I'm referring to here, especially since that isn't present next
> to "compatible", "reg", and friends in dt-schema/meta-schemas/core.yaml.
> 
> Is "model" in the §2.3.2 sense meant to be a property of the root node
> only, or can it appear anywhere with the meaning defined there?

It can be used anywhere, but it's relatively rare.  It's usually for
human interest rather than signifying anything to driver software
(that's what "compatible" is for).

-- 
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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Intended use of "model" property?
       [not found] ` <dfc5b413eba67844ae65b27e0f926451.marti.bolivar-hR+23Fw+YnFSHonuZl5R5Q@public.gmane.org>
  2022-09-13  6:21   ` David Gibson
@ 2022-09-13 11:04   ` Rob Herring
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2022-09-13 11:04 UTC (permalink / raw)
  To: Marti Bolivar; +Cc: Mailing List, galak-DgEjT+Ai2ygdnm+yROfE0A

On Mon, Sep 12, 2022 at 3:18 PM Marti Bolivar
<marti.bolivar-hR+23Fw+YnFSHonuZl5R5Q@public.gmane.org> wrote:
>
> I'm trying to understand the intended use of the model property
> in DT spec v0.4-rc1 ยง2.3.2.
>
> Specifically, can "model" be a property in any node of the devicetree?

Yes, but not like 'status' in that bindings must define using it.

> The spec seems to indicate so, but grepping around the DTS files in
> Linux, it seems to be primarily used as a property of the root node, as
> a model name for the entire device.
>
> There are a few exceptions in Documentation/devicetree/bindings/, but
> they are mostly in sound/, so it's not clear to me whether this is the
> "model" I'm referring to here, especially since that isn't present next
> to "compatible", "reg", and friends in dt-schema/meta-schemas/core.yaml.

Audio has a defined use for 'model' to provide a name for the 'sound device'.

It's not in meta-schemas/core.yaml simply because it's not appearing
in lots of bindings.

> Is "model" in the ยง2.3.2 sense meant to be a property of the root node
> only, or can it appear anywhere with the meaning defined there?

Even use in the root node is not terribly well defined. ePAPR
(starting point for the spec) defined it as a compatible like string.
On Arm, it's a more human friendly freeform string.

So I wouldn't encourage new uses.

Rob

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-13 11:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-12 20:18 Intended use of "model" property? Marti Bolivar
     [not found] ` <dfc5b413eba67844ae65b27e0f926451.marti.bolivar-hR+23Fw+YnFSHonuZl5R5Q@public.gmane.org>
2022-09-13  6:21   ` David Gibson
2022-09-13 11:04   ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).