Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2536461lqb; Tue, 28 May 2024 03:05:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUiPUxisGidqJa/mpeLaoi+QW6lJCkluvGz7+cVWClfHXkAIBcxhK3w9QZABR3/usRuJnovVy0S+dkiCDhTmBl8aKXaZrrW21kkU3mHAw== X-Google-Smtp-Source: AGHT+IFIO5PyH9LDZpl/3iPAvh/MIKU5jtIyHi/REd5Uxzp9bDRXn5DQkkO/BVRhTs215cg6urEd X-Received: by 2002:a81:4f13:0:b0:61b:c92:ece5 with SMTP id 00721157ae682-62a08e04996mr127233687b3.20.1716890734279; Tue, 28 May 2024 03:05:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716890734; cv=pass; d=google.com; s=arc-20160816; b=SDj2Uux6CpClAtfFT4pg5fFmpyPdLac2EcW2bqny6RgD9zYj37dnj46h67DwzwntBH amrHyHoWqJO/KgPOcKqeJs8EnC07D3ZCWgKKnjhLgiFHHb7YPqw/wnk1dewPa5sKKJGD nFU8aqAu2+fqtRuxxHRtzE655hIGpD5ESlpVIIol4FhZydsOYG8VdK9+lXsFXcit64CH z/4lhSErelz/ULnu/ljdr4NETxnAeFKsbWaAV3d/WdPAjPFqKvPhJPIDGqy+/JOfQrNo UMwtpYxi8WrcFoAHG6MLTVrBTGkmebKttMj/aVNlWl6k+aTZVJoNYjjAUxzPfUwGQxnG /r5g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=nr8bkDZ2bXahpm1tOfaeFtEQTX7LDVurBmrYXpniq5w=; fh=3QQANCb+vpGS4d+oBw753yKaEAnf4mIaSIm96HLzdHU=; b=AfsiVoG11ja2bXffmqMV7z+Xt+SU4e6Db1n9CT5cDRiIh3s5zVvrSv5M2TFq13wh8N wIdfD3jwvrfP7l4w3gqzjb61RiIiRAAclPd17tM7rMuU5HMjWJGtbyGfko78zWQu6589 DvO0ui3360HZFNXZfbrirReGusiU2fHf+fyb/NT/PixMWx7aR+ZlkhbmBaPmeSDAXOHv BIhN4fVUxGHW/S1rfYBPNnDwX5d/AEroUxjrv0a2YM0YwVj82IvfUCym/oKOoWMn9xkh LJ06+kMQbSrgtzLuXh1sr+WQP0MrL5iVmZkGmZpE7TzltZSuBIC5G32SMHhItzh/7slJ RzDw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=scIku3bU; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-192075-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192075-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 a1e0cc1a2514c-804cc01feefsi1998890241.178.2024.05.28.03.05.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 03:05:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-192075-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=pass header.i=@kernel.org header.s=k20201202 header.b=scIku3bU; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-192075-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192075-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 335F31C24819 for ; Tue, 28 May 2024 10:04:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8467A1667D3; Tue, 28 May 2024 10:04:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="scIku3bU" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 671D116ABFA; Tue, 28 May 2024 10:04:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716890668; cv=none; b=CIa7K6l9qo/eU6Juak42oitpALM4FkgyqQaRMj+ISAWx5xp5D9rIcZ4A6nb8mz9iSYZ9fGMMiap4/c+MtzZCMeBSR2qFCjpqQgy6mDOt8k/troLHHpRwypDv2GXnDRzWxdyM3G4d/46eGTLAeu1Z5Ou9TczsI++e85/UyWGOId4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716890668; c=relaxed/simple; bh=nAx+1qaWFdCKWniYdZ782hbeVEaZL+pL+CKrnVgD2rU=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=bmE0tVEmpePVHXeaLnOEvU6epE4f2QWFFGebV8OUrzBXplZc1+IxQuIc8VunihdcGup2T5Z08wZAOdpWIa0CRWrRf9ZcI1csTUqCxC8VqE+OcbR2mQXPz9VO0hYCO1QY3IrgggjbkJ5TISnozyoU/AFt/PHnFwFk/3ZbMI7qJ38= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=scIku3bU; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97219C3277B; Tue, 28 May 2024 10:04:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716890668; bh=nAx+1qaWFdCKWniYdZ782hbeVEaZL+pL+CKrnVgD2rU=; h=Date:Subject:To:References:From:In-Reply-To:From; b=scIku3bUrnpZ01/wcNGVF4A54/zt3VksG/RMhU9bTDnbgm/sBc1E0CNmurkc0rYkw 5mXVMKmdcVFb1RvS0NiYIHXjL+SSEWXWyU4BDwBCEMbLkkoDZO7MD+ugT6eVKplc6S G/7iAKR6xgZHcQOf8Wh7H1S5mC7nHYm0ZH2aFJkQ7h2PflFdju2RuD8Q4kUudJU74P FqZ73FXC0htRYVU74mSOvAfUSiFymE7IuRD+bRvJ1eh7e/zkEA6DV5lJQMu2W7B6JD CZvJYzw1JjUkntOfBfu3hUH8d+Ltp4mTvVn9SzTiI5gxFKTcu8+KH5TPgBoeh5JPl2 1I39eBtRE/RlA== Message-ID: Date: Tue, 28 May 2024 12:04:22 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH] dt-bindings: regulator: twl-regulator: convert to yaml To: Andreas Kemnade , 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 References: <20240528065756.1962482-1-andreas@kemnade.info> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEA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NaFahT0lRPjYtrTa1v3tem/ JoFzZ4B0p27K+qQCF2R96hVvuEyjzBmdq2esyE6zIqftdo4MOJho8uctOiWbwNNq2U9pPWmu 4vXVFBYIGmpyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB YpsFAmA872oFCRRflLYACgkQG5NDfTtBYpvScw/9GrqBrVLuJoJ52qBBKUBDo4E+5fU1bjt0 Gv0nh/hNJuecuRY6aemU6HOPNc2t8QHMSvwbSF+Vp9ZkOvrM36yUOufctoqON+wXrliEY0J4 ksR89ZILRRAold9Mh0YDqEJc1HmuxYLJ7lnbLYH1oui8bLbMBM8S2Uo9RKqV2GROLi44enVt vdrDvo+CxKj2K+d4cleCNiz5qbTxPUW/cgkwG0lJc4I4sso7l4XMDKn95c7JtNsuzqKvhEVS oic5by3fbUnuI0cemeizF4QdtX2uQxrP7RwHFBd+YUia7zCcz0//rv6FZmAxWZGy5arNl6Vm lQqNo7/Poh8WWfRS+xegBxc6hBXahpyUKphAKYkah+m+I0QToCfnGKnPqyYIMDEHCS/RfqA5 t8F+O56+oyLBAeWX7XcmyM6TGeVfb+OZVMJnZzK0s2VYAuI0Rl87FBFYgULdgqKV7R7WHzwD uZwJCLykjad45hsWcOGk3OcaAGQS6NDlfhM6O9aYNwGL6tGt/6BkRikNOs7VDEa4/HlbaSJo 7FgndGw1kWmkeL6oQh7wBvYll2buKod4qYntmNKEicoHGU+x91Gcan8mCoqhJkbqrL7+nXG2 5Q/GS5M9RFWS+nYyJh+c3OcfKqVcZQNANItt7+ULzdNJuhvTRRdC3g9hmCEuNSr+CLMdnRBY fv0= In-Reply-To: <20240528065756.1962482-1-andreas@kemnade.info> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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. > - 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 > + > + 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. Best regards, Krzysztof