Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2146568rda; Tue, 24 Oct 2023 13:59:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFih296FKyFwdozTJODCPS5Y+Geqi+T2ZwR+E04vWKb4b6x3Y/VCWyWKyvcnyDZ57iD8/Em X-Received: by 2002:a05:6a20:3c8d:b0:17b:8638:c6c6 with SMTP id b13-20020a056a203c8d00b0017b8638c6c6mr5013186pzj.13.1698181143377; Tue, 24 Oct 2023 13:59:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698181143; cv=none; d=google.com; s=arc-20160816; b=SF1Gl2SC9oIf61CXcDVE1C03n4JqOGt9ZJaKgYYZZIO7M9JWx6Hb8aaqBH+OYM+rX0 GuTKStkep8jJh0RLEYERPwMhD60eebOAbGTA/v52n1GEvm3e2ermioA/1TcPhJRoeTLC iTXo0uVwTbWru+3dt94I0mviLIXEr4e8gArhNnImtUpp/nMmycUHIURfARZpss8E1XaJ EJ38fjwPXgfL9JH7+VtE/u5IyxyWDzvNeFaKnJ4mQpGOVFZs6dX4F0bRuSqGsnABlYO+ h2AI+B1ZYK6rDMcjdnL+JslVEFhN4XVMBpMTBKXV+xyW3+y2iyYkhz/jHax7i/Cl+5uT 0s6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=gImLv6Y8NnjeTz7dQ0WcIB2xeIpe49LYR/tvFnfDL/Q=; fh=HC7VmIPkff6bbVdU9SDNwGiV65TACzElGm5nmvzXosY=; b=Fm+KhCsum/eQLSt918SkTbCCu7P/q7dhtnUrVANKKkPLPh2lkpuoMOCTDHxJW8D0Dx 8ou7YytmurdqaRryh8yn61hE8Y7uhgaNbqn7YaO0DAPKwJ8D+yhDMFwpkz+ath96zlUR wIPL5r7YcTs0B3pRBRLlCl8nssvuCMMIcBGZ+YvKnx8qX+kj167CeFVK117VDXgVoba/ ccwtBzONfVV1htKbyfJj2fqJbHZzBrqCRci0WpDkT3KhLRNCAOJjKDSOeQoUBhz4tbNH chgMQz4cgzYNY8ePRfr1hf1vV6XD+7uXMur3IT0kdl2dUO2NdSXZVjxkzWBq3Af8v1d+ IN+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id s20-20020a639254000000b005b205bdd324si8865347pgn.697.2023.10.24.13.59.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 13:59:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 97BA98020C02; Tue, 24 Oct 2023 13:59:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344401AbjJXU6d (ORCPT + 99 others); Tue, 24 Oct 2023 16:58:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344399AbjJXU62 (ORCPT ); Tue, 24 Oct 2023 16:58:28 -0400 Received: from mail-oo1-f52.google.com (mail-oo1-f52.google.com [209.85.161.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDA7010FB; Tue, 24 Oct 2023 13:58:23 -0700 (PDT) Received: by mail-oo1-f52.google.com with SMTP id 006d021491bc7-5845a94dae1so102465eaf.0; Tue, 24 Oct 2023 13:58:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698181103; x=1698785903; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=gImLv6Y8NnjeTz7dQ0WcIB2xeIpe49LYR/tvFnfDL/Q=; b=k+vmq5pz3enf5Rz73t6tiTmYXovGi3tF2WtiSkqr7ZXiEKARrZAv1FhFJWxrE2ySqX M65R3MOPgTSLuRBt4xRmeKA1e0W1A8w9HHJSd5mBotceQ3n6qM57n3NkoY4YGIpWZPFl fvlOomIz7OCsmeq/Uczy6fYIRgPaeMXbrELUS5V5xYBRtQCHFXx9OxGecqFQthQVz1gO GNPWm/W5b6dSdl4nCXZU0NhgDPQIoiHpAzOgk4BoCcsXbQMsMcYcMb4dEe/WhQAu/BPR PEfNSCoeEj1lEBTx9yXSs0WdCAHNMZzSJ220iA7nJ4jTVPW8J9R6ZciixjzUtV+ILYXF 8iXQ== X-Gm-Message-State: AOJu0YxFsrfmWyMTFgsmW164jACb8rRxJuEinQZxnUnnMSAZpcZ8yOce lOjRpAhlGWJFs5UE8NpYCr6a6Yj0/g== X-Received: by 2002:a05:6870:459a:b0:1e9:cba3:a329 with SMTP id y26-20020a056870459a00b001e9cba3a329mr9010193oao.14.1698181102804; Tue, 24 Oct 2023 13:58:22 -0700 (PDT) Received: from herring.priv (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id eg41-20020a05687098a900b001eb0e8b75cdsm2022007oab.10.2023.10.24.13.58.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 13:58:22 -0700 (PDT) Received: (nullmailer pid 559118 invoked by uid 1000); Tue, 24 Oct 2023 20:58:21 -0000 Date: Tue, 24 Oct 2023 15:58:21 -0500 From: Rob Herring To: Geert Uytterhoeven Cc: Lee Jones , Krzysztof Kozlowski , Conor Dooley , Guennadi Liakhovetski , Liam Girdwood , Mark Brown , devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC] dt-bindings: mfd: ams,as3711: Convert to json-schema Message-ID: <20231024205821.GA529288-robh@kernel.org> References: <9af48b816f2b6397f5ada58a9b5ced85213e5194.1698085945.git.geert+renesas@glider.be> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9af48b816f2b6397f5ada58a9b5ced85213e5194.1698085945.git.geert+renesas@glider.be> X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 24 Oct 2023 13:59:00 -0700 (PDT) On Mon, Oct 23, 2023 at 08:38:07PM +0200, Geert Uytterhoeven wrote: > Convert the Austria MicroSystems AS3711 Quad Buck High Current PMIC with > Charger Device Tree binding documentation to json-schema. > > Signed-off-by: Geert Uytterhoeven > --- > RFC, as I couldn't get the multiple dependencies right (see FIXMEs): > 1. How to incorporate "su2-dev: [ su2-max-uA ]" and > "su2-feedback-curr-auto: [ su2-dev ]"? > 2. su2-dev requiring one of su2-fbprot-* does not seem to work? > > Anyone with better *Of foo? Thanks! > --- > .../devicetree/bindings/mfd/ams,as3711.yaml | 223 ++++++++++++++++++ > .../devicetree/bindings/mfd/as3711.txt | 73 ------ > 2 files changed, 223 insertions(+), 73 deletions(-) > create mode 100644 Documentation/devicetree/bindings/mfd/ams,as3711.yaml > delete mode 100644 Documentation/devicetree/bindings/mfd/as3711.txt > + dependencies: > + # To use the SU1 converter as a backlight source the following two > + # properties must be provided: > + su1-dev: [ su1-max-uA ] > + su1-max-uA: [ su1-dev ] > + > + # To use the SU2 converter as a backlight source the following two > + # properties must be provided: > + # FIXME How to incorporate "su2-dev: [ su2-max-uA ]"? You've stumbled into the evolution of jsonschema. Newer versions split 'dependencies' into 'dependentSchemas' and 'dependentRequired' (more generally, they split keywords that could be either a list or schema). That will let you have both forms. The new keywords are already supported and you can use them (internally, dtschema is converting every 'dependencies' to the new forms because json-schema likes flag days, sigh). > + # FIXME su2-dev requiring one of su2-fbprot-* does not seem to work? > + su2-dev: > + allOf: > + - oneOf: > + - required: > + - su2-feedback-voltage > + - required: > + - su2-feedback-curr1 > + - required: > + - su2-feedback-curr2 > + - required: > + - su2-feedback-curr3 > + - required: > + - su2-feedback-curr-auto > + - oneof: Your second problem is here. s/oneof/oneOf/ Got to love json-schema's default silence on unknown keywords. I'll figure out why we don't descend here and find this. > + - required: > + - su2-fbprot-lx-sd4 > + - required: > + - su2-fbprot-gpio2 > + - required: > + - su2-fbprot-gpio3 > + - required: > + - su2-fbprot-gpio4