Skip to content

Commit c91746a

Browse files
itirdeajic23
authored andcommitted
iio: magn: Add support for BMC150 magnetometer
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>
1 parent 9291766 commit c91746a

3 files changed

Lines changed: 1000 additions & 0 deletions

File tree

‎drivers/iio/magnetometer/Kconfig‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,18 @@ config IIO_ST_MAGN_SPI_3AXIS
7676
depends on IIO_ST_MAGN_3AXIS
7777
depends on IIO_ST_SENSORS_SPI
7878

79+
config BMC150_MAGN
80+
tristate "Bosch BMC150 Magnetometer Driver"
81+
depends on I2C
82+
select IIO_BUFFER
83+
select IIO_TRIGGERED_BUFFER
84+
help
85+
Say yes here to build support for the BMC150 magnetometer.
86+
87+
Currently this only supports the device via an i2c interface.
88+
89+
This is a combo module with both accelerometer and magnetometer.
90+
This driver is only implementing magnetometer part, which has
91+
its own address and register map.
92+
7993
endmenu

‎drivers/iio/magnetometer/Makefile‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ st_magn-$(CONFIG_IIO_BUFFER) += st_magn_buffer.o
1313

1414
obj-$(CONFIG_IIO_ST_MAGN_I2C_3AXIS) += st_magn_i2c.o
1515
obj-$(CONFIG_IIO_ST_MAGN_SPI_3AXIS) += st_magn_spi.o
16+
17+
obj-$(CONFIG_BMC150_MAGN) += bmc150_magn.o

0 commit comments

Comments
 (0)