spi: add loopback test driver to allow for spi_master regression tests
authorMartin Sperl <kernel@martin.sperl.org>
Fri, 27 Nov 2015 13:56:04 +0000 (13:56 +0000)
committerMark Brown <broonie@kernel.org>
Sat, 12 Dec 2015 23:05:18 +0000 (23:05 +0000)
commit84e0c4e5e2c4ef42b9c6f6d4151973a297ee4656
tree9a78b4fea6b78e2375a7411d530bb78a54a5e307
parent49ddedf3bfcb59a562c7db0e50aecd1422e9cdc9
spi: add loopback test driver to allow for spi_master regression tests

This driver is submitting lots of distinct spi-messages messages
with all kinds of alignments and length pattern.
Also distinct kinds of transfer pattern tests are implemented
(rx, tx, rx/tx, tx+tx, tx+rx,...)

Right now on a raspberry pi 752 distinct spi_messages are executed
in 13 different scenarios.

Configuration of additional test-pattern is easy, so that when
new bugs in drivers get detected the relevant transfer pattern can
also get added to the test framework, so that such situations are
detected in other drivers as well.

The idea behind this driver is to make it possible to also detect
regressions in spi_master implementations when changes occur.
Potentially these tests could get executed automatically in a
test-server-farm.

Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-loopback-test.c [new file with mode: 0644]
drivers/spi/spi-test.h [new file with mode: 0644]