lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 6 Jun 2023 13:14:19 +0200
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To:     Miquel Raynal <miquel.raynal@...tlin.com>
Cc:     Chris Packham <Chris.Packham@...iedtelesis.co.nz>,
        "richard@....at" <richard@....at>,
        "vigneshr@...com" <vigneshr@...com>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "krzysztof.kozlowski+dt@...aro.org" 
        <krzysztof.kozlowski+dt@...aro.org>,
        "conor+dt@...nel.org" <conor+dt@...nel.org>,
        "andrew@...n.ch" <andrew@...n.ch>,
        "gregory.clement@...tlin.com" <gregory.clement@...tlin.com>,
        "sebastian.hesselbarth@...il.com" <sebastian.hesselbarth@...il.com>,
        "conor@...nel.org" <conor@...nel.org>,
        "linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "enachman@...vell.com" <enachman@...vell.com>,
        Vadym Kochan <vadym.kochan@...ision.eu>
Subject: Re: [PATCH v8 3/3] dt-bindings: mtd: marvell-nand: Convert to YAML DT
 scheme

On 06/06/2023 13:11, Krzysztof Kozlowski wrote:
>>> If yes, please ignore the series sent aside, I will work on it again
>>> and send a v2.
>>
>> Actually I already see a problem, let's the ingenic,nand.yaml example.
>> The goal, IIUC, is to do:
>>
>>  patternProperties:
>>    "^nand@[a-f0-9]$":
>>      type: object
>> +    $ref: nand-chip.yaml
>>      properties:
>>
>>        ...
>>
>> +    unevaluatedProperties: false
>>
>> The example in this file uses a property, nand-on-flash-bbt, which is
>> described inside nand-controller.yaml instead of nand-chip.yaml.
>> Indeed, the former actually describes many properties which are a bit
>> more controller related than chip related. With the above description,
>> the example fails because nand-on-flash-bbt is not allowed (it is not
>> listed in nand-chip.yaml).
>>
>> How would you proceed in this case?
>>
>> Maybe I could move all the NAND chip properties which are somehow
>> related to NAND controllers (and defined in nand-controller.yaml) in a
>> dedicated file and reference it from nand-chip.yaml? Any other idea is
>> welcome.
> 
> Yes, this would work and seems reasonable. 

Actually, since nand-chip is used by both SPI and NAND, then I think
better would be to create separate file - nand-only-chip.yaml (name to
be discussed):

nand-controller.yaml:
  "^nand@[a-f0-9]$":
    $ref: nand-only-chip.yaml

nand-only-chip.yaml:
  $ref: nand-chip.yaml
  all nand-controller-chip properties follow



> Other way could be to add
> unevaluatedProperties:false on this level (so after ref:nand-chip.yaml)
> in nand-controller.yaml. This however would not allow any new properties
> to be defined in device bindings.

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ