iio: accel: kxsd9: Split out SPI transport
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 1 Sep 2016 09:44:38 +0000 (11:44 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 18 Sep 2016 10:26:53 +0000 (11:26 +0100)
commitbf96f6e80cef4b9a234e8ce81aa2e333ca7ce599
treed3861d639b33ec4309fe9114ed1617c8f1ac439e
parent154021a317564a600fb5b8e6eba9a76ca6888310
iio: accel: kxsd9: Split out SPI transport

This moves the KXSD9 SPI transport out to its own file and Kconfig
entry, so that we will be able to add another transport method.
We export the common probe and add a local header file for the
functionality shared between the main driver and the transport
driver.

We make the SPI transport the default for the driver if SPI is
available and the KXSD9 driver was selected, so the oldconfig
upgrade path will be clear.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/accel/Kconfig
drivers/iio/accel/Makefile
drivers/iio/accel/kxsd9-spi.c [new file with mode: 0644]
drivers/iio/accel/kxsd9.c
drivers/iio/accel/kxsd9.h [new file with mode: 0644]