devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: devicetree@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Subject: Re: Mixed types of values inside a single property
Date: Mon, 21 Nov 2022 15:23:53 +0100	[thread overview]
Message-ID: <b958733a-18a0-d916-930a-e7efb481dd06@linaro.org> (raw)
In-Reply-To: <Y3uG/XvhZzaIq5Zi@smile.fi.intel.com>

On 21/11/2022 15:11, Andy Shevchenko wrote:
> On Mon, Nov 21, 2022 at 02:52:37PM +0100, Krzysztof Kozlowski wrote:
>> On 21/11/2022 13:59, Andy Shevchenko wrote:
>>>
>>> Hi, Rob and Krzysztof!
>>>
>>> Today on SO one question [1] was popped up, and I, remembering a bit of
>>> the code of device properties in the Linux kernel, was a bit surprised of it
>>> in a way that reading DT specification (0.4-rc1 as of today) doesn't clarify
>>> that either.
>>>
>>> Can the specification be a bit more clear about that? Or is it me and the OP of
>>> that question who missed something in the DT spec?
>>>
>>> [1]: https://stackoverflow.com/questions/74517569/reading-tuples-in-a-devicetree
>>
>> I saw question on Stackoverflow and I saw there answers, but what is the
>> question to us?
> 
> Does the specification allows mixed types of the values in the same property?
> Because reading it doesn't give a hint.

I think DT spec allows it ("Format is specific to the property. See the
property definition.") but DT schema mostly not (finite list of property
types). To some level DT schema accepts mixes, e.g. phandle-array
containing phandle and offsets, but that's because phandle is actually
also a number (dtschema/schemas/types.yaml).

Best regards,
Krzysztof


  reply	other threads:[~2022-11-21 14:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21 12:59 Mixed types of values inside a single property Andy Shevchenko
2022-11-21 13:52 ` Krzysztof Kozlowski
2022-11-21 14:11   ` Andy Shevchenko
2022-11-21 14:23     ` Krzysztof Kozlowski [this message]
2022-11-21 15:31       ` Andy Shevchenko
2022-12-06 15:31         ` Rob Herring
2022-12-06 22:25           ` Andy Shevchenko

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=b958733a-18a0-d916-930a-e7efb481dd06@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=andriy.shevchenko@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=robh+dt@kernel.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 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).