Re: [PATCH] ASoC: dt-bindings: realtek,rt5677: Convert to dtschema

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



On 25/06/2024 11:22, Animesh Agarwal wrote:
> Convert the RT5677 audio CODEC bindings to DT schema.
> 
> Signed-off-by: Animesh Agarwal <animeshagarwal28@xxxxxxxxx>
> Cc: Daniel Baluta <daniel.baluta@xxxxxxx>

Thank you for your patch. There is something to discuss/improve.

> +  realtek,gpio-config:
> +    description: |
> +      Array of six 8bit elements that configures GPIO.
> +      0 - floating (reset value)
> +      1 - pull down
> +      2 - pull up
> +    $ref: /schemas/types.yaml#/definitions/uint32-array
> +    minItems: 6
> +    maxItems: 6
> +    items:
> +      maximum: 2
> +
> +patternProperties:
> +  "^realtek,in[1-2]-differential$":

In the future, please use consistent quotes, so either ' or ".

> +    type: boolean
> +    description: Indicate MIC1/2 input are differential, rather than
> +      single-ended.
> +
> +  "^realtek,lout[1-3]-differential$":
> +    type: boolean
> +    description: Indicate LOUT1/2/3 outputs are differential, rather than
> +      single-ended.
> +
> +  "^realtek,jd[1-3]-gpio$":
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    enum:
> +      - 0 # OFF
> +      - 1 # GPIO1 for jd1 and GPIO4 for jd2.
> +      - 2 # GPIO2 for jd1 and GPIO5 for jd2.
> +      - 3 # GPIO3 for jd1 and GPIO6 for jd2.


I don't quite get it. What about jd3? I think it would be clearer if
these were listed as properties, not pattern properties.

> +    description: Configures GPIO Mic Jack detection 1, 2 and 3.
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - gpio-controller
> +  - '#gpio-cells'
> +
> +unevaluatedProperties: false

Best regards,
Krzysztof





[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux