Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp42056ybe; Thu, 12 Sep 2019 15:16:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqxotTlCZONd2NI7ykydYWo8+bj4t3MAxFKN5lwEI4ItGJkUJjFdHpmA2lYCXk/xC6PiU8aF X-Received: by 2002:a17:906:3d6:: with SMTP id c22mr5535890eja.269.1568326593377; Thu, 12 Sep 2019 15:16:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568326593; cv=none; d=google.com; s=arc-20160816; b=vDo0sOK2X/ykhsondV8QeYhqXk9qPpSe3W/4CQO8PT1T0EwncHNcMe3+mX3GFVUdG1 NrR87s7NTYtwqXkQNN9nNfei85SIYSLI7ZwTtcJ+qKA4YpVyS13fGJm3YO5EJZafB4qO MIXkW/p9umU33H03SkeCDiN8ZiDrzbOqRX9IFHDDM7G6HhKE9EUyOqhJdCu72tC8Aqmz V7J9RgDOdk8FePlpJeiSfHlFsxYwWP+1ZVXOeuO7SNKTnixoPCayjt/diPhrldoOSGYv pES8OTeZtD5u5KjzLza7IM6k8WvI7SCdMf9ns1I8DcK/noMHyduCfHSy9Ammv8esBHoE 2oDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=l8Ov5y/tQkSs6Q5vM7CFAAbYYGZtyUJhfeWygf8r9JE=; b=KRbVQebqFDQuPkzJx12tw63iUnuvMECgXh86tzw8EvtPcT1j0nylCWClKdjk1IktN1 3/QsgKXjAugPeZX/Byzec1JGfI/NfAVF+EgIJvkEAdb9Ch/8q5Y9FULUlYXgGO3hr3Kr VsVBQkTxQvRMHzKveJcNIeTVpBb1Dlah3OTjcLMKnSYbohQI2oxPZE7qvYBzqZaZMp6R zEYbI4UaAVpgzFVR5/BBY/qt7edymBOm+ExgGxSvSALJsPQlEcBcldVsaI1AZj/awubO wq06yBTv7Pbsfwc7J3wyT7pm1mIbbWw5oL+Jp16fssD9noPyqxTAWi4KggIHWSzCF856 uXHQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q14si3342147edr.3.2019.09.12.15.15.59; Thu, 12 Sep 2019 15:16:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726270AbfILU0n (ORCPT + 99 others); Thu, 12 Sep 2019 16:26:43 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:37635 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725995AbfILU0n (ORCPT ); Thu, 12 Sep 2019 16:26:43 -0400 Received: by mail-ed1-f65.google.com with SMTP id i1so25155333edv.4; Thu, 12 Sep 2019 13:26:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=l8Ov5y/tQkSs6Q5vM7CFAAbYYGZtyUJhfeWygf8r9JE=; b=DUKiaa93yxqkZlKe2P9Io/rbo5CT3/lhzRapUCY299lLoQLdYbR+rksUrrkVzol0YJ SG7qrYboLo1JqYc0kq6y3PMoNNAy0xCp1uKntDWbhCo7pPvjkkgCJsI3Puz0j+9pfqMt KX4g1P7IzVEmz9+TAPuDkEmjIQjXYWy+LhYF47QL3OSLBzzOHddfDkzDgGHA2/C8t2HT arwedseo9gZjrokH8AwSLjl394GK6OGTi/7MPhdQRkeTvgphtbW+1K54owytHTamV7pX bGu17ayVFvogdPBjiLqYw0O74clezXXJ8DpCHHce18UioojLgHxjpyS5B/8JnYcLvF7w GbLg== X-Gm-Message-State: APjAAAWhwlzLVQl/xWanhEz5hJO6g/925zi/hBOtcz9ybCMcwXdbVdTW 4yfEv5WXlhS9ifoDIEnP+XdO7LiwAGg= X-Received: by 2002:a50:9e08:: with SMTP id z8mr45137282ede.305.1568320000893; Thu, 12 Sep 2019 13:26:40 -0700 (PDT) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com. [209.85.221.45]) by smtp.gmail.com with ESMTPSA id k11sm2725434ejr.3.2019.09.12.13.26.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 Sep 2019 13:26:40 -0700 (PDT) Received: by mail-wr1-f45.google.com with SMTP id l11so29784855wrx.5; Thu, 12 Sep 2019 13:26:40 -0700 (PDT) X-Received: by 2002:a5d:6785:: with SMTP id v5mr12785154wru.9.1568319999923; Thu, 12 Sep 2019 13:26:39 -0700 (PDT) MIME-Version: 1.0 References: <20190906184551.17858-1-clabbe.montjoie@gmail.com> <20190906184551.17858-4-clabbe.montjoie@gmail.com> <20190907040116.lib532o2eqt4qnvv@flea> <20190911183158.GA8264@Red> <20190912093737.s6iu63sdncij2qib@localhost.localdomain> In-Reply-To: <20190912093737.s6iu63sdncij2qib@localhost.localdomain> From: Chen-Yu Tsai Date: Thu, 12 Sep 2019 21:26:27 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 3/9] dt-bindings: crypto: Add DT bindings documentation for sun8i-ce Crypto Engine To: Maxime Ripard Cc: Corentin Labbe , David Miller , Herbert Xu , Russell King , Mark Rutland , Rob Herring , devicetree , linux-arm-kernel , linux-crypto@vger.kernel.org, linux-kernel , linux-sunxi Content-Type: text/plain; charset="UTF-8" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, Sep 12, 2019 at 10:37 AM Maxime Ripard wrote: > > Hi Corentin, > > On Wed, Sep 11, 2019 at 08:31:58PM +0200, Corentin Labbe wrote: > > On Sat, Sep 07, 2019 at 07:01:16AM +0300, Maxime Ripard wrote: > > > On Fri, Sep 06, 2019 at 08:45:45PM +0200, Corentin Labbe wrote: > > > > This patch adds documentation for Device-Tree bindings for the > > > > Crypto Engine cryptographic accelerator driver. > > > > > > > > Signed-off-by: Corentin Labbe > > > > --- > > > > .../bindings/crypto/allwinner,sun8i-ce.yaml | 84 +++++++++++++++++++ > > > > 1 file changed, 84 insertions(+) > > > > create mode 100644 Documentation/devicetree/bindings/crypto/allwinner,sun8i-ce.yaml > > > > > > > > diff --git a/Documentation/devicetree/bindings/crypto/allwinner,sun8i-ce.yaml b/Documentation/devicetree/bindings/crypto/allwinner,sun8i-ce.yaml > > [...] > > > > +else: > > > > + clocks: > > > > + items: > > > > + - description: Bus clock > > > > + - description: Module clock > > > > + > > > > + clock-names: > > > > + items: > > > > + - const: ahb > > > > + - const: mod > > > > + > > > > + resets: > > > > + maxItems: 1 > > > > + > > > > + reset-names: > > > > + const: ahb > > > > > > This prevents the usage of the additionalProperties property, which > > > you should really use. > > > > > > What you can do instead is moving the clocks and clock-names > > > description under properties, with a minItems of 2 and a maxItems of > > > 3. Then you can restrict the length of that property to either 2 or 3 > > > depending on the case here. > > > > > > > Hello > > > > I fail to do this. > > I do the following (keeped only clock stuff) > > properties: > > > > clocks: > > items: > > - description: Bus clock > > - description: Module clock > > - description: MBus clock > > Add minItems: 2 and maxItems: 3 at the same level than items > > > > > clock-names: > > items: > > - const: ahb > > - const: mod > > - const: mbus > > And here as well > > Something I missed earlier though was that we've tried to unify as > much as possible the ahb / apb / axi clocks around the bus name, it > would be great if you could do it. I think we also want to standardize "mbus" as "dram"? ChenYu > > > > if: > > properties: > > compatible: > > items: > > const: allwinner,sun50i-h6-crypto > > then: > > properties: > > clocks: > > minItems: 3 > > maxItems: 3 > > clock-names: > > minItems: 3 > > maxItems: 3 > > You don't need to duplicate the min and maxItems here > > Maxime