Commit fdadbce0 authored by Oleksandr Kravchenko's avatar Oleksandr Kravchenko Committed by Jonathan Cameron

iio: add Bosch BMA180 acceleration sensor driver

This patch adds IIO driver for Bosch BMA180 triaxial
acceleration sensor.
http://dlnmh9ip6v2uc.cloudfront.net/datasheets/
		Sensors/Accelerometers/BST-BMA180-DS000-07_2.pdf
Signed-off-by: default avatarOleksandr Kravchenko <o.v.kravchenko@globallogic.com>
Acked-by: default avatarStephen Warren <swarren@nvidia.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 63fa65d3
* Bosch BMA180 triaxial acceleration sensor
http://omapworld.com/BMA180_111_1002839.pdf
Required properties:
- compatible : should be "bosch,bma180"
- reg : the I2C address of the sensor
Optional properties:
- interrupt-parent : should be the phandle for the interrupt controller
- interrupts : interrupt mapping for GPIO IRQ, it should by configured with
flags IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING
Example:
bma180@40 {
compatible = "bosch,bma180";
reg = <0x40>;
interrupt-parent = <&gpio6>;
interrupts = <18 (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING)>;
};
...@@ -5,6 +5,18 @@ ...@@ -5,6 +5,18 @@
menu "Accelerometers" menu "Accelerometers"
config BMA180
tristate "Bosch BMA180 3-Axis Accelerometer Driver"
depends on I2C
select IIO_BUFFER
select IIO_TRIGGERED_BUFFER
help
Say Y here if you want to build a driver for the Bosch BMA180
triaxial acceleration sensor.
To compile this driver as a module, choose M here: the
module will be called bma180.
config HID_SENSOR_ACCEL_3D config HID_SENSOR_ACCEL_3D
depends on HID_SENSOR_HUB depends on HID_SENSOR_HUB
select IIO_BUFFER select IIO_BUFFER
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
# #
# When adding new entries keep the list in alphabetical order # When adding new entries keep the list in alphabetical order
obj-$(CONFIG_BMA180) += bma180.o
obj-$(CONFIG_HID_SENSOR_ACCEL_3D) += hid-sensor-accel-3d.o obj-$(CONFIG_HID_SENSOR_ACCEL_3D) += hid-sensor-accel-3d.o
obj-$(CONFIG_KXSD9) += kxsd9.o obj-$(CONFIG_KXSD9) += kxsd9.o
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment