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: Mon, 24 Jun 2024 15:11:22 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Adam Ford <aford173@...il.com>
Cc: devicetree@...r.kernel.org, woods.technical@...il.com,
 aford@...conembedded.com, "David S. Miller" <davem@...emloft.net>,
 Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
 Paolo Abeni <pabeni@...hat.com>, Rob Herring <robh@...nel.org>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
 <conor+dt@...nel.org>, Adam Ford <aford@...il.com>, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dt-bindings: net: davinci_emac: Convert to yaml version
 from txt

On 24/06/2024 13:59, Adam Ford wrote:

>>> diff --git a/Documentation/devicetree/bindings/net/davinci_emac.yaml b/Documentation/devicetree/bindings/net/davinci_emac.yaml
>>> new file mode 100644
>>> index 000000000000..4c2640aef8a1
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/net/davinci_emac.yaml
>>
>> Filename matching compatible format. Missing vendor prefix. Underscores
>> are not used in names or compatibles.
> 
> Thank you for the review.
> 
> Would a proper name be ti,davinci-emac.yaml?

Yes, it's fine.

> 
>>
>>
>>> @@ -0,0 +1,111 @@
>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>>> +%YAML 1.2
>>> +---
>>> +$id: http://devicetree.org/schemas/net/davinci_emac.yaml#
>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>> +
>>> +title: Texas Instruments Davici EMAC
>>> +
>>> +maintainers:
>>> +  - Adam Ford <aford@...il.com>
>>> +
>>> +description:
>>> +  Ethernet based on the Programmable Real-Time Unit and Industrial
>>> +  Communication Subsystem.
>>> +
>>> +allOf:
>>> +  - $ref: ethernet-controller.yaml#
>>> +
>>> +properties:
>>> +  compatible:
>>> +    items:
>>
>>
>> That's just enum, no need for items here.
>>
>>> +      - enum:
>>> +          - ti,davinci-dm6467-emac # da850
>>> +          - ti,dm816-emac
>>> +          - ti,am3517-emac
>>> +
>>> +  reg:
>>> +    maxItems: 1
>>> +
>>> +  interrupts:
>>> +    minItems: 4
>>
>> You need to list and describe the items.
>>
>>> +
>>> +  clocks:
>>> +    maxItems: 1
>>> +
>>> +  clock-names:
>>> +    items:
>>> +      - const: ick
>>> +
>>> +  power-domains:
>>> +    maxItems: 1
>>> +
>>> +  resets:
>>> +    maxItems: 1
>>> +
>>> +  local-mac-address: true
>>
>> Drop
>>
>>> +  mac-address: true
>>
>> Drop
>>
>> You miss top-level $ref to appropriate schema.
>>
>>> +
>>> +  syscon:
>>> +    $ref: /schemas/types.yaml#/definitions/phandle
>>> +    description: a phandle to the global system controller on
>>> +      to enable/disable interrupts
>>
>> Drop entire property. There was no such property in old binding and
>> nothing explains why it was added.
> 
> The am3517.dtsi emac node has a syscon, so I didn't want to break it.
> I'll take a look to see what the syscon node on the am3517 does.  I
> struggle with if statements in yaml, but if it's necessary for the
> am3517, can we keep it if I elaborate on it in the commit message?

Explain in commit msg changes to the binding done during conversion.
With a rationale why these are needed (e.g. existing DTS and Linux
drivers use them).


Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ