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]
Message-Id: <20260130-k3-pinctrl-io-drv-fix-v1-1-077aec3ba7ae@kernel.org>
Date: Fri, 30 Jan 2026 19:22:15 +0800
From: Yixun Lan <dlan@...nel.org>
To: Linus Walleij <linusw@...nel.org>, Rob Herring <robh@...nel.org>, 
 Krzysztof Kozlowski <krzk+dt@...nel.org>, 
 Conor Dooley <conor+dt@...nel.org>, Paul Walmsley <pjw@...nel.org>, 
 Palmer Dabbelt <palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>, 
 Alexandre Ghiti <alex@...ti.fr>
Cc: linux-gpio@...r.kernel.org, devicetree@...r.kernel.org, 
 linux-riscv@...ts.infradead.org, spacemit@...ts.linux.dev, 
 linux-kernel@...r.kernel.org, Yixun Lan <dlan@...nel.org>
Subject: [PATCH] dt-bindings: pinctrl: spacemit: fix drive-strength check
 warning

The problem is that one value from drive-strength may match to more than
two different enum groups which lead to DT complaint, switch to use 'anyOf'
to fix this kind warning.

Fixes: c3efac0592f8 ("dt-bindings: pinctrl: spacemit: convert drive strength to schema format")
Signed-off-by: Yixun Lan <dlan@...nel.org>
---
Doing DT check with command: make dtbs_check W=1, will get this kind
of warning message:

arch/riscv/boot/dts/spacemit/k1-musepi-pro.dtb: pinctrl@...1e000 (spacemit,k1-pinctrl): gmac0-cfg:gmac0-pins:drive-strength: 21 is valid under each of {'enum': [2, 4, 6, 7, 9, 11, 13, 14, 21, 23, 25, 26, 28, 30, 31, 33]}, {'enum': [11, 21, 32, 42]}

Instead of using more complicated minimum and maximum value of property
with constrains of compatibles, we decide to use 'anyOf' to fix this
warning.
---
 Documentation/devicetree/bindings/pinctrl/spacemit,k1-pinctrl.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/spacemit,k1-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/spacemit,k1-pinctrl.yaml
index f009fed87e6b..5194fa92fe93 100644
--- a/Documentation/devicetree/bindings/pinctrl/spacemit,k1-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/spacemit,k1-pinctrl.yaml
@@ -76,7 +76,7 @@ patternProperties:
           drive-strength:
             description:
               typical current (in mA) when the output at high level.
-            oneOf:
+            anyOf:
               - enum: [ 11, 21, 32, 42 ]
                 description: For K1 SoC, 1.8V voltage output
 

---
base-commit: 3fcdb264b61a5bb0eb3fb7272717468aa376a74c
change-id: 20260130-k3-pinctrl-io-drv-fix-5b11752dae1f

Best regards,
-- 
Yixun Lan <dlan@...nel.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ