Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp296361lqt; Mon, 18 Mar 2024 08:08:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVHV2HMJqjxb9IfoRpamwFrRaLlG5VhJ8cY3Zfg52WWkfx/0KlqOiYcQeWSOZYe0N4AnnZ22ULGQ6l54LcvaWznjuBnlWWGkgydXN+NKA== X-Google-Smtp-Source: AGHT+IG38IVF7WW7fjwc+IK9X8CKXhE6xaShiyX/iF45I3T/kpfgBlD2+toXu69RWlj5h+WbQlNY X-Received: by 2002:a19:ee14:0:b0:513:39a0:1fec with SMTP id g20-20020a19ee14000000b0051339a01fecmr7474470lfb.66.1710774496890; Mon, 18 Mar 2024 08:08:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710774496; cv=pass; d=google.com; s=arc-20160816; b=iQCGq/k1IGxlvFIE+y1sb3EsN5TNBc7Z+ZEOJmXg9PYseQ3iYewfB0Bjf5EmvxWiU1 /N3n0hKYBUjRnAIjSFa5bCT4v0Vn8YoMFkHBjBPcopBzaE7hjRPhushldunt8MgL43nM X6a7mM+3AepkQaTVfX4bfirYwpsSp0kIh75eT8uVNkvztfaMW1Z4URUNfR/yGTh9GqkM WZ1F+8bX6PcxbdhRkPMlDpT30BU4/C3WSBAMyuJhqNGDOXNjMIs3vgKTXaOeMUJqjQ55 4wb2OqCIbDH/RAWu/Sp7e6RBfFwtQabVQO6si0DyZeDmUfGE2vAHb32KcX8w/lPBxDGn R0Sw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=dr2osxQ2Ap5fKxS0V3UXzn8t6/T5jZnBHFtmov4OdlE=; fh=S3u3hhAI7fnKqN7oAcCyX6ZW8r2ee9b9pWOq1XH7izQ=; b=FCvbpDVB2h7sZWNoGTbK2jC5a1tNAZWYIze8ZstddFy/oeH6P+JW5VF8G+AYlrzghm 12NNg5ex4eDU1nW7IUDMAoTCtw6hEdf9HZFnAEv8WipGtge9yrnzES0swnAO0i+fxVzy UHxwz+RnSno8W7nZwLLYH70KPOIqtZzhOal7dWj+CLHw6h6spYFPndFlT5LMbQdd7WoV Ltxi9QipsnSs6EiVNVdSqk/cwOcYYDDlCDiwTGlLvsD3nV4ZAg0xVQBdUSUIKgZnM1cw h+8A1BiEokS/scbD4UAwhKnN5rwAzYJf2hCaAdxlog1WVqcF2Y9q69/CJgGeggIZVPUE JsQQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KTvddIHQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-106268-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106268-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id jr4-20020a170906a98400b00a46d5915561si22203ejb.550.2024.03.18.08.08.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 08:08:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-106268-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KTvddIHQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-106268-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106268-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 71C2E1F21F44 for ; Mon, 18 Mar 2024 15:08:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DDF044F618; Mon, 18 Mar 2024 15:07:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KTvddIHQ" 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 CDD334F5F9; Mon, 18 Mar 2024 15:07:52 +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=1710774473; cv=none; b=Pz9tn2KSYxfSPUAW/gFvOn9so4mxsOZJ2n3uqRf7ee2PlT9fYyIGLUNwmdNOAdLFWECNbCoQLPf2U9DVER+pozkOE4ipkbgsheQ1rDmTq2L14jqtWR5YMG0uAvT/uOQ+PRuTwLzbUdysajyTUwmvdVSojGcr9/Ajh1jK055BmMI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710774473; c=relaxed/simple; bh=b6jIKK6IF/UBDD/2p5Ab01jRH32PNiTjuD4LIO3HBnE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gWaC0uhj8QpAZbQlV3z0zBHLuplni4kNbb1+7EhkCgYfRJtMGICHNhV7wyyX30rbI5JiTcaj4BR6NQdLjKAM+0mlbx1sDOUt7G8x7FFBK3hAdo8X4g1IBOmYviPOXHgp1a+9GHhIpSG8CEsRBy4Pe2V7GKOZRDMkZQ1lZFZMM/Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KTvddIHQ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17EA8C433C7; Mon, 18 Mar 2024 15:07:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710774472; bh=b6jIKK6IF/UBDD/2p5Ab01jRH32PNiTjuD4LIO3HBnE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KTvddIHQty8QyZBWziR57LP012BCa/gAgEr/+x88Fh2GQF82FhOy/XekROmZJHr3W PJGeujPI6eYqlFV1ofbTXVxidIrpdsWn+7t+lokdweWXiA1OpEhh7H6CuCoWJTy1C+ dqNTZD1kpTHWkYwy9kyQ5+4FhVywqsLINg+1NZZJaR1uNLl8UkmZ9Wpl2I6UTvF/DX K9/+6WUfA+wrsfihMeAg2tig/6lCvHoG8KU4VzT1niKvBwjWKB23dQRJwK9gtrvvEz 4rOIN2O/R6yWIY+vdA19W+2zlReCbRo89Jb+0z099wNYTqrYzBQ4r1T0f70BoXi6vw GsUshDY4pTRhw== Date: Mon, 18 Mar 2024 10:07:50 -0500 From: Rob Herring To: Andreas Kemnade Cc: dmitry.torokhov@gmail.com, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, lee@kernel.org, alexandre.belloni@bootlin.com, wim@linux-watchdog.org, linux@roeck-us.net, linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org, linux-watchdog@vger.kernel.org, linux-omap@vger.kernel.org, sre@kernel.org Subject: Re: [PATCH] dt-bindings: mfd: twl: Convert trivial subdevices to json-schema Message-ID: <20240318150750.GA4000895-robh@kernel.org> References: <20240318124051.4166253-1-andreas@kemnade.info> 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-Disposition: inline In-Reply-To: <20240318124051.4166253-1-andreas@kemnade.info> On Mon, Mar 18, 2024 at 01:40:50PM +0100, Andreas Kemnade wrote: > Convert subdevices with just an interrupt and compatbile to > json-schema and wire up already converted subdevices. > RTC is available in all variants, so allow it unconditionally > GPADC binding for TWL603X uses two different compatibles, so > specify just the compatible and not include it. > > Signed-off-by: Andreas Kemnade > --- > Well, my name is in that yaml file, so I should take care of my sheep, > in case a step-by-step approach is acceptable this is at least a > checkpoint for me that I understand multi file binding mechanics > properly. > > .../bindings/input/twl4030-pwrbutton.txt | 21 ------ > .../devicetree/bindings/mfd/ti,twl.yaml | 68 +++++++++++++++++++ > .../devicetree/bindings/rtc/twl-rtc.txt | 11 --- > .../bindings/watchdog/twl4030-wdt.txt | 10 --- > 4 files changed, 68 insertions(+), 42 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/input/twl4030-pwrbutton.txt > delete mode 100644 Documentation/devicetree/bindings/rtc/twl-rtc.txt > delete mode 100644 Documentation/devicetree/bindings/watchdog/twl4030-wdt.txt > > diff --git a/Documentation/devicetree/bindings/input/twl4030-pwrbutton.txt b/Documentation/devicetree/bindings/input/twl4030-pwrbutton.txt > deleted file mode 100644 > index 6c201a2ba8acf..0000000000000 > --- a/Documentation/devicetree/bindings/input/twl4030-pwrbutton.txt > +++ /dev/null > @@ -1,21 +0,0 @@ > -Texas Instruments TWL family (twl4030) pwrbutton module > - > -This module is part of the TWL4030. For more details about the whole > -chip see Documentation/devicetree/bindings/mfd/ti,twl.yaml. > - > -This module provides a simple power button event via an Interrupt. > - > -Required properties: > -- compatible: should be one of the following > - - "ti,twl4030-pwrbutton": For controllers compatible with twl4030 > -- interrupts: should be one of the following > - - <8>: For controllers compatible with twl4030 > - > -Example: > - > -&twl { > - twl_pwrbutton: pwrbutton { > - compatible = "ti,twl4030-pwrbutton"; > - interrupts = <8>; > - }; > -}; > diff --git a/Documentation/devicetree/bindings/mfd/ti,twl.yaml b/Documentation/devicetree/bindings/mfd/ti,twl.yaml > index 52ed228fb1e7e..03d725d5294db 100644 > --- a/Documentation/devicetree/bindings/mfd/ti,twl.yaml > +++ b/Documentation/devicetree/bindings/mfd/ti,twl.yaml > @@ -15,6 +15,65 @@ description: | > USB transceiver or Audio amplifier. > These chips are connected to an i2c bus. > > +allOf: > + - if: > + properties: > + compatible: > + contains: > + const: ti,twl4030 > + then: > + properties: > + madc: > + type: object > + $ref: ../iio/adc/ti,twl4030-madc.yaml Use 'absolute' paths: /schemas/iio/... > + Drop blank line > + unevaluatedProperties: false blank line between DT properties > + bci: > + type: object > + $ref: ../power/supply/twl4030-charger.yaml > + > + unevaluatedProperties: false > + pwrbutton: > + type: object > + properties: > + compatible: > + const: ti,twl4030-pwrbutton > + interrupts: > + const: 8 As 'interrupts' is a matrix, this needs to be: interrupts: items: - items: - const: 8 > + > + additionalProperties: false In the indented cases, it is preferred to put this before 'properties'. > + watchdog: > + type: object > + properties: > + compatible: > + const: ti,twl4030-wdt > + > + additionalProperties: false > + - if: > + properties: > + compatible: > + contains: > + const: ti,twl6030 > + then: > + properties: > + gpadc: > + type: object > + properties: > + compatible: > + const: ti,twl6030-gpadc > + - if: > + properties: > + compatible: > + contains: > + const: ti,twl6032 > + then: > + properties: > + gpadc: > + type: object > + properties: > + compatible: > + const: ti,twl6032-gpadc > + > properties: > compatible: > description: > @@ -42,6 +101,15 @@ properties: > "#clock-cells": > const: 1 > > + rtc: > + type: object > + properties: > + compatible: > + const: ti,twl4030-rtc > + interrupts: > + maxItems: 1 > + additionalProperties: false > + > additionalProperties: false > > required: