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: <20240826-slurp-earphone-0d5173923ae8@spud>
Date: Mon, 26 Aug 2024 16:50:32 +0100
From: Conor Dooley <conor@...nel.org>
To: Macpaul Lin <macpaul.lin@...iatek.com>
Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
	Matthias Brugger <matthias.bgg@...il.com>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>, Lee Jones <lee@...nel.org>,
	Alexandre Mergnat <amergnat@...libre.com>,
	Flora Fu <flora.fu@...iatek.com>,
	Bear Wang <bear.wang@...iatek.com>,
	Pablo Sun <pablo.sun@...iatek.com>, Macpaul Lin <macpaul@...il.com>,
	Sen Chu <sen.chu@...iatek.com>,
	Chris-qj chen <chris-qj.chen@...iatek.com>,
	MediaTek Chromebook Upstream <Project_Global_Chrome_Upstream_Group@...iatek.com>,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-mediatek@...ts.infradead.org, devicetree@...r.kernel.org,
	Chen-Yu Tsai <wenst@...omium.org>
Subject: Re: [PATCH] dt-bindings: mfd: mediatek,mt6357: Fixup reference to
 pwrap node

On Mon, Aug 26, 2024 at 02:54:15PM +0800, Macpaul Lin wrote:
> The mt6357 is a subnode of pwrap node. Previously, the documentation
> only included a note in the description of mt6357. This change adds the
> appropriate $ref for pwrap to ensure clarity and correctness.

I think this change is wrong and the existing binding is fine.
Adding the ref overcomplicates the binding completely, and stating that
this is a child node of another device is sufficient.

Instead, if anything, the pwrap binding should have a ref to /this/
binding.

Thanks,
Conor.

> 
>   $ref: /schemas/soc/mediatek/mediatek,pwrap.yaml
> 
> Additionally, the indentation for the pmic section has been adjusted
> to match the corresponding structure.
> 
> Signed-off-by: Macpaul Lin <macpaul.lin@...iatek.com>
> ---
>  .../bindings/mfd/mediatek,mt6357.yaml         | 124 +++++++++---------
>  1 file changed, 65 insertions(+), 59 deletions(-)
> 
> Changes for v1:
>  - This patch has been made based on linux-next/master branch.
> 
> diff --git a/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml b/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml
> index b67fbe0..5f4f540 100644
> --- a/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml
> +++ b/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml
> @@ -22,69 +22,75 @@ description: |
>  
>    It is interfaced to host controller using SPI interface by a proprietary hardware
>    called PMIC wrapper or pwrap. This MFD is a child device of pwrap.
> -  See the following for pwrap node definitions:
> -  Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml
>  
>  properties:
> -  compatible:
> -    const: mediatek,mt6357
> -
> -  interrupts:
> -    maxItems: 1
> -
> -  interrupt-controller: true
> -
> -  "#interrupt-cells":
> -    const: 2
> -
> -  mediatek,hp-pull-down:
> -    description:
> -      Earphone driver positive output stage short to
> -      the audio reference ground.
> -    type: boolean
> -
> -  mediatek,micbias0-microvolt:
> -    description: Selects MIC Bias 0 output voltage.
> -    enum: [1700000, 1800000, 1900000, 2000000,
> -           2100000, 2500000, 2600000, 2700000]
> -    default: 1700000
> -
> -  mediatek,micbias1-microvolt:
> -    description: Selects MIC Bias 1 output voltage.
> -    enum: [1700000, 1800000, 1900000, 2000000,
> -           2100000, 2500000, 2600000, 2700000]
> -    default: 1700000
> -
> -  regulators:
> -    type: object
> -    $ref: /schemas/regulator/mediatek,mt6357-regulator.yaml
> -    unevaluatedProperties: false
> -    description:
> -      List of MT6357 BUCKs and LDOs regulators.
> -
> -  rtc:
> +  pwrap:
>      type: object
> -    $ref: /schemas/rtc/rtc.yaml#
> -    unevaluatedProperties: false
> -    description:
> -      MT6357 Real Time Clock.
> +    $ref: /schemas/soc/mediatek/mediatek,pwrap.yaml
>      properties:
> -      compatible:
> -        const: mediatek,mt6357-rtc
> -      start-year: true
> -    required:
> -      - compatible
> -
> -  keys:
> -    type: object
> -    $ref: /schemas/input/mediatek,pmic-keys.yaml
> -    unevaluatedProperties: false
> -    description:
> -      MT6357 power and home keys.
> -
> -required:
> -  - compatible
> -  - regulators
> +      pmic:
> +        type: object
> +        additionalProperties: false
> +        properties:
> +          compatible:
> +            const: mediatek,mt6357
> +
> +          interrupts:
> +            maxItems: 1
> +
> +          interrupt-controller: true
> +
> +          "#interrupt-cells":
> +            const: 2
> +
> +          mediatek,hp-pull-down:
> +            description:
> +              Earphone driver positive output stage short to
> +              the audio reference ground.
> +            type: boolean
> +
> +          mediatek,micbias0-microvolt:
> +            description: Selects MIC Bias 0 output voltage.
> +            enum: [1700000, 1800000, 1900000, 2000000,
> +                   2100000, 2500000, 2600000, 2700000]
> +            default: 1700000
> +
> +          mediatek,micbias1-microvolt:
> +            description: Selects MIC Bias 1 output voltage.
> +            enum: [1700000, 1800000, 1900000, 2000000,
> +                   2100000, 2500000, 2600000, 2700000]
> +            default: 1700000
> +
> +          regulators:
> +            type: object
> +            $ref: /schemas/regulator/mediatek,mt6357-regulator.yaml
> +            unevaluatedProperties: false
> +            description:
> +              List of MT6357 BUCKs and LDOs regulators.
> +
> +          rtc:
> +            type: object
> +            $ref: /schemas/rtc/rtc.yaml#
> +            unevaluatedProperties: false
> +            description:
> +              MT6357 Real Time Clock.
> +            properties:
> +              compatible:
> +                const: mediatek,mt6357-rtc
> +              start-year: true
> +            required:
> +              - compatible
> +
> +          keys:
> +            type: object
> +            $ref: /schemas/input/mediatek,pmic-keys.yaml
> +            unevaluatedProperties: false
> +            description:
> +              MT6357 power and home keys.
> +
> +        required:
> +          - compatible
> +          - regulators
>  
>  additionalProperties: false
>  
> -- 
> 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