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: <20241001104145.24054-2-macpaul.lin@mediatek.com>
Date: Tue, 1 Oct 2024 18:41:44 +0800
From: Macpaul Lin <macpaul.lin@...iatek.com>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>, Rob Herring
	<robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
	<conor+dt@...nel.org>, Pavel Machek <pavel@....cz>, Lee Jones
	<lee@...nel.org>, Matthias Brugger <matthias.bgg@...il.com>,
	"AngeloGioacchino Del Regno" <angelogioacchino.delregno@...labora.com>, Sen
 Chu <sen.chu@...iatek.com>, Sean Wang <sean.wang@...iatek.com>, Macpaul Lin
	<macpaul.lin@...iatek.com>, Andrew Lunn <andrew@...n.ch>, Florian Fainelli
	<f.fainelli@...il.com>, Vladimir Oltean <olteanv@...il.com>, "David S .
 Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, "Jakub
 Kicinski" <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, "Sebastian
 Reichel" <sre@...nel.org>, Liam Girdwood <lgirdwood@...il.com>, Mark Brown
	<broonie@...nel.org>, Alexandre Belloni <alexandre.belloni@...tlin.com>,
	<linux-input@...r.kernel.org>, <devicetree@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <linux-leds@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>, <linux-mediatek@...ts.infradead.org>,
	<linux-pm@...r.kernel.org>, <netdev@...r.kernel.org>,
	<linux-rtc@...r.kernel.org>, <linux-sound@...r.kernel.org>, Alexandre Mergnat
	<amergnat@...libre.com>
CC: Bear Wang <bear.wang@...iatek.com>, Pablo Sun <pablo.sun@...iatek.com>,
	Macpaul Lin <macpaul@...il.com>, Chris-qj chen <chris-qj.chen@...iatek.com>,
	MediaTek Chromebook Upstream
	<Project_Global_Chrome_Upstream_Group@...iatek.com>, Chen-Yu Tsai
	<wenst@...omium.org>
Subject: [PATCH v8 2/3] ASoC: dt-bindings: mt6358: Convert to DT Schema

Convert the MediaTek MT6358 Audio CODEC bindings to DT schema.

This change implements the following updates:
1. Compatible property: Added the const 'mediatek,mt6358-sound'
   to ensure alignment with the schema in the actual (DTS) file
   "mt8186-corsola.dtsi" with 'mediatek,mt6366-sound'.
2. Example: Removed the example section, as it should be relocated to
   the MT6397 PMIC file 'mfd/mediatek,mt6397.yaml'.
3. Use filename 'mediatek,mt6358-sound.yaml' to align the compatible
   name.

Signed-off-by: Macpaul Lin <macpaul.lin@...iatek.com>
---
 .../bindings/sound/mediatek,mt6358-sound.yaml | 44 +++++++++++++++++++
 .../devicetree/bindings/sound/mt6358.txt      | 26 -----------
 2 files changed, 44 insertions(+), 26 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/mediatek,mt6358-sound.yaml
 delete mode 100644 Documentation/devicetree/bindings/sound/mt6358.txt

Changess for v1~v6:
 - It was not in the origin patch set.

Changes for v7:
 - It is seperated from the origin patch set (2/2, v6).
   It could simplifies the audio-codec node in next patch (3/3, v7)
   of 'mfd/mediatek,mt6397.yaml'

Changes for v8:
 - Update compatible property with 'oneOf:' and 'items' syntax.
   Thanks for the suggestion.
 - Replace 'mt6358.yaml' with 'mediatek,mt6358-sound.yaml' to align
   the compatible name.

diff --git a/Documentation/devicetree/bindings/sound/mediatek,mt6358-sound.yaml b/Documentation/devicetree/bindings/sound/mediatek,mt6358-sound.yaml
new file mode 100644
index 000000000000..36eb111f5746
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/mediatek,mt6358-sound.yaml
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/mediatek,mt6358-sound.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Mediatek MT6358 Audio Codec
+
+maintainers:
+  - Jiaxin Yu <jiaxin.yu@...iatek.com>
+  - Macpaul Lin <macpaul.lin@...iatek.com>
+
+description: |
+  The communication between MT6358 and SoC is through Mediatek PMIC wrapper.
+  For more detail, please visit Mediatek PMIC wrapper documentation.
+  Must be a child node of PMIC wrapper.
+
+properties:
+  compatible:
+    oneOf:
+      - enum:
+          - mediatek,mt6358-sound
+      - items:
+          - enum:
+              - mediatek,mt6366-sound
+          - const: mediatek,mt6358-sound
+
+  Avdd-supply:
+    description: Power source of AVDD
+
+  mediatek,dmic-mode:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: |
+      Indicates how many data pins are used to transmit two channels of PDM
+      signal. 0 means two wires, 1 means one wire. Default value is 0.
+    enum:
+      - 0 # two wires
+      - 1 # one wire
+
+required:
+  - compatible
+  - Avdd-supply
+
+additionalProperties: false
diff --git a/Documentation/devicetree/bindings/sound/mt6358.txt b/Documentation/devicetree/bindings/sound/mt6358.txt
deleted file mode 100644
index fbe9e55c68f5..000000000000
--- a/Documentation/devicetree/bindings/sound/mt6358.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-Mediatek MT6358 Audio Codec
-
-The communication between MT6358 and SoC is through Mediatek PMIC wrapper.
-For more detail, please visit Mediatek PMIC wrapper documentation.
-
-Must be a child node of PMIC wrapper.
-
-Required properties:
-
-- compatible - "string" - One of:
-    "mediatek,mt6358-sound"
-    "mediatek,mt6366-sound"
-- Avdd-supply : power source of AVDD
-
-Optional properties:
-- mediatek,dmic-mode : Indicates how many data pins are used to transmit two
-	channels of PDM signal. 0 means two wires, 1 means one wire. Default
-	value is 0.
-
-Example:
-
-mt6358_snd {
-	compatible = "mediatek,mt6358-sound";
-	Avdd-supply = <&mt6358_vaud28_reg>;
-	mediatek,dmic-mode = <0>;
-};
-- 
2.45.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ