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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 1 Nov 2021 15:32:29 +0100
From:   Peter Rosin <peda@...ntia.se>
To:     Horatiu Vultur <horatiu.vultur@...rochip.com>, robh+dt@...nel.org,
        linux-i2c@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/2] dt-bindings: i2c-mux: Add property for settle time

On 2021-11-01 13:25, Horatiu Vultur wrote:
> Some HW requires some time for the signals to settle after the muxing is
> changed. Allow this time to be specified in device tree.
> 
> Signed-off-by: Horatiu Vultur <horatiu.vultur@...rochip.com>
> ---
>  Documentation/devicetree/bindings/i2c/i2c-mux.yaml | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux.yaml b/Documentation/devicetree/bindings/i2c/i2c-mux.yaml
> index 24cac36037f5..4628ff6340c1 100644
> --- a/Documentation/devicetree/bindings/i2c/i2c-mux.yaml
> +++ b/Documentation/devicetree/bindings/i2c/i2c-mux.yaml
> @@ -29,6 +29,12 @@ properties:
>    '#size-cells':
>      const: 0
>  
> +  settle-time-us:
> +    default: 0
> +    description:
> +      The time required for the signals to settle. Currently only the
> +      i2c-mux-gpmux driver supports this optional binding.

The information about how i2c-mux-gpmux is special is bound to go stale,
and I don't think we should mention such specific details in the binding.
What I meant was a generic warnings about optional bindings perhaps not
being supported by all drivers, along the lines of this from i2c.txt:

"These properties may not be supported by all drivers. However, if a driver
 wants to support one of the below features, it should adapt these bindings."

However, I now notice that this sentence makes no sense. It looks like it
should be s/adapt/adopt/.

And, in the i2c-mux.yaml case it can simply say "Optional properties"
instead of "These properites" (which refers to a subset of properties
immediately below the text) since with a yaml binding it is always
clear which properties are optional and which are required. Lastly, I
guess this warning belongs in the description.

> +
>  patternProperties:
>    '^i2c@[0-9a-f]+$':
>      $ref: /schemas/i2c/i2c-controller.yaml
> 

Since this is the first optional property, you now need to specify what
properties are required, which is everything but settle-time-us. If you
don't, all properties are required. Which is not what we want...

Something like this should do it, I think:

required:
  - compatible
  - '#address-cells'
  - '#size-cells'

Cheers,
Peter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ