ion: add test device for unit tests to interact with dma_bufs
authorColin Cross <ccross@android.com>
Fri, 13 Dec 2013 22:25:04 +0000 (14:25 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2013 16:57:19 +0000 (08:57 -0800)
commitceff95d49cc3e28c06c2352e8d94f56046271aeb
tree4dff74f65d36cf3ee3d4e3ad89b24290a25b39e7
parentc13d1df947f1c312143eda77a754149d0043e4d3
ion: add test device for unit tests to interact with dma_bufs

Add a /dev/ion-test device that will be created if CONFIG_ION_TEST
is set.  The device accepts a dma_buf fd and allows reading and
writing to the backing memory using DMA-like apis or kernel mapping
apis.  Can be used to test the dma_buf mapping ops, including
the ion implementations, from userspace.

Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ion/Kconfig
drivers/staging/android/ion/Makefile
drivers/staging/android/ion/ion_test.c [new file with mode: 0644]
drivers/staging/android/uapi/ion_test.h [new file with mode: 0644]