All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Horia Geantă" <horia.geanta@nxp.com>
To: Shawn Guo <shawnguo@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Harninder Rai <harninder.rai@nxp.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Bhaskar U <bhaskar.upadhaya@nxp.com>,
	Will Deacon <will.deacon@arm.com>,
	Dan Douglass <dan.douglass@nxp.com>,
	Rob Herring <robh+dt@kernel.org>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] arm64: dts: ls1012a: add crypto node
Date: Tue, 28 Mar 2017 07:19:43 +0000	[thread overview]
Message-ID: <VI1PR0401MB259164F1B575677D65CB8F2E98320@VI1PR0401MB2591.eurprd04.prod.outlook.com> (raw)
In-Reply-To: 20170324140320.GP30608@dragon

On 3/24/2017 4:04 PM, Shawn Guo wrote:
> On Fri, Mar 24, 2017 at 08:29:17AM +0000, Horia Geantă wrote:
>> On 3/24/2017 9:35 AM, Shawn Guo wrote:
>>> On Fri, Mar 24, 2017 at 07:17:50AM +0000, Horia Geantă wrote:
>>>>>> +		sec_mon: sec_mon@1e90000 {
>>>>>
>>>>> Hyphen is more preferred to be used in node name than underscore.
>>>>>
>>>> This would imply changing the
>>>> Documentation/devicetree/bindings/crypto/fsl-sec4.txt binding and
>>>> dealing with all the consequences, which IIUC is probably not worth.
>>>
>>> I do not care the bindings doc that much, since I'm not the maintainer
>>> of it.  What are the consequences specifically, if we use a better node
>>> name in dts than bindings example?
>>>
>> Users relying on finding the sec_mon node will obviously stop working.
>> I don't see any in-kernel users, however there could be others I am not
>> aware of and DT bindings should provide for backwards compatibility.
> 
> Okay, point taken.  You can keep the node name as it is.
> 
>> I could deprecate "sec_mon" in the bindings and suggest "sec-mon"
>> instead, while leaving all existing dts files as-is.
>> The risk is breaking LS1012A users relying on "sec_mon".
> 
> For existing bindings, I do not care that much.  But for new ones, I do
> hope that we recommend to use hyphen, as that's more idiomatic at least
> for Linux kernel.
> 
>> I see that ePAPR:
>> -allows both for hyphen and underline in case of node names
>> -allows only for hyphen (i.e. forbids underline) in case of alias nodes
>>
>> In the first case, I understand there's an (undocumented?) agreement to
>> prefer hyphen over underline.
> 
> Both are valid, but hyphen is more idiomatic for Linux kernel.
> 
>> For the 2nd one, does this mean I should change alias names?
> 
> This is something I see difference between specification and DTC.
> 
> 	aliases {
> 		alias-name = &label_name;
> 	};
> 
> 	label_name: node-name {
> 		...
> 	};
> 
> The spec says that only hyphen is valid for alias name, but DTC works
> happily with underscore too.  From my experience with DTC playing, both
> hyphen and underscore are valid for alias and node name.  But for label
> name, only underscore is valid.  Using hyphen in label name will cause
> DTC to report syntax error.
> 
Yes indeed, thanks for pointing it out.

For the sake of current patch, please clarify whether a v2 is needed.
IIUC:
-sec_mon node name could stay the same (existing binding)
-label names are ok, since underline is the only option allowed by DTC
-alias names are out-of-spec but accepted by DTC; if changing underline
to hyphen is requested, I will push out v2

Thanks,
Horia


WARNING: multiple messages have this Message-ID (diff)
From: horia.geanta@nxp.com (Horia Geantă)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: dts: ls1012a: add crypto node
Date: Tue, 28 Mar 2017 07:19:43 +0000	[thread overview]
Message-ID: <VI1PR0401MB259164F1B575677D65CB8F2E98320@VI1PR0401MB2591.eurprd04.prod.outlook.com> (raw)
In-Reply-To: 20170324140320.GP30608@dragon

On 3/24/2017 4:04 PM, Shawn Guo wrote:
> On Fri, Mar 24, 2017 at 08:29:17AM +0000, Horia Geant? wrote:
>> On 3/24/2017 9:35 AM, Shawn Guo wrote:
>>> On Fri, Mar 24, 2017 at 07:17:50AM +0000, Horia Geant? wrote:
>>>>>> +		sec_mon: sec_mon at 1e90000 {
>>>>>
>>>>> Hyphen is more preferred to be used in node name than underscore.
>>>>>
>>>> This would imply changing the
>>>> Documentation/devicetree/bindings/crypto/fsl-sec4.txt binding and
>>>> dealing with all the consequences, which IIUC is probably not worth.
>>>
>>> I do not care the bindings doc that much, since I'm not the maintainer
>>> of it.  What are the consequences specifically, if we use a better node
>>> name in dts than bindings example?
>>>
>> Users relying on finding the sec_mon node will obviously stop working.
>> I don't see any in-kernel users, however there could be others I am not
>> aware of and DT bindings should provide for backwards compatibility.
> 
> Okay, point taken.  You can keep the node name as it is.
> 
>> I could deprecate "sec_mon" in the bindings and suggest "sec-mon"
>> instead, while leaving all existing dts files as-is.
>> The risk is breaking LS1012A users relying on "sec_mon".
> 
> For existing bindings, I do not care that much.  But for new ones, I do
> hope that we recommend to use hyphen, as that's more idiomatic at least
> for Linux kernel.
> 
>> I see that ePAPR:
>> -allows both for hyphen and underline in case of node names
>> -allows only for hyphen (i.e. forbids underline) in case of alias nodes
>>
>> In the first case, I understand there's an (undocumented?) agreement to
>> prefer hyphen over underline.
> 
> Both are valid, but hyphen is more idiomatic for Linux kernel.
> 
>> For the 2nd one, does this mean I should change alias names?
> 
> This is something I see difference between specification and DTC.
> 
> 	aliases {
> 		alias-name = &label_name;
> 	};
> 
> 	label_name: node-name {
> 		...
> 	};
> 
> The spec says that only hyphen is valid for alias name, but DTC works
> happily with underscore too.  From my experience with DTC playing, both
> hyphen and underscore are valid for alias and node name.  But for label
> name, only underscore is valid.  Using hyphen in label name will cause
> DTC to report syntax error.
> 
Yes indeed, thanks for pointing it out.

For the sake of current patch, please clarify whether a v2 is needed.
IIUC:
-sec_mon node name could stay the same (existing binding)
-label names are ok, since underline is the only option allowed by DTC
-alias names are out-of-spec but accepted by DTC; if changing underline
to hyphen is requested, I will push out v2

Thanks,
Horia

  reply	other threads:[~2017-03-28  7:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-22 12:29 [PATCH] arm64: dts: ls1012a: add crypto node Horia Geantă
2017-03-22 12:29 ` Horia Geantă
2017-03-24  1:56 ` Shawn Guo
2017-03-24  1:56   ` Shawn Guo
2017-03-24  7:17   ` Horia Geantă
2017-03-24  7:17     ` Horia Geantă
2017-03-24  7:34     ` Shawn Guo
2017-03-24  7:34       ` Shawn Guo
2017-03-24  8:29       ` Horia Geantă
2017-03-24  8:29         ` Horia Geantă
     [not found]         ` <DB4PR04MB0847E3EE8F7FAC11DD85FAA8983E0-tLF+feb1Bz4/w1fYxD+T089NdZoXdze2vxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-03-24 14:03           ` Shawn Guo
2017-03-24 14:03             ` Shawn Guo
2017-03-28  7:19             ` Horia Geantă [this message]
2017-03-28  7:19               ` Horia Geantă
2017-03-28 10:41               ` Shawn Guo
2017-03-28 10:41                 ` Shawn Guo
2017-03-28 11:46                 ` [PATCH v2] " Horia Geantă
2017-03-28 11:46                   ` Horia Geantă
2017-03-29  3:04                   ` Shawn Guo
2017-03-29  3:04                     ` Shawn Guo

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=VI1PR0401MB259164F1B575677D65CB8F2E98320@VI1PR0401MB2591.eurprd04.prod.outlook.com \
    --to=horia.geanta@nxp.com \
    --cc=bhaskar.upadhaya@nxp.com \
    --cc=catalin.marinas@arm.com \
    --cc=dan.douglass@nxp.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=harninder.rai@nxp.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=will.deacon@arm.com \
    /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.