public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Dzmitry Sankouski <dsankouski@gmail.com>
To: u-boot@lists.denx.de
Cc: "Dzmitry Sankouski" <dsankouski@gmail.com>,
	"Simon Glass" <sjg@chromium.org>,
	"Sean Anderson" <sean.anderson@seco.com>,
	"Ramon Fried" <rfried.dev@gmail.com>,
	"Andrew Scull" <ascull@google.com>,
	"Marek Behún" <kabel@kernel.org>,
	"Etienne Carriere" <etienne.carriere@linaro.org>
Subject: [PATCH v3 3/5] test: create dedicated fdt node for ofnode_for_each_prop test
Date: Sun, 22 Jan 2023 18:21:23 +0300	[thread overview]
Message-ID: <20230122152125.858085-4-dsankouski@gmail.com> (raw)
In-Reply-To: <20230122152125.858085-1-dsankouski@gmail.com>

Property count may change in /buttons node, if more button tests added,
and this will break ofnode_for_each_prop.
Add separate node for mentioned test.

Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
---
Changes for v2: N/A
Changes for v3: N/A

 arch/sandbox/dts/test.dts | 14 ++++++++++++++
 test/dm/ofnode.c          |  2 +-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index 2e580f980f..06ad027638 100644
--- a/arch/sandbox/dts/test.dts
+++ b/arch/sandbox/dts/test.dts
@@ -1517,6 +1517,20 @@
 		};
 	};
 
+	ofnode-foreach {
+		compatible = "foreach";
+
+		first {
+			prop1 = <1>;
+			prop2 = <2>;
+		};
+
+		second {
+			prop1 = <1>;
+			prop2 = <2>;
+		};
+	};
+
 	osd {
 		compatible = "sandbox,sandbox_osd";
 	};
diff --git a/test/dm/ofnode.c b/test/dm/ofnode.c
index 8077affabb..473a8cef57 100644
--- a/test/dm/ofnode.c
+++ b/test/dm/ofnode.c
@@ -1046,7 +1046,7 @@ static int dm_test_ofnode_for_each_prop(struct unit_test_state *uts)
 	struct ofprop prop;
 	int count;
 
-	node = ofnode_path("/buttons");
+	node = ofnode_path("/ofnode-foreach");
 	count = 0;
 
 	/* we expect "compatible" for each node */
-- 
2.30.2


  parent reply	other threads:[~2023-01-22 15:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-22 15:21 [PATCH v3 0/5] dm: input: driver for buttons with linux, code declaration Dzmitry Sankouski
2023-01-22 15:21 ` [PATCH v3 1/5] gpio: qcom: add direction functions for pwrkey Dzmitry Sankouski
2023-02-10 18:43   ` Tom Rini
2023-01-22 15:21 ` [PATCH v3 2/5] dts: add missing linux,code in gpio-keys Dzmitry Sankouski
2023-02-10 18:43   ` Tom Rini
2023-01-22 15:21 ` Dzmitry Sankouski [this message]
2023-01-23 18:42   ` [PATCH v3 3/5] test: create dedicated fdt node for ofnode_for_each_prop test Simon Glass
2023-02-10 18:43   ` Tom Rini
2023-01-22 15:21 ` [PATCH v3 4/5] dm: button: add support for linux_code in button-gpio.c driver Dzmitry Sankouski
2023-01-23 18:42   ` Simon Glass
2023-02-10 18:43   ` Tom Rini
2023-01-22 15:21 ` [PATCH v3 5/5] dm: input: add button_kbd driver Dzmitry Sankouski
2023-01-23 18:42   ` Simon Glass
2023-02-10 18:43   ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230122152125.858085-4-dsankouski@gmail.com \
    --to=dsankouski@gmail.com \
    --cc=ascull@google.com \
    --cc=etienne.carriere@linaro.org \
    --cc=kabel@kernel.org \
    --cc=rfried.dev@gmail.com \
    --cc=sean.anderson@seco.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox