From: Rob Herring <robh@kernel.org>
To: Andreas Kemnade <andreas@kemnade.info>
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
Date: Mon, 18 Mar 2024 10:07:50 -0500 [thread overview]
Message-ID: <20240318150750.GA4000895-robh@kernel.org> (raw)
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 <andreas@kemnade.info>
> ---
> 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:
prev parent reply other threads:[~2024-03-18 15:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-18 12:40 [PATCH] dt-bindings: mfd: twl: Convert trivial subdevices to json-schema Andreas Kemnade
2024-03-18 15:07 ` Rob Herring [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240318150750.GA4000895-robh@kernel.org \
--to=robh@kernel.org \
--cc=alexandre.belloni@bootlin.com \
--cc=andreas@kemnade.info \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lee@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=sre@kernel.org \
--cc=wim@linux-watchdog.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.