mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
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>
This commit is contained in:
committed by
Jonathan Cameron
parent
9291766476
commit
c91746a236
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
984
drivers/iio/magnetometer/bmc150_magn.c
Normal file
984
drivers/iio/magnetometer/bmc150_magn.c
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user