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-next>] [day] [month] [year] [list]
Date:   Mon,  9 May 2022 16:58:47 -0400
From:   Nícolas F. R. A. Prado 
        <nfraprado@...labora.com>
To:     Mark Brown <broonie@...nel.org>
Cc:     kernel@...labora.com,
        AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>,
        Nícolas F. R. A. Prado 
        <nfraprado@...labora.com>, Jiaxin Yu <jiaxin.yu@...iatek.com>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Rob Herring <robh+dt@...nel.org>,
        Shane Chien <shane.chien@...iatek.com>,
        alsa-devel@...a-project.org, devicetree@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-mediatek@...ts.infradead.org
Subject: [PATCH v2] ASoC: dt-bindings: mediatek: mt8192: Add i2s-share properties

The Mediatek AFE PCM controller for MT8192 allows two I2S interfaces to
share the same clock and act as a single interface with both input and
output. Add patterns for these properties in the dt-binding. The
property is split into two patterns in order to allow all valid
interface pairings.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@...labora.com>

---
The series from v1 of this patch was merged although some changes were
still needed in this patch, so the v1 of this patch was reverted [1] and
this standalone commit addresses the feedback from v1 and readds the
property.

[1] https://lore.kernel.org/all/20220509185625.580811-1-nfraprado@collabora.com

v1: https://lore.kernel.org/all/20220429203039.2207848-2-nfraprado@collabora.com/

Changes in v2:
- Added "mediatek," prefix to property
- Rewrote and added more information to property description
- Split into two patterns to validate that output-input pairings are
  done

 .../bindings/sound/mt8192-afe-pcm.yaml           | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml b/Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml
index 7a25bc9b8060..2abf43c6c2c3 100644
--- a/Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml
+++ b/Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml
@@ -54,6 +54,22 @@ properties:
       - const: aud_infra_clk
       - const: aud_infra_26m_clk
 
+patternProperties:
+  "^mediatek,i2s[13579]-share$":
+    description:
+      Each I2S interface has a single data line, input if its index is even or
+      output if the index is odd. An input and an output I2S interface can be
+      used together as if they were a single I2S interface with both input and
+      output data lines by sharing the same clock. This property represents this
+      pairing. The value should be the name of the interface whose clock is
+      used, and the property name the other interface that depends on this
+      clock.
+    pattern: "^I2S[0268]$"
+
+  "^mediatek,i2s[0268]-share$":
+    description: Same as above.
+    pattern: "^I2S[13579]$"
+
 required:
   - compatible
   - interrupts
-- 
2.36.0

Powered by blists - more mailing lists