Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1622930ybh; Sun, 15 Mar 2020 07:12:28 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt9TmFebYUhW2cDteicmqPPEvR5f8vFkxS5h4CMn+TOK7uIv2eEjafRkYPwT7rC/ramGbKn X-Received: by 2002:a05:6830:456:: with SMTP id d22mr3993485otc.138.1584281548707; Sun, 15 Mar 2020 07:12:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584281548; cv=none; d=google.com; s=arc-20160816; b=0+xjJzYkLWvV/C4mrJmvaB+A1mtJGFJEWuM8plpR6GWLrTd3Rq8Ft6lvF/GfRU4TIJ 0RQtryx+lI91EnUvoNCm0xbiKeFG5XXIfrJrgZVG/9XvOT9tP4qQQawMAsFD4HQTTdGz lBKGDSPP7uYe6UOk7+EWJLQN30igPVKNr7EzoIRVqMum74PSkdyEIrNTG/UKkpJCD0Wm IkrUL9iD1Yq5qvBj3FRcqJlSH2S7bP0p5jt8OeIQNIT3K/d0ztdqZDAjnfGCJagcMRJV IFIqRuuhq1xe+DfsD6M878KdfWEjJGRR4nOnjdlD9d9ODi+ZwZP2iWn01tVTaYzKJ3U/ q9IA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=I2Kq4iO6XijbXFBEnD85G1Xl5+d7l0FLMqlg0wGGvec=; b=UsmG5RXqR4K9fQIvPVh73XTVN9wx/jmJhXAZ8R2GukPfpQmvrvqZVBVppCxCb9VXx0 Luro709xYnYyC7tF8aYL40rNHXm7DI+x07/0z3DPsk0psGD2lMSm3lO2gbihSkpGMsv6 SdJFfc1LYAsXeXG/4OzMOzDsjgp7E2iOvyW94zWA7+4ie7TswkDXKAkwzNF29NA3TbyE VzLyTqZmOpZaIdwAvq1hzEy5WefeaA98FeniOaWxptDe8Flbt0r8NsPFYXQu3/d6z6rU xiMG0cVhlzWX4v4sPJ7Yba0RnyLdnZmJQr7N7WvWjGRS552qTxrdIEK4t0CFOLRIeKz+ 8Zvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aBeErJ5Y; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5si8071054oii.181.2020.03.15.07.12.16; Sun, 15 Mar 2020 07:12:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aBeErJ5Y; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728274AbgCOOL4 (ORCPT + 99 others); Sun, 15 Mar 2020 10:11:56 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:37625 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727778AbgCOOL4 (ORCPT ); Sun, 15 Mar 2020 10:11:56 -0400 Received: by mail-wm1-f67.google.com with SMTP id a141so15167919wme.2; Sun, 15 Mar 2020 07:11:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=I2Kq4iO6XijbXFBEnD85G1Xl5+d7l0FLMqlg0wGGvec=; b=aBeErJ5YyBbr4nxnQqkvrKEkkPnz6PAkHkmhro6G6MrJOL/UDFD7Ub6vQoY2SEDq1G 9k+mhialuNE6IJ+pg1nt6+J0TB3v9w/1JZapZVCSYSppUz2ioutiCwrEHRKuPhyJHUU0 jdD1cUnn28NFihH8vunjsiP7tvrhC/gnJK60e6sF1svey+0fe48hr95M3sdyIGa7BuLt vYGMSoLdIpe1SlnjB1aS4NEqq8w/BUPgrjnjfSWDnnnnxNtGqeJwU1wWXvnXkrj54TtT 1RwUDuS2jAxhEHmJ+SRHGXYpyb8phDFCR9GqLBHcUDO1ZNoqfgaNWzx6x3bFTEGONVBU B1eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=I2Kq4iO6XijbXFBEnD85G1Xl5+d7l0FLMqlg0wGGvec=; b=WAP6XHXaGJYWFo+MglGpGw7qNqcZwRSGtqqEb0bojIPH4dFQBY+tXBqZ62ukOXsqAt w7XRAvtaPbSf1Tu/0iFfhmpWMVdcoMtl26/d1cKcb025Fk1YQz4DKCjG8QCzvgnkaISZ 0lEpy9FXAXNZR1Zt1PyT2cwjEwefalmYJ0PB2rz4mfd05lBuRz1dCwcW91+A60T9v2hw CRNN1ulHrRyC3sRxMfvsoDJYT4lOCXCFPU3g4SgYkXrUco4r+HetVDZ9pHXIUrdljOxi EjEQ4vAdR1Z6PSdXCAJLjlLxQAI0KR4YktiZOeqjpMQHE9tV+k++WGkJkZRV8oOToiXM Wm0A== X-Gm-Message-State: ANhLgQ3lwSq2kx/2WBdzPcyGmg/UmojywqigWChXk/30B7BengT+5Fd8 vc4egkmxRfROf6rRbYmJeua+MDrB X-Received: by 2002:a05:600c:c8:: with SMTP id u8mr22401190wmm.178.1584281513815; Sun, 15 Mar 2020 07:11:53 -0700 (PDT) Received: from [192.168.2.1] (ip51ccf9cd.speed.planet.nl. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id x13sm26860956wmj.5.2020.03.15.07.11.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 15 Mar 2020 07:11:53 -0700 (PDT) Subject: Re: [PATCH v1 1/3] dt-bindings: iio: adc: convert rockchip saradc bindings to yaml To: Jonathan Cameron Cc: knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, heiko@sntech.de, robh+dt@kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org References: <20200313132926.10543-1-jbx6244@gmail.com> <20200315112223.07dd863b@archlinux> From: Johan Jonker Message-ID: Date: Sun, 15 Mar 2020 15:11:51 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200315112223.07dd863b@archlinux> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jonathan, For compatible strings with identical fallback we use 'enum' to combine, so instead of 3 only 1 additional line is needed for each new SoC patch. properties: compatible: oneOf: - const: rockchip,saradc - const: rockchip,rk3066-tsadc - const: rockchip,rk3399-saradc - items: - enum: - rockchip,px30-saradc - rockchip,rk3308-saradc - rockchip,rk3328-saradc - rockchip,rv1108-saradc - const: rockchip,rk3399-saradc [..] vs [..] properties: compatible: oneOf: - const: rockchip,saradc - const: rockchip,rk3066-tsadc - const: rockchip,rk3399-saradc - items: - const: rockchip,px30-saradc - const: rockchip,rk3399-saradc - items: - const: rockchip,rk3308-saradc - const: rockchip,rk3399-saradc - items: - const: rockchip,rk3328-saradc - const: rockchip,rk3399-saradc - items: - const: rockchip,rv1108-saradc - const: rockchip,rk3399-saradc Check with: make ARCH=arm menuconfig # select Rockchip platform make -k ARCH=arm64 dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/iio/adc/rockchip-saradc.yaml make -k ARCH=arm dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/iio/adc/rockchip-saradc.yaml make ARCH=arm64 menuconfig # select Rockchip platform make -k ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/iio/adc/rockchip-saradc.yaml Caution with: 'allOf' and 'additionalProperties: false' does not completely validate DTS or examples! On 3/15/20 12:22 PM, Jonathan Cameron wrote: > On Fri, 13 Mar 2020 14:29:24 +0100 > Johan Jonker wrote: > >> Current dts files with 'saradc' nodes are manually verified. >> In order to automate this process rockchip-saradc.txt >> has to be converted to yaml. >> >> Signed-off-by: Johan Jonker > > Hi Johan, > > A question inline which may just be my lack of yaml knowledge > showing itself! > > Jonathan > >> +properties: >> + compatible: >> + oneOf: >> + - const: rockchip,saradc >> + - const: rockchip,rk3066-tsadc >> + - const: rockchip,rk3399-saradc >> + - items: >> + - enum: >> + - rockchip,rk3328-saradc >> + - rockchip,rv1108-saradc >> + - const: rockchip,rk3399-saradc > > My yaml knowledge isn't great. Why do we have this nested > structure rather than a straight forward list? >