From patchwork Fri Jun 19 15:15:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 11614377 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 532CF912 for ; Fri, 19 Jun 2020 15:19:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 39A6421941 for ; Fri, 19 Jun 2020 15:19:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392439AbgFSPTS (ORCPT ); Fri, 19 Jun 2020 11:19:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404043AbgFSPPq (ORCPT ); Fri, 19 Jun 2020 11:15:46 -0400 Received: from albert.telenet-ops.be (albert.telenet-ops.be [IPv6:2a02:1800:110:4::f00:1a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37614C0613EF for ; Fri, 19 Jun 2020 08:15:45 -0700 (PDT) Received: from ramsan ([IPv6:2a02:1810:ac12:ed20:38b1:3718:f116:dc69]) by albert.telenet-ops.be with bizsmtp id t3Fj2200C1b8psi063FjHk; Fri, 19 Jun 2020 17:15:44 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1jmIk3-0005jD-Dj; Fri, 19 Jun 2020 17:15:43 +0200 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1jmIk3-0003vm-Bv; Fri, 19 Jun 2020 17:15:43 +0200 From: Geert Uytterhoeven To: Zhang Rui , Daniel Lezcano , Amit Kucheria , Rob Herring , =?utf-8?q?Niklas_S=C3=B6derlund?= Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] dt-bindings: thermal: rcar-thermal: Improve schema validation Date: Fri, 19 Jun 2020 17:15:41 +0200 Message-Id: <20200619151541.15069-1-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.1 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org - Document missing "#thermal-sensor-cells", - Factor out common required properties, - "interrupts", "clocks", and "power-domains" are required on R-Mobile APE6, too, - Invert logic to simplify descriptions, - Add "additionalProperties: false". Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Reviewed-by: Amit Kucheria Reviewed-by: Rob Herring --- .../bindings/thermal/rcar-thermal.yaml | 53 ++++++++++++------- 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/Documentation/devicetree/bindings/thermal/rcar-thermal.yaml b/Documentation/devicetree/bindings/thermal/rcar-thermal.yaml index 0994693d240f9ff4..88787b98992fe7c9 100644 --- a/Documentation/devicetree/bindings/thermal/rcar-thermal.yaml +++ b/Documentation/devicetree/bindings/thermal/rcar-thermal.yaml @@ -59,25 +59,40 @@ properties: resets: maxItems: 1 -if: - properties: - compatible: - contains: - enum: - - renesas,thermal-r8a73a4 # R-Mobile APE6 - - renesas,thermal-r8a7779 # R-Car H1 -then: - required: - - compatible - - reg -else: - required: - - compatible - - reg - - interrupts - - clocks - - power-domains - - resets + '#thermal-sensor-cells': + const: 0 + +required: + - compatible + - reg + +allOf: + - if: + not: + properties: + compatible: + contains: + enum: + - renesas,thermal-r8a73a4 # R-Mobile APE6 + - renesas,thermal-r8a7779 # R-Car H1 + then: + required: + - resets + - '#thermal-sensor-cells' + + - if: + not: + properties: + compatible: + contains: + const: renesas,thermal-r8a7779 # R-Car H1 + then: + required: + - interrupts + - clocks + - power-domains + +additionalProperties: false examples: # Example (non interrupt support)