diff mbox series

[v2,2/3] dt-bindings: serial: pl011: Change to reference the kernel-defined serial.yaml

Message ID 20210422085837.513-3-thunder.leizhen@huawei.com
State New
Headers show
Series dt-bindings: serial: pl011: Fix some dtbs_check warnings | expand

Commit Message

Leizhen (ThunderTown) April 22, 2021, 8:58 a.m. UTC
The /schemas/serial.yaml from dt-schema only has the property $nodename,
whereas the kernel-defined /schemas/serial/serial.yaml contains more
useful properties, support for more complex application scenarios.

For example:
1) The property "current-speed" in fsl-lx2160a.dtsi
2) The subnode "bluetooth" in hi3660-hikey960.dts

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>

---
 Documentation/devicetree/bindings/serial/pl011.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.21.1

Comments

Rob Herring April 30, 2021, 3:21 p.m. UTC | #1
On Thu, Apr 22, 2021 at 04:58:36PM +0800, Zhen Lei wrote:
> The /schemas/serial.yaml from dt-schema only has the property $nodename,
> whereas the kernel-defined /schemas/serial/serial.yaml contains more
> useful properties, support for more complex application scenarios.
> 
> For example:
> 1) The property "current-speed" in fsl-lx2160a.dtsi
> 2) The subnode "bluetooth" in hi3660-hikey960.dts
> 
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
>  Documentation/devicetree/bindings/serial/pl011.yaml | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

What about all these:

$ git grep 'schemas/serial.yaml'
Documentation/devicetree/bindings/serial/8250.yaml:  - $ref: /schemas/serial.yaml#
Documentation/devicetree/bindings/serial/brcm,bcm7271-uart.yaml:  - $ref: /schemas/serial.yaml#
Documentation/devicetree/bindings/serial/ingenic,uart.yaml:  - $ref: /schemas/serial.yaml#
Documentation/devicetree/bindings/serial/pl011.yaml:  - $ref: /schemas/serial.yaml#
Documentation/devicetree/bindings/serial/qca,ar9330-uart.yaml:  - $ref: /schemas/serial.yaml#
Documentation/devicetree/bindings/serial/samsung_uart.yaml:  - $ref: /schemas/serial.yaml#
Documentation/devicetree/bindings/serial/sifive-serial.yaml:  - $ref: /schemas/serial.yaml#
Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml:  - $ref: /schemas/serial.yaml#
Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml:    $ref: /schemas/serial.yaml#
Leizhen (ThunderTown) May 6, 2021, 2:44 a.m. UTC | #2
On 2021/4/30 23:21, Rob Herring wrote:
> On Thu, Apr 22, 2021 at 04:58:36PM +0800, Zhen Lei wrote:
>> The /schemas/serial.yaml from dt-schema only has the property $nodename,
>> whereas the kernel-defined /schemas/serial/serial.yaml contains more
>> useful properties, support for more complex application scenarios.
>>
>> For example:
>> 1) The property "current-speed" in fsl-lx2160a.dtsi
>> 2) The subnode "bluetooth" in hi3660-hikey960.dts
>>
>> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
>> ---
>>  Documentation/devicetree/bindings/serial/pl011.yaml | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> What about all these:

Currently, the extended attributes described in /schemas/serial/serial.yaml are
not referenced in the dts of other serial ports except pl011. So I didn't change
them. At least I run dtbs_check one by one on the ARM64 platform, no warning is
reported. Now, it seems that I was wrong, /schemas/serial/serial.yaml is applicable
to all serial ports. Even if those attributes are not currently referenced, the
reference relationship should be corrected in advance.

> 
> $ git grep 'schemas/serial.yaml'
> Documentation/devicetree/bindings/serial/8250.yaml:  - $ref: /schemas/serial.yaml#
> Documentation/devicetree/bindings/serial/brcm,bcm7271-uart.yaml:  - $ref: /schemas/serial.yaml#
> Documentation/devicetree/bindings/serial/ingenic,uart.yaml:  - $ref: /schemas/serial.yaml#
> Documentation/devicetree/bindings/serial/pl011.yaml:  - $ref: /schemas/serial.yaml#
> Documentation/devicetree/bindings/serial/qca,ar9330-uart.yaml:  - $ref: /schemas/serial.yaml#
> Documentation/devicetree/bindings/serial/samsung_uart.yaml:  - $ref: /schemas/serial.yaml#
> Documentation/devicetree/bindings/serial/sifive-serial.yaml:  - $ref: /schemas/serial.yaml#
> Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml:  - $ref: /schemas/serial.yaml#
> Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml:    $ref: /schemas/serial.yaml#
> 
> .
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/serial/pl011.yaml b/Documentation/devicetree/bindings/serial/pl011.yaml
index 1f8e9f2644b6..142187337c76 100644
--- a/Documentation/devicetree/bindings/serial/pl011.yaml
+++ b/Documentation/devicetree/bindings/serial/pl011.yaml
@@ -10,7 +10,7 @@  maintainers:
   - Rob Herring <robh@kernel.org>
 
 allOf:
-  - $ref: /schemas/serial.yaml#
+  - $ref: serial.yaml#
 
 # Need a custom select here or 'arm,primecell' will match on lots of nodes
 select:
@@ -103,7 +103,7 @@  dependencies:
   poll-rate-ms: [ auto-poll ]
   poll-timeout-ms: [ auto-poll ]
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |