Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2568570lqb; Tue, 28 May 2024 04:16:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVApHNaBgDu95YGTuGfB9RvrawSAO+4jnUhRcVzJBKW9zpgAS2w15pm/B1kuSegHWnNu3e4hTuBt0ZYokmfmCrS+DtsmjUCeQDb0DXcdQ== X-Google-Smtp-Source: AGHT+IGJ36aKPplTq32Zp5TQlivPgS6k40zknjf+ERhoqTTF6GgqtPDTPQDfu/B2ewf2JlR0M0VQ X-Received: by 2002:a05:6808:19a8:b0:3c9:c2bc:6937 with SMTP id 5614622812f47-3d1a6019f08mr14898658b6e.5.1716894998590; Tue, 28 May 2024 04:16:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716894998; cv=pass; d=google.com; s=arc-20160816; b=as9YBV6sBuL718yzFJzO9Zwn5WlOQR9IIwzf5bswFYmPk9bRD66AKzhENDRx1bJiZZ 5waTl0//LwLRA9f7zMOzsL2mKCK4fVjGfTj+CeYhsWb4uk0DzWwwZ2PC2dX9V7O3gDoz V0TQTmD97Nh0Rpz1s6inL0sf879Sb4bogQD5nyMdSH4pz9j6yu+53YYsVolK4V9eTrZe 76eAjhrmqhCoZ72QRdYg09Qcod9jXfEzF6Uo/t6jLiRQCM6Y1SsDXjhRROq9zSOExH/q aJ+BpLTY5d3d1c7DqJkDK+99Q/DGYuqh0pEhmilWZsn3dUIJvvijVzAiDCToliZGuEBp n/oA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=JrfHFnuvkrvmQFg0pUCXychWxb4GoBRV6FZ978Cui2Y=; fh=a5da4VWQXpWuv64QEOC/j6ZxaIv5kd2enJDmIPOgCj8=; b=H+m3srQhSNxmkRnT93K9T1ZMlBfcIPPEnS63BWGm4yrWKT8qPCiU2CCLF9YZWhtjPj 8lsrDtq6jN8M5ixTUdX3P/+OvjT4WW7xrYFwpmco7tgTvfbF95ZTOKJ6cUVOj+We4Lvr aSkcVeU7jhKtM9WekAf9LyUZZgbdLKsUY5noZHRTO8eRnAghMqTcPuZ03LBlcQt2trr/ tszbcxspsvn0CfYEvmapAo5DuZT3zjiowWx/B7Ys9362hBZo7l9v6UcJkERLJ69ZYsiK EsopwI733144wstoZ8EGmbBxUn4GJSS+adQi0IyQdAJwjmdaadWAWHdsr68Gh7RDufA4 CNcQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@kemnade.info header.s=20220719 header.b=VtSWMyWz; arc=pass (i=1 spf=pass spfdomain=kemnade.info dkim=pass dkdomain=kemnade.info); spf=pass (google.com: domain of linux-kernel+bounces-192158-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192158-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6ac162e2a4bsi101546946d6.602.2024.05.28.04.16.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 04:16:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-192158-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=fail header.i=@kemnade.info header.s=20220719 header.b=VtSWMyWz; arc=pass (i=1 spf=pass spfdomain=kemnade.info dkim=pass dkdomain=kemnade.info); spf=pass (google.com: domain of linux-kernel+bounces-192158-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192158-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 41EB31C21F22 for ; Tue, 28 May 2024 11:16:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A4C2916C69D; Tue, 28 May 2024 11:16:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kemnade.info header.i=@kemnade.info header.b="VtSWMyWz" Received: from mail2.andi.de1.cc (vmd64148.contaboserver.net [161.97.139.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F09E038F9C; Tue, 28 May 2024 11:16:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=161.97.139.27 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716894989; cv=none; b=Mowim6EGLIDR7UHhmBjdnbJKQVfcHj14nfh0F9ikjBaFfd7euEeg1E+u5GNVg1UyoF8srWWLV1OECldxaMUzrt6rErLVxWKTRobu1jhAdieuTBMmbKryf6W9ahPxyarZ6EwA26sGnRcAY8R+0s/TDuBOXJtOJz8iGoZzr5jTlig= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716894989; c=relaxed/simple; bh=ddjKtq7RFYMNYFg22zslRU3jdlC10pSzFW4Bsm3Q9kc=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ndjKeIT1NMtoJI+/2eBYSKJzXLHpydVMCUUOb7C2kvSO/Jl/RtOzjS/4AmoEkC8/msBnH5+jFU0io0jHwEfzRlBXV8hqmtWU+AA4N9TiMZk0K8oBpf7NeJbXdOYDE4ncXYTkN/0Jl2FKufrhWLrjsu2pxf+IR7bXlab/UtXd27c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kemnade.info; spf=pass smtp.mailfrom=kemnade.info; dkim=pass (2048-bit key) header.d=kemnade.info header.i=@kemnade.info header.b=VtSWMyWz; arc=none smtp.client-ip=161.97.139.27 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kemnade.info Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kemnade.info Received: from mail.andi.de1.cc ([2a02:c205:3004:2154::1]) by mail2.andi.de1.cc with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sBuoa-00873f-0r; Tue, 28 May 2024 13:16:25 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20220719; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=JrfHFnuvkrvmQFg0pUCXychWxb4GoBRV6FZ978Cui2Y=; b=VtSWMyWzUVFTf8Bzaqej9wUJjV ZA9BIHF1lJ8+8C/S6Np8/OO2UUvWdqHSd9QVbOlM55ralWqTlJjgkVxt8vOx5SW9P9w263DkGUGtS CVo6kOzZiH8xVfoE6t7tmbBA/zYMBsCRxevy7V+FqHIusHt2M/ju7rVvdDg7PR8elGoB9vKiDk0Fi pZuvRSHNFzb2Ux79UIdFnZW3DXBfxWdtLy/dGM1aamSZZnCZjGeEtkG98CJafdpKU2Iiyp+DZWc0Q 5CjqvaTPCBlwJxuL1e5d0VDn0Rpou97ERJswXyYws+06taKJyhigm+08m6Kp9SzW8UriiAkUPWKFb W8G3+eGA==; Received: from p200300c20737c2001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:c2:737:c200:1a3d:a2ff:febf:d33a] helo=aktux) by mail.andi.de1.cc with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sBuoZ-001tdQ-20; Tue, 28 May 2024 13:16:24 +0200 Date: Tue, 28 May 2024 13:16:22 +0200 From: Andreas Kemnade To: Krzysztof Kozlowski Cc: lee@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org Subject: Re: [RFC PATCH] dt-bindings: regulator: twl-regulator: convert to yaml Message-ID: <20240528131622.4b4f8d03@aktux> In-Reply-To: References: <20240528065756.1962482-1-andreas@kemnade.info> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 28 May 2024 12:04:22 +0200 Krzysztof Kozlowski wrote: > On 28/05/2024 08:57, Andreas Kemnade wrote: > > Convert the regulator bindings to yaml files. To allow only the regulator > > compatible corresponding to the toplevel mfd compatible, split the file > > into one per device. > > > > To not need to allow any subnode name, specify clearly node names > > for all the regulators. > > > > Drop one twl5030 compatible due to no documentation on mfd side and no > > users of the twl5030. > > > > Signed-off-by: Andreas Kemnade > > --- > > Reason for being RFC: > > the integration into ti,twl.yaml seems not to work as expected > > make dt_binding_check crashes without any clear error message > > if used on the ti,twl.yaml > > > > .../devicetree/bindings/mfd/ti,twl.yaml | 4 +- > > .../regulator/ti,twl4030-regulator.yaml | 402 ++++++++++++++++++ > > .../regulator/ti,twl6030-regulator.yaml | 292 +++++++++++++ > > .../regulator/ti,twl6032-regulator.yaml | 238 +++++++++++ > > .../bindings/regulator/twl-regulator.txt | 80 ---- > > 5 files changed, 935 insertions(+), 81 deletions(-) > > create mode 100644 Documentation/devicetree/bindings/regulator/ti,twl4030-regulator.yaml > > create mode 100644 Documentation/devicetree/bindings/regulator/ti,twl6030-regulator.yaml > > create mode 100644 Documentation/devicetree/bindings/regulator/ti,twl6032-regulator.yaml > > delete mode 100644 Documentation/devicetree/bindings/regulator/twl-regulator.txt > > > > diff --git a/Documentation/devicetree/bindings/mfd/ti,twl.yaml b/Documentation/devicetree/bindings/mfd/ti,twl.yaml > > index c2357fecb56cc..4ced6e471d338 100644 > > --- a/Documentation/devicetree/bindings/mfd/ti,twl.yaml > > +++ b/Documentation/devicetree/bindings/mfd/ti,twl.yaml > > @@ -50,7 +50,7 @@ allOf: > > properties: > > compatible: > > const: ti,twl4030-wdt > > - > > + $ref: /schemas/regulator/ti,twl4030-regulator.yaml > > That's not needed, just like othehr refs below. > but how to prevent error messages like this: arch/arm/boot/dts/ti/omap/omap2430-sdp.dtb: twl@48: Unevaluated properties are not allowed ('gpio', 'keypad', 'pwm', 'pwmled', 'regulator-vaux1', 'regulator-vaux2', 'regulator-vaux3', 'regulator-vaux4', 'regulator-vdac', 'regulator-vdd1', 'regulator-vintana1', 'regulator-vintana2', 'regulator-vintdig', 'regulator-vio', 'regulator-vmmc1', 'regulator-vmmc2', 'regulator-vpll1', 'regulator-vpll2', 'regulator-vsim', 'regulator-vusb1v5', 'regulator-vusb1v8', 'regulator-vusb3v1 esp. the regulator parts without adding stuff to ti,twl.yaml? > > - if: > > properties: > > compatible: > > @@ -63,6 +63,7 @@ allOf: > > properties: > > compatible: > > const: ti,twl6030-gpadc > > + $ref: /schemas/regulator/ti,twl6030-regulator.yaml > > - if: > > properties: > > compatible: > > @@ -75,6 +76,7 @@ allOf: > > properties: > > compatible: > > const: ti,twl6032-gpadc > > + $ref: /schemas/regulator/ti,twl6032-regulator.yaml > > > > > properties: > > compatible: > > diff --git a/Documentation/devicetree/bindings/regulator/ti,twl4030-regulator.yaml b/Documentation/devicetree/bindings/regulator/ti,twl4030-regulator.yaml > > new file mode 100644 > > index 0000000000000..9623c110605ef > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/regulator/ti,twl4030-regulator.yaml > > @@ -0,0 +1,402 @@ > > +# SPDX-License-Identifier: (GPL-2.0) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/regulator/ti,twl4030-regulator.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Regulators in the TWL4030 PMIC > > + > > +maintainers: > > + - Andreas Kemnade > > + > > +properties: > > + regulator-vaux1: > > + type: object > > + $ref: regulator.yaml# > > + unevaluatedProperties: false > > + properties: > > + compatible: > > + const: "ti,twl4030-vaux1" > > No quotes > Ack. > > + > > + regulator-initial-mode: > > + items: > > + - items: > > + enum: > > + - 0x08 # Sleep mode, the nominal output voltage is maintained > > + # with low power consumption with low load current capability > > + - 0x0e # Active mode, the regulator can deliver its nominal output > > + # voltage with full-load current capability > > + > > + required: > > + - compatible > > + > > + regulator-vaux2: > > + type: object > > + $ref: regulator.yaml# > > + unevaluatedProperties: false > > + properties: > > + compatible: > > + const: "ti,twl4030-vaux2" > > + > > + regulator-initial-mode: > > + items: > > + - items: > > + enum: > > + - 0x08 # Sleep mode, the nominal output voltage is maintained > > + # with low power consumption with low load current capability > > + - 0x0e # Active mode, the regulator can deliver its nominal output > > + # voltage with full-load current capability > > These entries are the same. Just use patternProperties and enum for > compatible. > hmm, if I am using that, how do I prevent e.g. constructions like this to be valid? regulator-vaux2 { compatible = "ti,twl4030-vaux1"; }; Regards, Andreas