diff mbox series

[v2,3/5] sandbox: dts: Add compatible string for bind-test node

Message ID 20200429122031.31279-4-patrice.chotard@st.com
State Superseded
Headers show
Series cmd: bind allow to bind driver with driver_data | expand

Commit Message

Patrice CHOTARD April 29, 2020, 12:20 p.m. UTC
Usage of lists_bind_fdt() in bind command imposes to add
a compatible string for bind-test node.
The other impact, is that bind-test node is binded at sandbox
start, so no need to bind it in test_bind_unbind_with_node() test

Signed-off-by: Patrice Chotard <patrice.chotard at st.com>
---

Changes in v2: None

 arch/sandbox/dts/test.dts  | 1 +
 test/py/tests/test_bind.py | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)

Comments

Simon Glass April 29, 2020, 6:04 p.m. UTC | #1
On Wed, 29 Apr 2020 at 06:20, Patrice Chotard <patrice.chotard at st.com> wrote:
>
> Usage of lists_bind_fdt() in bind command imposes to add
> a compatible string for bind-test node.
> The other impact, is that bind-test node is binded at sandbox
> start, so no need to bind it in test_bind_unbind_with_node() test
>
> Signed-off-by: Patrice Chotard <patrice.chotard at st.com>
> ---
>
> Changes in v2: None
>
>  arch/sandbox/dts/test.dts  | 1 +
>  test/py/tests/test_bind.py | 3 ---
>  2 files changed, 1 insertion(+), 3 deletions(-)
>

Reviewed-by: Simon Glass <sjg at chromium.org>
diff mbox series

Patch

diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index df9f1835c9..7c6b14887f 100644
--- a/arch/sandbox/dts/test.dts
+++ b/arch/sandbox/dts/test.dts
@@ -131,6 +131,7 @@ 
 	};
 
 	bind-test {
+		compatible = "simple-bus";
 		bind-test-child1 {
 			compatible = "sandbox,phy";
 			#phy-cells = <1>;
diff --git a/test/py/tests/test_bind.py b/test/py/tests/test_bind.py
index 20c6050342..0b7cd9a808 100644
--- a/test/py/tests/test_bind.py
+++ b/test/py/tests/test_bind.py
@@ -25,9 +25,6 @@  def in_tree(response, name, uclass, drv, depth, last_child):
 @pytest.mark.buildconfigspec('cmd_bind')
 def test_bind_unbind_with_node(u_boot_console):
 
-	#bind /bind-test. Device should come up as well as its children
-	response = u_boot_console.run_command('bind  /bind-test generic_simple_bus')
-	assert response == ''
 	tree = u_boot_console.run_command('dm tree')
 	assert in_tree(tree, 'bind-test', 'simple_bus', 'generic_simple_bus', 0, True)
 	assert in_tree(tree, 'bind-test-child1', 'phy', 'phy_sandbox', 1, False)