Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2573355lqb; Tue, 28 May 2024 04:25:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXAKp2i3nM701I1V0wspaTm1RS8DCSGbm2F9UpL6ns/JWuhFbiUrPbSSuBTRZviLReJnTkZm3Xx0eYXRCHYeG/GBtzmfdlXP+ilDw3D2g== X-Google-Smtp-Source: AGHT+IEfcAlEGr0vk5LVWABM4Qr0IWJrFjQ82N5Oq7lnFiQqxVHnk1rPbQlZFZ7lrPOjhbEYmEdy X-Received: by 2002:a25:bccf:0:b0:de5:5cfa:a2f8 with SMTP id 3f1490d57ef6-df772254fc4mr12293132276.53.1716895544449; Tue, 28 May 2024 04:25:44 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6ac0707e57bsi98564866d6.168.2024.05.28.04.25.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 04:25:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-192166-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=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=mrt9Jqfg; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-192166-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192166-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 203321C22069 for ; Tue, 28 May 2024 11:25:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5AD0916C6A5; Tue, 28 May 2024 11:25:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mrt9Jqfg" 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 48577154BF8; Tue, 28 May 2024 11:25:34 +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=1716895535; cv=none; b=tKETxbRsIRxI5AMKgXe02KSgLbG34Z39o8PtmEr3nEYup5oNJFt4mvP60ByDIK7I0TzRaQ1QYiAfqXFAq8Vdsca+ngfoAFeVgGUi8IHgims0h67/wTKtGC0jKoOR7oqfd9an5bCyHCpADanMK0wkv3gHSI3emZwmUMRgjuO9wEI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716895535; c=relaxed/simple; bh=gsDhHQPhPdJMNLAa9ePXh93E8U1qSZ4GT/kAk0dEkH0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Oy9lrZaZTeb/Z38wSF6ET6ODLUzXk0ipuaL8AhaFVeu/ilUXreMKTKfWhpSyzYK1rU+ATzlgVyte0GyTnX0hHmL+KU4DUI/+DkPSYzWNtkXywkX2gnLITETkNipiZ9n8p4fsevye0q5FXisuoEUdbOHlgR2EcJ+ZlXtrSedUszc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mrt9Jqfg; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B000CC32781; Tue, 28 May 2024 11:25:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716895534; bh=gsDhHQPhPdJMNLAa9ePXh93E8U1qSZ4GT/kAk0dEkH0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=mrt9JqfgKwnMrOfzHtnOz+xHVeYPK8csKQ9rpl9/wIFIvG4Ef4lohFY9rKnH4osUd 7DjDoF7UAvpLJZ5VdG1ewqw+y1GsJtuDKFWQ9ykfQFPbGox1F/T8YUmFhcGqN6lXLR fFc4UlBJyohNJcPHnS51Tov51TRdUEFZQwd4inhaAotbmyf9wiED9ulRX5qCI1lSSy ME6DIfjTCijWyJpWk1R5Y/EbQtNuvcDpG6TtZ8nofpYnSePdSBmjArPvEiBNYVUJUF KZwq00VgheDP/4ZoJsXlgPL8MAdOjSSYxjYHRKr2USKAtpQWgrmbIUSDjas2IxomL2 t0EuMZVJOXVVw== Message-ID: Date: Tue, 28 May 2024 13:25:29 +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 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 References: <20240528065756.1962482-1-andreas@kemnade.info> <20240528131622.4b4f8d03@aktux> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeY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vXVFBYIGmpyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+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: <20240528131622.4b4f8d03@aktux> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 28/05/2024 13:16, Andreas Kemnade wrote: > 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? Eh? That's a watchdog, not regulator. Why do you add ref to regulator? .. >>> + >>> + 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"; > }; > Why would node name matter if you have compatible? The entire point of compatibles is to not to rely on node names. Best regards, Krzysztof