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]
Message-ID: <20200501210314.GC24163@bogus>
Date:   Fri, 1 May 2020 16:03:14 -0500
From:   Rob Herring <robh@...nel.org>
To:     Charles Keepax <ckeepax@...nsource.cirrus.com>
Cc:     lee.jones@...aro.org, broonie@...nel.org, mturquette@...libre.com,
        sboyd@...nel.org, jdelvare@...e.com, linux@...ck-us.net,
        linus.walleij@...aro.org, lgirdwood@...il.com,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
        patches@...nsource.cirrus.com
Subject: Re: [PATCH 5/6] clk: lochnagar: Move binding over to dtschema

On Mon, Apr 27, 2020 at 11:28:11AM +0100, Charles Keepax wrote:
> Signed-off-by: Charles Keepax <ckeepax@...nsource.cirrus.com>
> ---
>  .../devicetree/bindings/clock/cirrus,lochnagar.txt |  94 ---------
>  .../bindings/clock/cirrus,lochnagar.yaml           | 220 +++++++++++++++++++++
>  2 files changed, 220 insertions(+), 94 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/clock/cirrus,lochnagar.txt
>  create mode 100644 Documentation/devicetree/bindings/clock/cirrus,lochnagar.yaml


> diff --git a/Documentation/devicetree/bindings/clock/cirrus,lochnagar.yaml b/Documentation/devicetree/bindings/clock/cirrus,lochnagar.yaml
> new file mode 100644
> index 0000000000000..55d27e4475333
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/cirrus,lochnagar.yaml
> @@ -0,0 +1,220 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/clock/cirrus,lochnagar.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Cirrus Logic Lochnagar Audio Development Board
> +
> +maintainers:
> +  - patches@...nsource.cirrus.com
> +
> +description: |
> +  Lochnagar is an evaluation and development board for Cirrus Logic
> +  Smart CODEC and Amp devices. It allows the connection of most Cirrus
> +  Logic devices on mini-cards, as well as allowing connection of various
> +  application processor systems to provide a full evaluation platform.
> +  Audio system topology, clocking and power can all be controlled through
> +  the Lochnagar, allowing the device under test to be used in a variety of
> +  possible use cases.
> +
> +  This binding document describes the binding for the clock portion of the
> +  driver.
> +
> +  Also see these documents for generic binding information:
> +    [1] Clock : ../clock/clock-bindings.txt
> +
> +  And these for relevant defines:
> +    [2] include/dt-bindings/clock/lochnagar.h
> +
> +  This binding must be part of the Lochnagar MFD binding:
> +    [3] ../mfd/cirrus,lochnagar.yaml
> +
> +properties:
> +  lochnagar-clk:
> +    type: object
> +
> +    properties:
> +      compatible:
> +        contains:

Drop contains.

> +          enum:
> +            - cirrus,lochnagar1-clk
> +            - cirrus,lochnagar2-clk
> +
> +      '#clock-cells':
> +        description:
> +          Must be 1. The first cell indicates the clock number, see [2] for
> +          available clocks and [1].
> +        const: 1
> +      clock-names:
> +        description: |
> +          May contain entries for each of the following clocks:
> +           - ln-cdc-clkout : Output clock from CODEC card.
> +           - ln-dsp-clkout : Output clock from DSP card.
> +           - ln-gf-mclk1,ln-gf-mclk2,ln-gf-mclk3,ln-gf-mclk4 : Optional
> +             input audio clocks from host system.
> +           - ln-psia1-mclk, ln-psia2-mclk : Optional input audio clocks from
> +             external connector.
> +           - ln-spdif-mclk : Optional input audio clock from SPDIF.
> +           - ln-spdif-clkout : Optional input audio clock from SPDIF.
> +           - ln-adat-mclk : Optional input audio clock from ADAT.
> +           - ln-pmic-32k : On board fixed clock.
> +           - ln-clk-12m : On board fixed clock.
> +           - ln-clk-11m : On board fixed clock.
> +           - ln-clk-24m : On board fixed clock.
> +           - ln-clk-22m : On board fixed clock.
> +           - ln-clk-8m : On board fixed clock.
> +           - ln-usb-clk-24m : On board fixed clock.
> +           - ln-usb-clk-12m : On board fixed clock.

Don't define the list twice. Make the description a comment above or 
after each item below.

> +        items:
> +          enum:
> +            - ln-cdc-clkout
> +            - ln-dsp-clkout
> +            - ln-gf-mclk1
> +            - ln-gf-mclk2
> +            - ln-gf-mclk3
> +            - ln-gf-mclk4
> +            - ln-psia1-mclk
> +            - ln-psia2-mclk
> +            - ln-spdif-mclk
> +            - ln-spdif-clkout
> +            - ln-adat-mclk
> +            - ln-pmic-32k
> +            - ln-clk-12m
> +            - ln-clk-11m
> +            - ln-clk-24m
> +            - ln-clk-22m
> +            - ln-clk-8m
> +            - ln-usb-clk-24m
> +            - ln-usb-clk-12m
> +        minItems: 1
> +        maxItems: 19
> +      clocks: true
> +      assigned-clocks: true
> +      assigned-clock-parents: true
> +
> +    additionalProperties: false
> +
> +    required:
> +      - compatible
> +      - '#clock-cells'
> +
> +  lochnagar-pmic32k:
> +    type: object
> +    properties:
> +      compatible:
> +        enum:
> +          - fixed-clock
> +      '#clock-cells':
> +        const: 0
> +      clock-frequency:
> +        const: 32768
> +    required:
> +      - compatible
> +      - '#clock-cells'
> +      - clock-frequency

The fixed-clock.yaml schema will be applied to this. So all you need 
here are addtional constraints:

clock-frequency:
  const: 32768

> +
> +  lochnagar-clk12m:
> +    type: object
> +    properties:
> +      compatible:
> +        enum:
> +          - fixed-clock
> +      '#clock-cells':
> +        const: 0
> +      clock-frequency:
> +        const: 12288000
> +    required:
> +      - compatible
> +      - '#clock-cells'
> +      - clock-frequency
> +
> +  lochnagar-clk11m:
> +    type: object
> +    properties:
> +      compatible:
> +        enum:
> +          - fixed-clock
> +      '#clock-cells':
> +        const: 0
> +      clock-frequency:
> +        const: 11298600
> +    required:
> +      - compatible
> +      - '#clock-cells'
> +      - clock-frequency
> +
> +  lochnagar-clk24m:
> +    type: object
> +    properties:
> +      compatible:
> +        enum:
> +          - fixed-clock
> +      '#clock-cells':
> +        const: 0
> +      clock-frequency:
> +        const: 24576000
> +    required:
> +      - compatible
> +      - '#clock-cells'
> +      - clock-frequency
> +
> +  lochnagar-clk22m:
> +    type: object
> +    properties:
> +      compatible:
> +        enum:
> +          - fixed-clock
> +      '#clock-cells':
> +        const: 0
> +      clock-frequency:
> +        const: 22579200
> +    required:
> +      - compatible
> +      - '#clock-cells'
> +      - clock-frequency
> +
> +  lochnagar-clk8m:
> +    type: object
> +    properties:
> +      compatible:
> +        enum:
> +          - fixed-clock
> +      '#clock-cells':
> +        const: 0
> +      clock-frequency:
> +        const: 8192000
> +    required:
> +      - compatible
> +      - '#clock-cells'
> +      - clock-frequency
> +
> +  lochnagar-usb24m:
> +    type: object
> +    properties:
> +      compatible:
> +        enum:
> +          - fixed-clock
> +      '#clock-cells':
> +        const: 0
> +      clock-frequency:
> +        const: 24576000
> +    required:
> +      - compatible
> +      - '#clock-cells'
> +      - clock-frequency
> +
> +  lochnagar-usb12m:
> +    type: object
> +    properties:
> +      compatible:
> +        enum:
> +          - fixed-clock
> +      '#clock-cells':
> +        const: 0
> +      clock-frequency:
> +        const: 12288000
> +    required:
> +      - compatible
> +      - '#clock-cells'
> +      - clock-frequency
> -- 
> 2.11.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ