Skip to content

Commit

Permalink
iio: magn: Add support for BMC150 magnetometer
Browse files Browse the repository at this point in the history
Add support for the Bosh BMC150 Magnetometer.
The specification can be downloaded from:
http://ae-bst.resource.bosch.com/media/products/dokumente/bmc150/BST-BMC150-DS000-04.pdf.
The chip contains both an accelerometer and a magnetometer.
This patch adds support only for the magnetometer part.

The temperature compensation formulas are based on bmm050_api.c
authored by contact@bosch.sensortec.com.

Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
  • Loading branch information
Irina Tirdea authored and Jonathan Cameron committed May 10, 2015
1 parent 9291766 commit c91746a
Show file tree
Hide file tree
Showing 3 changed files with 1,000 additions and 0 deletions.
14 changes: 14 additions & 0 deletions drivers/iio/magnetometer/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,18 @@ config IIO_ST_MAGN_SPI_3AXIS
depends on IIO_ST_MAGN_3AXIS
depends on IIO_ST_SENSORS_SPI

config BMC150_MAGN
tristate "Bosch BMC150 Magnetometer Driver"
depends on I2C
select IIO_BUFFER
select IIO_TRIGGERED_BUFFER
help
Say yes here to build support for the BMC150 magnetometer.

Currently this only supports the device via an i2c interface.

This is a combo module with both accelerometer and magnetometer.
This driver is only implementing magnetometer part, which has
its own address and register map.

endmenu
2 changes: 2 additions & 0 deletions drivers/iio/magnetometer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ st_magn-$(CONFIG_IIO_BUFFER) += st_magn_buffer.o

obj-$(CONFIG_IIO_ST_MAGN_I2C_3AXIS) += st_magn_i2c.o
obj-$(CONFIG_IIO_ST_MAGN_SPI_3AXIS) += st_magn_spi.o

obj-$(CONFIG_BMC150_MAGN) += bmc150_magn.o
Loading

0 comments on commit c91746a

Please sign in to comment.