Re: [PATCH 2/3] dt-bindings: hsi: nokia-modem: convert to YAML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25/03/2024 22:45, Sebastian Reichel wrote:
> Convert the legacy txt binding to modern YAML.
> No semantic change.
> 
> Signed-off-by: Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx>
> ---
>  .../devicetree/bindings/hsi/nokia-modem.txt        |  59 ------------
>  .../devicetree/bindings/hsi/nokia-modem.yaml       | 101 +++++++++++++++++++++
>  2 files changed, 101 insertions(+), 59 deletions(-)
> 


> -};
> diff --git a/Documentation/devicetree/bindings/hsi/nokia-modem.yaml b/Documentation/devicetree/bindings/hsi/nokia-modem.yaml
> new file mode 100644
> index 000000000000..c57cbcc7b722
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hsi/nokia-modem.yaml

Filename should match compatibles. nokia,n9-modem.yaml or nokia,modem.yaml


> @@ -0,0 +1,101 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/hsi/nokia-modem.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Nokia modem
> +
> +maintainers:
> +  - Sebastian Reichel <sre@xxxxxxxxxx>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - nokia,n900-modem
> +      - nokia,n950-modem
> +      - nokia,n9-modem
> +

Aren't hsi-channel-ids related to hsi-channel-names? If so, they should
be here with constraints.

> +  hsi-channel-names:
> +    items:
> +      - const: mcsaab-control
> +      - const: speech-control
> +      - const: speech-data
> +      - const: mcsaab-data
> +
> +  interrupts:
> +    items:
> +      - description: modem reset indication
> +
> +  gpios:
> +    minItems: 3
> +    maxItems: 5
> +
> +  gpio-names:
> +    items:
> +      - const: cmt_apeslpx
> +      - const: cmt_rst_rq
> +      - const: cmt_en
> +      - const: cmt_rst
> +      - const: cmt_bsi
> +    minItems: 3
> +
> +required:
> +  - gpios
> +  - gpio-names
> +  - interrupts
> +
> +allOf:
> +  - $ref: hsi-client.yaml#
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - nokia,n950-modem
> +              - nokia,n9-modem
> +    then:
> +      properties:
> +        gpios:
> +          maxItems: 3
> +        gpio-names:
> +          maxItems: 3
> +    else:
> +      properties:
> +        gpios:
> +          minItems: 5
> +        gpio-names:
> +          minItems: 5
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    hsi-client {

This should be "modem".

> +        compatible = "nokia,n900-modem";
> +


Best regards,
Krzysztof





[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux