]> git.baikalelectronics.ru Git - kernel.git/commit
iio: pressure: bmp280: add SPI interface driver
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 30 Jun 2016 01:48:51 +0000 (03:48 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 3 Jul 2016 10:27:15 +0000 (11:27 +0100)
commit99fdcf0a3062b81e3334e5c7ed028a7c2d8fe277
tree3d71bd25de6154b155409b5b7637293e564769b2
parentfa09fc91c089bc1293d9597dea16453fee460b33
iio: pressure: bmp280: add SPI interface driver

This patch mimics the SPI functionality found in the misc driver in
drivers/misc/bh085-spi.c to make it possible to reuse the existing
BMP280/BMP180/BMP085 driver with all clients of the other driver.
The adoption is straight-forward since like the other driver, it is
a simple matter of using regmap.

This driver is also so obviously inspired/copied from the old misc
driver in drivers/misc/bmp085.c that I just took the liberty to
add in the authors of the other drivers + self in the core driver
file.

The MISC driver also supports a variant named "BMP181" so include
that here to be complete in comparison to the old driver.

The bus mapping code for SPI was written by Akinobu Mita.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Tested-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/pressure/Kconfig
drivers/iio/pressure/Makefile
drivers/iio/pressure/bmp280-core.c
drivers/iio/pressure/bmp280-spi.c [new file with mode: 0644]