lkml.org 
[lkml]   [2020]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 2/3] dt-bindings: power: supply: add cw2015_battery bindings
On Thu, Mar 12, 2020 at 12:17:55AM +0100, Tobias Schramm wrote:
> Hi Daniel,
>
> thanks for reviewing. The typo will be fixed for v4.
>
> >> + power-supplies:
> >> + description:
> >> + Specifies supplies used for charging the battery connected to this gauge
> >> + allOf:
> >> + - $ref: /schemas/types.yaml#/definitions/phandle-array
> >> + - minItems: 1
> >> + maxItems: 8 # Should be enough
> >
> > Is it necessary to set a maximum? power_supply.txt is still a text file
> > but there is no mention of a maximum there.
> >
> I think so? Removing maxItems and running dtbs_check on a dts with more
> than one supply phandle in the power-supplies property results in an error:
> linux/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dt.yaml:
> cw2015@62: power-supplies: [[142], [50]] is too long

Interesting. I saw the "Should be enough" comment replicated in several
YAML bindings (with varying degress of paranoia about how much "enough" is).
There are also several that simply set minItems without setting
maxItems, perhaps they have just never been any DTs that test those
bindings with more than one item.


Daniel.

\
 
 \ /
  Last update: 2020-03-12 11:18    [W:0.049 / U:34.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site