Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp209974lqt; Mon, 18 Mar 2024 06:03:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVBxRb2G2mepeTGYyD9NItSE859ZeTm2HP9CleK9xST59WXAugP276Of9HbxqtsI1QcuaWl11evNEcdF5qoNmX4qi78Ij2kEZjV9H1LGA== X-Google-Smtp-Source: AGHT+IHnu6pACxmxWlhziVQc83mbAOSeRHQYDMxJ/FvgDd1bdfb7YEQrxKhTpSIq+qlQU8YcAKp/ X-Received: by 2002:a05:6a20:9385:b0:1a3:6edd:afdc with SMTP id x5-20020a056a20938500b001a36eddafdcmr310994pzh.1.1710766983109; Mon, 18 Mar 2024 06:03:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710766983; cv=pass; d=google.com; s=arc-20160816; b=sABQJgbqVKI41ckJjkmJDHpuQbYaETasubqCEZuThlw0W5xgz1jsMgE0dfAB9zgAa4 oK17RVvNEiN4dVeBlHkvrt7bcLbY80YsczLg4laSNOUOSUfVulqfE14SsoKAXU8NqM2Z xewYL1tfKSW3UvR2OvuuR5pwMqHqjKCiX6uD6JbYg/1FtI1L6u/fSZrc8eNKN3lBfC8y +CGVqKbZrRTFP/T83tX7ImuGrgKLYW6HceJWfFzBS8htoa/NbfWQs+McxThhUfR2tphP JSyiJuMtD6WR8v93p88JTtKCkSxDftiuEBZdcOUMokJD+Cg+kItCzXGxW4KQkZrGmMyF L2QA== 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:message-id:date:subject:to:from :dkim-signature; bh=9sfZOx2DCTn54LYO3IjAwhuh25pOQkcCf5EGt7OZU20=; fh=Lda4+NfqeCHW81QIMlQc++dpYDDkup2OV2K1v1w3puY=; b=uXS2e/Az33WNHwhjGQ6ULQkVV2Fzbub796mpZ1Spb5DUxdixvMYHPZogsxeZ7yniWd Y7cfY5sgNqtQ3/QAZhLZInxd0uy2rtCpq9rOnx0bzi+QcCBggk6j4+2ifyNKrYyLuEoN PSnkivhugjL5T21oQhb3MB5pV+TDeZJCZbBtCeMHGROGn2J0sIRRvgb674OnULDBK8pj rjjrFs0M8a4I1yU04oq04WCmScc9WSo3c4BzHCkzqbAA5ToOQxqnhvpPhSfJrOLckVqG rSa805FajYmM+jth+6QThj4b/ltjcKcgJ9xmDiQ9lVGfxNYMZb0suTmBz/1ItH9YfW2D CqUg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@kemnade.info header.s=20220719 header.b=tNHXVlmL; arc=pass (i=1 spf=pass spfdomain=kemnade.info dkim=pass dkdomain=kemnade.info); spf=pass (google.com: domain of linux-kernel+bounces-106137-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106137-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id r26-20020aa7845a000000b006e63f027285si8919146pfn.19.2024.03.18.06.03.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 06:03:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-106137-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=fail header.i=@kemnade.info header.s=20220719 header.b=tNHXVlmL; arc=pass (i=1 spf=pass spfdomain=kemnade.info dkim=pass dkdomain=kemnade.info); spf=pass (google.com: domain of linux-kernel+bounces-106137-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106137-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 4FF82B2188E for ; Mon, 18 Mar 2024 13:02:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 509FD3A1C4; Mon, 18 Mar 2024 13:02:19 +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="tNHXVlmL" Received: from mail.andi.de1.cc (mail.andi.de1.cc [178.238.236.174]) (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 725F238FA0; Mon, 18 Mar 2024 13:02:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.238.236.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710766938; cv=none; b=qJPDcEtJiBMXrcg39ZUJaXiu91R9fmeZfu6iRc/8/t+JrkzGTaXjc3sGcgOm0O8wQ5bcQxEQ8CV3N+VGl17aebBOo7OXroeFsFg3zJ7abErI+FyUPW4g1njMn/PQi6QwpXbehnaHKeXGTOaBHyZW+HLuYT3n+9ryNI0E1W2feXk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710766938; c=relaxed/simple; bh=Xeh3Xh85wAPq6QKrTjMMaqZtUieeXwfUZQqVI4BpdR0=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=RZNgZyUCEQqnwxfSnIcSGjtD7QWVEKJFY36rlt8fx3r1zEn8sm2CvlEHEeO3MM7o36dyFniJ88rTyc50HynWPjWybY3k6WDed7h5SVkvM7OHARrB3ledmYUpjGrB92WmOQc1Du9K8JtzOuPA2s5/0HKR/xjeIcYYMvo4LNSfqeY= 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=tNHXVlmL; arc=none smtp.client-ip=178.238.236.174 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 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20220719; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=9sfZOx2DCTn54LYO3IjAwhuh25pOQkcCf5EGt7OZU20=; b=tNHXVlmLU/vIQ1W5czs79Ux/VF yq/UDFl5wKMH3L1pBMJoZI7L7iC17AJl9/8JLiJioS7x73i7HthN0LrXTBLVbBTL3zdal70GTMK2m y8nsbnZNGeR2uskiIWOOFzpevXgvI3qWfUxaaefL4l5b6My8T4Bo8kFEF+9cvq8tQOiLpvT2lm6Tw uJMCjLNf4Xyz7zRMj6Sv+dp1AZYBfN+xhpicn5bqekLHwzHb+vJFWxRneR9I0xaUtlJDU4hG3XNjc LSxWwEGN4pjRY8XctouvXQwemtHSBblfw57A+a2/vBCmjFlsa0C+zyaEOy0cElk33hxJijQNELYZ2 WQp/ZgjQ==; Received: from p200301077701e8001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:107:7701:e800: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.94.2) (envelope-from ) id 1rmCIV-000LTn-JD; Mon, 18 Mar 2024 13:40:59 +0100 Received: from andi by aktux with local (Exim 4.96) (envelope-from ) id 1rmCIU-00HTpq-0T; Mon, 18 Mar 2024 13:40:58 +0100 From: Andreas Kemnade To: dmitry.torokhov@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, lee@kernel.org, alexandre.belloni@bootlin.com, wim@linux-watchdog.org, linux@roeck-us.net, andreas@kemnade.info, 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: [PATCH] dt-bindings: mfd: twl: Convert trivial subdevices to json-schema Date: Mon, 18 Mar 2024 13:40:50 +0100 Message-Id: <20240318124051.4166253-1-andreas@kemnade.info> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 + + unevaluatedProperties: false + bci: + type: object + $ref: ../power/supply/twl4030-charger.yaml + + unevaluatedProperties: false + pwrbutton: + type: object + properties: + compatible: + const: ti,twl4030-pwrbutton + interrupts: + const: 8 + + additionalProperties: false + 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: diff --git a/Documentation/devicetree/bindings/rtc/twl-rtc.txt b/Documentation/devicetree/bindings/rtc/twl-rtc.txt deleted file mode 100644 index 8f9a94f2f8969..0000000000000 --- a/Documentation/devicetree/bindings/rtc/twl-rtc.txt +++ /dev/null @@ -1,11 +0,0 @@ -* Texas Instruments TWL4030/6030 RTC - -Required properties: -- compatible : Should be "ti,twl4030-rtc" -- interrupts : Should be the interrupt number. - -Example: - rtc { - compatible = "ti,twl4030-rtc"; - interrupts = <11>; - }; diff --git a/Documentation/devicetree/bindings/watchdog/twl4030-wdt.txt b/Documentation/devicetree/bindings/watchdog/twl4030-wdt.txt deleted file mode 100644 index 80a37193c0b86..0000000000000 --- a/Documentation/devicetree/bindings/watchdog/twl4030-wdt.txt +++ /dev/null @@ -1,10 +0,0 @@ -Device tree bindings for twl4030-wdt driver (TWL4030 watchdog) - -Required properties: - compatible = "ti,twl4030-wdt"; - -Example: - -watchdog { - compatible = "ti,twl4030-wdt"; -}; -- 2.39.2