From nobody Mon Feb 9 12:14:41 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96317C7EE43 for ; Mon, 12 Jun 2023 09:34:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235300AbjFLJep (ORCPT ); Mon, 12 Jun 2023 05:34:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231716AbjFLJeJ (ORCPT ); Mon, 12 Jun 2023 05:34:09 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1224D559F for ; Mon, 12 Jun 2023 02:26:16 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-977e0fbd742so602630066b.2 for ; Mon, 12 Jun 2023 02:26:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686561974; x=1689153974; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=pZgj9wvv613Msqi5j0pNGHar4gpn1QPcjVJUf+RkefE=; b=i2TCaqhZmtxqKa2FTr8J4p+zAFI/+lVqsWQ5y7bdE6iNVyw+L98nByQq/SFsTHNxKZ hZLWCXh1+WWkSdGx67v8v58MUcGnJEtmW5f4QTZ4Hcej2Y226Aim935GXxaTT+5CEObh i8G17mDBpJWZGh/CtQBuFeznNW0GzNd8YCCmYnWsx0n5LZwXpAMZnfIIXSFlOxXt4yFc trstfV5qnwQU4B16XRPfFhq8tsUjmF6lHyFA3pnjFmByIqhdmx3qU6Q0CGf5sn4wBovU I1TSwjQm027D5TUoiQwmvCRjLYj0bDkAyAYyrkqfufQRUuv5i/M+PcmpvCNlYAbHNM41 Lmug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686561974; x=1689153974; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pZgj9wvv613Msqi5j0pNGHar4gpn1QPcjVJUf+RkefE=; b=S1VTkas24E5QLSdV/IucHc7zuk4pEE9UXxAm6J79CrP3nHmRWjmZ2DOmPx1d1hrZsW JhFxEflJoycKiivsBoKqWbhF51miBS2Q27BZcFoQ5TOsVPu27hlTFU+040JzcbW3O1oN dBtaG4IvjOIhSgtzzsU8i7yTqVuLOb9RVsLrX003bnk99h8sPB74oET6t/S1e/WSPBSi 4IxWshMVPdQbk/YWFNCid+iAVCtyEOQYzodrfcei//V5gdS7q7d8Op02syE1Vt1ya6PT 58GpgKVgcVyU0N8mrzTXhGjADb0U9EBqXYEipqsFzNEycQk/H346Qfu6oyM7Z/oss0It ghpw== X-Gm-Message-State: AC+VfDzQse/NSCLsZIsT3/AQ/qD5yJkVOfyHNnJ0dOTeNGJ+aMOsb4al Sqi1M+JXd1bmmeCiyHWG+DDVLg== X-Google-Smtp-Source: ACHHUZ5/TSH+NnE5zaLXzI48jDVBI9q7FBbcwiHpWan/hFHxb2/LmYxEPMrVPOY5GOABNato6EZyNQ== X-Received: by 2002:a17:907:94ce:b0:973:dbcd:52d4 with SMTP id dn14-20020a17090794ce00b00973dbcd52d4mr8177843ejc.37.1686561974430; Mon, 12 Jun 2023 02:26:14 -0700 (PDT) Received: from krzk-bin.. ([178.197.219.26]) by smtp.gmail.com with ESMTPSA id kt5-20020a170906aac500b00978868cb24csm5035900ejb.144.2023.06.12.02.26.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 02:26:14 -0700 (PDT) From: Krzysztof Kozlowski To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH] dt-bindings: example-schema: don't use enum as fallback, explain clock-names Date: Mon, 12 Jun 2023 11:26:11 +0200 Message-Id: <20230612092611.12385-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Compatibles with multiple entries should have usually only one fallback compatible thus enum followed by enum is not a common case. Use 'const' as second compatible to show the recommended approach. Explain also when clock-names are not really necessary. Signed-off-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/example-schema.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/example-schema.yaml b/Docume= ntation/devicetree/bindings/example-schema.yaml index f4eec4c42fb3..a41f9b9a196b 100644 --- a/Documentation/devicetree/bindings/example-schema.yaml +++ b/Documentation/devicetree/bindings/example-schema.yaml @@ -52,8 +52,7 @@ properties: - vendor,soc4-ip - vendor,soc3-ip - vendor,soc2-ip - - enum: - - vendor,soc1-ip + - const: vendor,soc1-ip # additionalItems being false is implied # minItems/maxItems equal to 2 is implied - items: @@ -85,6 +84,9 @@ properties: discouraged. =20 clock-names: + # For single-entry lists in clocks, resets etc., the xxx-names often d= o not + # bring any value, especially if they copy the IP block name. In such= case + # just skip the xxx-names. items: - const: bus =20 --=20 2.34.1