]> git.dujemihanovic.xyz Git - u-boot.git/commit
sandbox: test: Add a second SPI slave on sandbox_spi bus
authorOvidiu Panait <ovidiu.panait@windriver.com>
Mon, 14 Dec 2020 17:06:47 +0000 (19:06 +0200)
committerSimon Glass <sjg@chromium.org>
Wed, 23 Dec 2020 03:39:25 +0000 (20:39 -0700)
commit1dc53ce71d961a0404c0d785fb0b66f351a7b730
treea7710af87cc6f698b8d8ea33391ef370d38f4ef7
parent1f6d618bb16e10bdba5cb08733e228367662b12c
sandbox: test: Add a second SPI slave on sandbox_spi bus

Place a second spi slave on the sandbox_spi bus, to be used by the
spi_claim_bus() testcase we are about to introduce. We need to make sure
that jumping between slaves calling spi_claim_bus() sets the bus speed and
mode appropriately. Use different max-hz and mode properties for this new
slave.

Also, update sandbox_spi cs_info call to allow activity on CS0/CS1 and
adapt dm_test_spi_find() testcase for this new setup.

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/sandbox/dts/test.dts
drivers/spi/sandbox_spi.c
test/dm/spi.c