Skip to content

Commit

Permalink
iio: magn: Split bmc150 driver in common/i2c parts
Browse files Browse the repository at this point in the history
This is useful for easily adding SPI support in later patches.

Now bmc150_magn exports core functions to be used by I2C/SPI drivers
instances. For the moment only I2C driver is supported.

Signed-off-by: Daniel Baluta <[email protected]>
Acked-by: Irina Tirdea <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
  • Loading branch information
Daniel Baluta authored and jic23 committed Apr 18, 2016
1 parent 922b3aa commit 761b791
Show file tree
Hide file tree
Showing 5 changed files with 163 additions and 99 deletions.
17 changes: 10 additions & 7 deletions drivers/iio/magnetometer/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,25 @@ config AK09911
Deprecated: AK09911 is now supported by AK8975 driver.

config BMC150_MAGN
tristate "Bosch BMC150 Magnetometer Driver"
depends on I2C
select REGMAP_I2C
tristate
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.
config BMC150_MAGN_I2C
tristate "Bosch BMC150 I2C Magnetometer Driver"
depends on I2C
select BMC150_MAGN
select REGMAP_I2C
help
Say yes here to build support for the BMC150 magnetometer with
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.

To compile this driver as a module, choose M here: the module will be
called bmc150_magn.
called bmc150_magn_i2c.

config MAG3110
tristate "Freescale MAG3110 3-Axis Magnetometer"
Expand Down
2 changes: 2 additions & 0 deletions drivers/iio/magnetometer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_AK8975) += ak8975.o
obj-$(CONFIG_BMC150_MAGN) += bmc150_magn.o
obj-$(CONFIG_BMC150_MAGN_I2C) += bmc150_magn_i2c.o

obj-$(CONFIG_MAG3110) += mag3110.o
obj-$(CONFIG_HID_SENSOR_MAGNETOMETER_3D) += hid-sensor-magn-3d.o
obj-$(CONFIG_MMC35240) += mmc35240.o
Expand Down
Loading

0 comments on commit 761b791

Please sign in to comment.