lkml.org 
[lkml]   [2022]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v9,2/7] dt-bindings: thermal: Add dt-binding document for LVTS thermal controllers
From
On 14/09/2022 14:19, AngeloGioacchino Del Regno wrote:
>
>> +
>> + nvmem-cell-names:
>> + minItems: 1
>> + maxItems: 2
>> + description: Calibration efuse cell names for LVTS
>
> Actually, maxItems is not really two, but it depends on how many
> eFuse arrays / nvmem cells we have for each SoC, so I was thinking...
>
> ...what about doing something like
>
> nvmem-cell-names:
> minItems: 1
> items:
> pattern: 'lvts-calib-data[0-9]+$'
>
> and then,
> if:
> properties:
> compatible:
> contains:
> enum:
> - mediatek,blahblah-something
> then:
> properties:
> nvmem-cell-names:
> maxItems: 2 (or 3, 4, 5...)
>
> P.S.: I haven't tried any binding check on the proposed lines.
>

Should work, but does not enforce the order, so I would rather propose
something longer:

properties:
nvmem-cell-names:
items:
- lvts-calib-data0
- lvts-calib-data1
minItems: 1


and then in allOf:if:then set minItems:2 or maxItems:1




Best regards,
Krzysztof

\
 
 \ /
  Last update: 2022-09-21 08:21    [W:0.113 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site