Re: [PATCH] dt-bindings: sram: Allow multiple-word prefixes to sram subnode

From: Konrad Dybcio

Date: Thu Apr 09 2026 - 06:04:17 EST


On 4/9/26 10:45 AM, Krzysztof Kozlowski wrote:
> On Wed, Apr 08, 2026 at 03:28:13PM +0200, Konrad Dybcio wrote:
>> From: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
>>
>> Currently, foo-sram is allowed, but foo-bar-sram is not.
>>
>> Allow it so that more complex names aren't unnecessarily simplified.
>>
>> Signed-off-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
>> ---
>> Documentation/devicetree/bindings/sram/sram.yaml | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/sram/sram.yaml b/Documentation/devicetree/bindings/sram/sram.yaml
>> index c451140962c8..b65c2ff846f1 100644
>> --- a/Documentation/devicetree/bindings/sram/sram.yaml
>> +++ b/Documentation/devicetree/bindings/sram/sram.yaml
>> @@ -65,7 +65,7 @@ properties:
>> type: boolean
>>
>> patternProperties:
>> - "^([a-z0-9]*-)?sram(-section)?@[a-f0-9]+$":
>> + "^([a-z0-9]*-|)+sram(-section)?@[a-f0-9]+$":
>
> '|)' is an odd syntax, not really intuitive. Why this cannot be:
> ([a-z0-9]+-)*

Might as well

> ?
> (replacing also * -> + inside)

Yeah good idea

Although, as a fun tangent, I just checked and DTC accepts node
names starting with a hyphen.. We should probably change that..

Konrad