iio: accel: Add support for Freescale MMA7660FC
PATCH 1/1 iio: accel: Add support for Freescale MMA7660FC
Minimal implementation of an IIO driver for the Freescale MMA7660FC 3-axis accelerometer. Datasheet:
http://www.freescale.com.cn/files/sensors/doc/data_sheet/MMA7660FC.pdf
Includes:
- ACPI support;
- read_raw for x,y,z axes;
- reading and setting the scale (range) parameter.
- power management
Signed-off-by Constantin Musca <[email protected]>
--- drivers/iio/accel/Kconfig | 10 ++ drivers/iio/accel/Makefile | 2 + drivers/iio/accel/mma7660.c | 275 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 287 insertions(+) create mode 100644 drivers/iio/accel/mma7660.c
drivers/iio/accel/Kconfig +10 -0
@@ -54,6 +54,16 @@ config HID_SENSOR_ACCEL_3D To compile this driver as a module, choose M here: the module will be called hid-sensor-accel-3d. +config MMA7660 + tristate "Freescale MMA7660FC 3-Axis Accelerometer Driver" + depends on I2C + help + Say yes here to get support for the Freescale MMA7660FC 3-Axis + accelerometer. + + Choosing M will build the driver as a module. If so, the module + will be called grove_accel. + config IIO_ST_ACCEL_3AXIS tristate "STMicroelectronics accelerometers 3-Axis Driver" depends on (I2C || SPI_MASTER) && SYSFS
drivers/iio/accel/Makefile +2 -0
@@ -15,6 +15,8 @@ obj-$(CONFIG_MMA7455) += mma7455_core.o obj-$(CONFIG_MMA7455_I2C) += mma7455_i2c.o obj-$(CONFIG_MMA7455_SPI) += mma7455_spi.o +obj-$(CONFIG_MMA7660) += mma7660.o + obj-$(CONFIG_MMA8452) += mma8452.o obj-$(CONFIG_MMA9551_CORE) += mma9551_core.o
drivers/iio/accel/mma7660.c new file +275 -0
275 lines not on this page · raw message
Signature · 1 line
1.9.1