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] [thread-next>] [day] [month] [year] [list]
Date: Wed, 19 Jun 2024 18:27:26 +0100
From: Conor Dooley <conor@...nel.org>
To: Kanak Shilledar <kanakshilledar@...il.com>
Cc: Vladimir Zapolskiy <vz@...ia.com>, Andi Shyti <andi.shyti@...nel.org>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	linux-arm-kernel@...ts.infradead.org, linux-i2c@...r.kernel.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dt-bindings: i2c: convert to dt schema

On Wed, Jun 19, 2024 at 09:19:36PM +0530, Kanak Shilledar wrote:

$subject is missing a prefix for the device in question.

> diff --git a/Documentation/devicetree/bindings/i2c/nxp,lpc1788-i2c.yaml b/Documentation/devicetree/bindings/i2c/nxp,lpc1788-i2c.yaml
> new file mode 100644
> index 000000000000..79d6774dd54f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i2c/nxp,lpc1788-i2c.yaml
> @@ -0,0 +1,66 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/i2c/nxp,lpc1788-i2c.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: NXP I2C controller for LPC2xxx/178x/18xx/43xx
> +
> +maintainers:
> +  - Vladimir Zapolskiy <vz@...ia.com>
> +
> +allOf:
> +  - $ref: /schemas/i2c/i2c-controller.yaml#
> +
> +properties:
> +  compatible:
> +    const: nxp,lpc1788-i2c
> +
> +  reg:
> +    description: physical address and length of the device registers

Drop all of these descriptions as they're obvious, other than...

> +    maxItems: 1
> +
> +  interrupts:
> +    description: a single interrupt specifier
> +    maxItems: 1
> +
> +  clocks:
> +    description: clock for the device
> +    maxItems: 1
> +
> +  clock-frequency:
> +    description: the desired I2C bus clock frequency in Hz

..maybe this one. Otherwise this looks okay to me.

Thanks,
Conor.

> +    default: 100000
> +
> +  resets:
> +    description: reset for the device
> +    maxItems: 1
> +
> +  '#address-cells':
> +    const: 1
> +
> +  '#size-cells':
> +    const: 0

These two come for free with the ref to i2c-controller.yaml :)

> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +  - "#address-cells"
> +  - "#size-cells"
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include "dt-bindings/clock/lpc18xx-ccu.h"
> +
> +    i2c@...a1000 {
> +        compatible = "nxp,lpc1788-i2c";
> +        reg = <0x400a1000 0x1000>;
> +        interrupts = <18>;
> +        clocks = <&ccu1 CLK_APB1_I2C0>;
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +    };
> -- 
> 2.45.2
> 

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ