[PATCH] dt-bindings: More removals of type references on common properties

Luca Ceresoli luca at lucaceresoli.net
Tue May 11 07:09:24 PDT 2021


Hi Rob,

On 11/05/21 15:44, Rob Herring wrote:
> On Tue, May 11, 2021 at 2:20 AM Luca Ceresoli <luca at lucaceresoli.net> wrote:
>>
>> Hi,
>>
>> On 10/05/21 22:45, Rob Herring wrote:
>>> Users of common properties shouldn't have a type definition as the
>>> common schemas already have one. A few new ones slipped in and
>>> *-names was missed in the last clean-up pass. Drop all the unnecessary
>>> type references in the tree.
>>>
>>> A meta-schema update to catch these is pending.
>>>
>>> Cc: Luca Ceresoli <luca at lucaceresoli.net>
>>> Cc: Stephen Boyd <sboyd at kernel.org>
>>> Cc: Olivier Moysan <olivier.moysan at foss.st.com>
>>> Cc: Arnaud Pouliquen <arnaud.pouliquen at foss.st.com>
>>> Cc: Jonathan Cameron <jic23 at kernel.org>
>>> Cc: Lars-Peter Clausen <lars at metafoo.de>
>>> Cc: Dmitry Torokhov <dmitry.torokhov at gmail.com>
>>> Cc: Bjorn Andersson <bjorn.andersson at linaro.org>
>>> Cc: Georgi Djakov <djakov at kernel.org>
>>> Cc: "David S. Miller" <davem at davemloft.net>
>>> Cc: Jakub Kicinski <kuba at kernel.org>
>>> Cc: Sebastian Reichel <sre at kernel.org>
>>> Cc: Orson Zhai <orsonzhai at gmail.com>
>>> Cc: Baolin Wang <baolin.wang7 at gmail.com>
>>> Cc: Chunyan Zhang <zhang.lyra at gmail.com>
>>> Cc: Liam Girdwood <lgirdwood at gmail.com>
>>> Cc: Mark Brown <broonie at kernel.org>
>>> Cc: Fabrice Gasnier <fabrice.gasnier at st.com>
>>> Cc: Odelu Kukatla <okukatla at codeaurora.org>
>>> Cc: Alex Elder <elder at kernel.org>
>>> Cc: Shengjiu Wang <shengjiu.wang at nxp.com>
>>> Cc: linux-clk at vger.kernel.org
>>> Cc: alsa-devel at alsa-project.org
>>> Cc: linux-iio at vger.kernel.org
>>> Cc: linux-arm-kernel at lists.infradead.org
>>> Cc: linux-input at vger.kernel.org
>>> Cc: linux-pm at vger.kernel.org
>>> Cc: netdev at vger.kernel.org
>>> Signed-off-by: Rob Herring <robh at kernel.org>
>>> ---
>>>  Documentation/devicetree/bindings/clock/idt,versaclock5.yaml    | 2 --
>>>  .../devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml         | 1 -
>>>  Documentation/devicetree/bindings/input/input.yaml              | 1 -
>>>  Documentation/devicetree/bindings/interconnect/qcom,rpmh.yaml   | 1 -
>>>  Documentation/devicetree/bindings/net/qcom,ipa.yaml             | 1 -
>>>  .../devicetree/bindings/power/supply/sc2731-charger.yaml        | 2 +-
>>>  Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml          | 2 +-
>>>  7 files changed, 2 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml b/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml
>>> index c268debe5b8d..28675b0b80f1 100644
>>> --- a/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml
>>> +++ b/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml
>>> @@ -60,7 +60,6 @@ properties:
>>>      maxItems: 2
>>>
>>>    idt,xtal-load-femtofarads:
>>> -    $ref: /schemas/types.yaml#/definitions/uint32
>>>      minimum: 9000
>>>      maximum: 22760
>>>      description: Optional load capacitor for XTAL1 and XTAL2
>>> @@ -84,7 +83,6 @@ patternProperties:
>>>          enum: [ 1800000, 2500000, 3300000 ]
>>>        idt,slew-percent:
>>>          description: The Slew rate control for CMOS single-ended.
>>> -        $ref: /schemas/types.yaml#/definitions/uint32
>>>          enum: [ 80, 85, 90, 100 ]
>>
>> Ok, but shouldn't "percent" be listed in
>> Documentation/devicetree/bindings/property-units.txt?
> 
> It is in the schema already[1].

Sure, but having an incomplete file in the kernel is poorly useful, if
not misleading. What about any of these options:

- add to property-units.txt the missing units
- delete property-units.txt from the kernel sources
- replace the entire content of property-units.txt with a link to the
  schema file, stating it is the authoritative and complete source

I would feel a lot better with any of these. I can prepare the patch too.

-- 
Luca



More information about the linux-arm-kernel mailing list