iio: accel: BMC150 accel support
cover iio: accel: BMC150 accel support
v1
Format of this driver is similar to BMG160 gyro as the register style for configuration is similar, but not same
- Any motion trigger as suggested similar to BMG160 gyro
- Formatting issues suggested during v0 review
- Addition of TEMP
- Run Time PM with auto suspend
v0
Basic version for review
Srinivas Pandruvada (2):
iio: accel: BMC150 accel support
iio: accel: BMC150 accel documentation
.../ABI/testing/sysfs-bus-iio-accel-bmc150 | 7 + drivers/iio/accel/Kconfig | 13 + drivers/iio/accel/Makefile | 1 + drivers/iio/accel/bmc150-accel.c | 1281 ++++++++++++++++++++ 4 files changed, 1302 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-accel-bmc150 create mode 100644 drivers/iio/accel/bmc150-accel.c
Signature · 1 line
1.9.1
PATCH 1/2 iio: accel: BMC150 accel support
This change implements BMC150 accelerometer driver. A BMC150 package consist of a compass and an accelerometer. This driver only implements accelerometer part.
Spec downloaded from:
http://ae-bst.resource.bosch.com/media/products/dokumente/bmc150/BST-BMC150-DS000-03.pdf
This sensor chip supports many advanced features, but this driver implements minimum feature set which is a must to be useful. This driver can be enhanced incrementally.
If the sensor vendor wants to update full featured version, they can substitute or enhance this driver when they get chance.
--- drivers/iio/accel/Kconfig | 13 + drivers/iio/accel/Makefile | 1 + drivers/iio/accel/bmc150-accel.c | 1281 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 1295 insertions(+) create mode 100644 drivers/iio/accel/bmc150-accel.c
drivers/iio/accel/Kconfig +13 -0
@@ -17,6 +17,19 @@ config BMA180 To compile this driver as a module, choose M here: the module will be called bma180. +config BMC150_ACCEL + tristate "Bosch BMC150 Accelerometer Driver" + depends on I2C + select IIO_BUFFER + select IIO_TRIGGERED_BUFFER + help + Say yes here to build support for the Bosch BMC150 accelerometer. + 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 accelerometer part, which has + its own address and register map. + config HID_SENSOR_ACCEL_3D depends on HID_SENSOR_HUB select IIO_BUFFER
drivers/iio/accel/Makefile +1 -0
@@ -4,6 +4,7 @@ # When adding new entries keep the list in alphabetical order obj-$(CONFIG_BMA180) += bma180.o +obj-$(CONFIG_BMC150_ACCEL) += bmc150-accel.o obj-$(CONFIG_HID_SENSOR_ACCEL_3D) += hid-sensor-accel-3d.o obj-$(CONFIG_KXCJK1013) += kxcjk-1013.o obj-$(CONFIG_KXSD9) += kxsd9.o
drivers/iio/accel/bmc150-accel.c new file +1281 -0
1,281 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 2/2 iio: accel: BMC150 accel documentation
In reply to Srinivas PandruvadaAdded any-motion trigger documentation.
--- Documentation/ABI/testing/sysfs-bus-iio-accel-bmc150 | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-accel-bmc150
Documentation/ABI/testing/sysfs-bus-iio-accel-bmc150 new file +7 -0
@@ -0,0 +1,7 @@ +What: /sys/bus/iio/devices/triggerX/name = "bmc150_accel-any-motion-devX" +KernelVersion: 3.17 +Contact: [email protected] +Description: + The BMC150 accelerometer kernel module provides an additional trigger, + which sets driver in a mode, where data is pushed to the buffer + only when there is any motion.
Signature · 1 line
1.9.1