From patchwork Wed Jan 10 19:49:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Lechner X-Patchwork-Id: 187024 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2411:b0:101:2151:f287 with SMTP id m17csp1019164dyi; Wed, 10 Jan 2024 11:52:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IGAfMwSFgQqLH0U8qKYTVwkckONKje//FIgaXYYlCECDZK9MaL6RgtBZ3U8P53eUOToss7O X-Received: by 2002:a17:902:7803:b0:1d5:36a5:6c33 with SMTP id p3-20020a170902780300b001d536a56c33mr40327pll.121.1704916341348; Wed, 10 Jan 2024 11:52:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704916341; cv=none; d=google.com; s=arc-20160816; b=XNOuTP82Uod63gHFlsjs1G72ZGCrksuy/M0pItRU/B+4wI+PvPbswU3fZkbKKSDTH1 2NZTHnTSS3aK3smlph3LfgSl7wjZj1uwUiQovMJ6h4Ro0jl2PXIAjzXP5bGemiwY/9va N+1+MmMKn0NsWmtIzjZlXroo2E6aAo5wBqfkY1Yf8P1VYiHw2NqarLqJmFggkRIHgt51 FZyWzHWqIfhAcOjMPpMZywt7SLbXF7Omiwe8n5soi0MIS2pDojcEaaZiZR+RG9iToAVI Tu/Kfiiq5618tQLu421mgIrsbNfwFChUhVQp6F4D/DR8uFQb8JD4UYsgxiRp2Yd0PDRK hERw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=8tQFXGB0UBE3yQVmYcImKXXjk/ehD/gF98AYs7jrXzE=; fh=cIqT9NcZdjUqupo3CRF2zie7E78k65IMo1it3Fi0alA=; b=Ob9iJfhBsoc7O8fCtztVP6j5y7sc7UYQXk2LbqUXa6rORkXwGwZmjrsSB/JDAAEwbX Nk8Yuz+HBDthDZoRz+qP0Fn3SQJZnLa02hRKqkorGU4ZKjW7ePYxSai+jENoDIhNSNqv RktgYq+bp5fDtStb4ECpy04pAjftHXWlMhRueLXwb2B1klGTp+ACqaa+PqtrA9yG8GBQ 3M6eoCr6RLScfgXK3PRkYzyuijU5GshkuQSs19gviA3qtwI3TMdNboZlAbeOvSu9GI0o EumV8ly/PgABnJklL19Q0Ds0hBjbj5lGgvJ2cjtBs7+2DExWXrJySKHxIKPNy/xNQXUT gL0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b="yKV/+Qfr"; spf=pass (google.com: domain of linux-kernel+bounces-22672-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22672-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id z12-20020a1709028f8c00b001cff7628fd4si4203785plo.595.2024.01.10.11.52.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 11:52:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22672-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b="yKV/+Qfr"; spf=pass (google.com: domain of linux-kernel+bounces-22672-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22672-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B63C028813E for ; Wed, 10 Jan 2024 19:52:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1ECA84F88A; Wed, 10 Jan 2024 19:51:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="yKV/+Qfr" Received: from mail-oo1-f44.google.com (mail-oo1-f44.google.com [209.85.161.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D09D84EB26 for ; Wed, 10 Jan 2024 19:51:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Received: by mail-oo1-f44.google.com with SMTP id 006d021491bc7-5955a4a9b23so2450117eaf.1 for ; Wed, 10 Jan 2024 11:51:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1704916271; x=1705521071; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8tQFXGB0UBE3yQVmYcImKXXjk/ehD/gF98AYs7jrXzE=; b=yKV/+Qfriqeu0qBj16IXEt1rSLw90lnlhjOy+tyC7v7TdhP6uGBuPEMCUXuy1c4O7t avMDDkMYaHi7r3eppgI2HoVRyNAxiTYvpiisrGng2hZn609pSm9uAgau+o0nDORZYyRF S7wrVb3HuSBn9M4f41ZLCyXDvAMNwS/bZz7rkfhFi0cBecwBe8GMG+PnCG4yV7bUUbDc Ao0Mz4cbNDXxNtB/sp/GBvFVqhBqNVJEX+E4dAwSxlI3qJwx9X2jbEroAcAGoVgsP7xa yaP2LVm/b9zkPJ9n/zYrm6TZ2OUzZBl1jPuIKCYquxUU5+taZlpjjC3jlL72wx4FYUiz 1mCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704916271; x=1705521071; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8tQFXGB0UBE3yQVmYcImKXXjk/ehD/gF98AYs7jrXzE=; b=wCD0Tir6Sp4v+C4fNYdwJJa3FT8+ce5BPHqiBRrOGNRVPvzEOaJY5003bkp7AXAKEf JFgSkztujKEOUWYOa7QaZ/R1Li+KlfAOUrrj1Dm2Lgw/aDq5MLBS69CULajhaDUJ3A5M jIGPHjHW+P28MYg1baFs8Ym33e+0ebZKbzapnleocoHtaKLLaKIcGUwZJH4bpf/Slrus 9zYlsB2N6SGMNrbTFXzdECgbmFCpoxJNYMSN93qXND3+jQkUdoIuLKl3mL/O//JjOZxX 1SX66ny+/ZPwLiMv3lRm0++jdEOq7TZzVQmqD3/mU8m96Ix1kCc1hW0o36kl0dG+Ksds 7W3A== X-Gm-Message-State: AOJu0YyydR1qmxkvL1OgB611pD7h6iM274uRq+2+euF6TuqRpwWzOl/e kreZW3xxKgkJO3YbF295SkuxGCwxX6Nnfg== X-Received: by 2002:a05:6820:2382:b0:591:acf8:d08f with SMTP id co2-20020a056820238200b00591acf8d08fmr140554oob.11.1704916270980; Wed, 10 Jan 2024 11:51:10 -0800 (PST) Received: from freyr.lechnology.com (ip98-183-112-25.ok.ok.cox.net. [98.183.112.25]) by smtp.gmail.com with ESMTPSA id 187-20020a4a0dc4000000b00595b35927a3sm938513oob.39.2024.01.10.11.51.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 11:51:10 -0800 (PST) From: David Lechner To: Mark Brown , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Michael Hennerich , =?utf-8?q?Nuno_S=C3=A1?= , Frank Rowand Cc: David Lechner , Thierry Reding , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jonathan Corbet , linux-spi@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/13] scripts: dtc: checks: don't warn on SPI non-peripheral child nodes Date: Wed, 10 Jan 2024 13:49:43 -0600 Message-ID: <20240109-axi-spi-engine-series-3-v1-2-e42c6a986580@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240109-axi-spi-engine-series-3-v1-0-e42c6a986580@baylibre.com> References: <20240109-axi-spi-engine-series-3-v1-0-e42c6a986580@baylibre.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mailer: b4 0.12.4 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787734357568066700 X-GMAIL-MSGID: 1787734357568066700 According to the spi-controller.yaml bindings, SPI peripheral child nodes match the pattern "^.*@[0-9a-f]+$". A SPI controller binding may require a child object node that is not a peripheral. For example, the adi,axi-spi-engine binding requires an "offloads" child node that is not a peripheral but rather a part of the controller itself. By checking for '@' in the node name, we can avoids a warnings like: Warning (spi_bus_reg): /example-0/spi@44a00000/offloads: missing or empty reg property for a binding like: spi { ... offloads { offload@0 { ... }; ... }; peripheral@0 { ... }; }; Signed-off-by: David Lechner --- scripts/dtc/checks.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/dtc/checks.c b/scripts/dtc/checks.c index 9f31d2607182..5af68642f231 100644 --- a/scripts/dtc/checks.c +++ b/scripts/dtc/checks.c @@ -1144,6 +1144,10 @@ static void check_spi_bus_reg(struct check *c, struct dt_info *dti, struct node if (!node->parent || (node->parent->bus != &spi_bus)) return; + /* only nodes with '@' in name are SPI devices */ + if (!strchr(unitname, '@')) + return; + if (get_property(node->parent, "spi-slave")) return;