From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.4 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA528C43463 for ; Mon, 21 Sep 2020 10:53:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A2AAA20719 for ; Mon, 21 Sep 2020 10:53:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=metafoo.de header.i=@metafoo.de header.b="RAWEgFai" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726333AbgIUKxX (ORCPT ); Mon, 21 Sep 2020 06:53:23 -0400 Received: from www381.your-server.de ([78.46.137.84]:48056 "EHLO www381.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726353AbgIUKxV (ORCPT ); Mon, 21 Sep 2020 06:53:21 -0400 X-Greylist: delayed 1605 seconds by postgrey-1.27 at vger.kernel.org; Mon, 21 Sep 2020 06:53:20 EDT DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metafoo.de; s=default2002; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Date: Message-ID:Subject:From:To:Sender:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References; bh=eY5LxhM6IJXQOEyzRVkGoUrgdQjhHHpcbF1poDzsPBM=; b=RA WEgFaiQszqIaRDOHbVrTmToqeRnfTk7KGnA+91nLzMZ7+YFtiH/+iqGDtW6pFVy0kC5bg5RfapKLw xnQEMh1iqOxbbzJD6ILo11/nyBnNWmucCgbvqkWseWesFvG/x04INBMOave5HvTKA5UN0A/8KNmOo 8/RmU/vmZe6yreq+qJJ2zw0HC5aiZt/rWOv02AEc60E6N2FhiGm0TszktsgJ/6z30CnLmn/YcjdA4 SB1BE+EW3FQFbHQzsLCGt7BPwzjLcsGKW7QVxTH5zvrI/Q40iWiGTeM32JVHntt8AFPWVzOB17W+n M3JqmR8nkxldPF4ck64gfjnr28TT74FQ==; Received: from sslproxy05.your-server.de ([78.46.172.2]) by www381.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1kKJ1j-00018S-Nx; Mon, 21 Sep 2020 12:26:32 +0200 Received: from [2001:a61:259b:1201:9e5c:8eff:fe01:8578] by sslproxy05.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kKJ1j-0005fe-GC; Mon, 21 Sep 2020 12:26:31 +0200 To: Rob Herring , Jonathan Cameron , "linux-iio@vger.kernel.org" , "devicetree@vger.kernel.org" From: Lars-Peter Clausen Subject: yaml schema and sub-nodes with vendor prefixes Message-ID: Date: Mon, 21 Sep 2020 12:26:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.102.4/25933/Sun Sep 20 15:50:34 2020) Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi, I'm trying to convert Xilinx XADC devicetree bindings[1] description to yaml format. And I'm running into issue with describing a sub-node with a vendor prefix. A typical devicetree entry for the XADC looks like     xadc@43200000 {         compatible = "xlnx,axi-xadc-1.00.a";         xlnx,channels {             #address-cells = <1>;             #size-cells = <0>;             channel@0 {                 reg = <0>;                 xlnx,bipolar;             };         };     }; So there is the 'xlnx,channels' sub-node which contains a set of other nodes which represent the individual channels. The way I'm trying to describe it in the yaml file is like  xlnx,channels:     description: Node containing all the channel nodes     type: object     properties:       '#address-cells':          const: 1       '#size-cells':          const: 0     patternProperties:       "^channel@([0-9]|1[0-6])$":         type: object         properties:           reg:             description: ...           xlnx,bipolar:             description: If set the channel is used in bipolar mode.             type: boolean         required:           - reg         additionalProperties: false     required:       - '#address-cells'       - '#size-cells'     additionalProperties: false This now fails validation, presumably because there is no match in meta-schemas/vendor-props.yaml. If I drop the vendor prefix from the property name validation passes. I can also make validation pass by adding an arbitrary $ref property, but there is no 'node' type in types.yaml. What's the best way to describe a node with a vendor prefix? Thanks, - Lars [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/iio/adc/xilinx-xadc.txt