Skip to content

Commit

Permalink
iio: accel: BMC150: add support for other Bosch chips
Browse files Browse the repository at this point in the history
The following chips are either similar or have only the resolution
different. Hence, change this driver to support these chips too:

BMI055  - combo chip (accelerometer part is identical to BMC150's)
BMA255  - identical to BMC150's accelerometer
BMA222E - 8 bit resolution
BMA250E - 10 bit resolution
BMA280  - 14 bit resolution

Additionally:
 * add bmc150_accel_match_acpi_device() function to check that the device
   has been enumerated through ACPI;
 * rename bmc150_accel_acpi_gpio_probe() to bmc150_accel_gpio_probe()
   since the ACPI matching has been moved to the new function.  Also, this
   will allow for the GPIO matching to be done against a device tree too, not only
   ACPI tree;
 * rename bmc150_scale_info struct member 'range' to 'reg_range' to be
   consistent with the naming convention used elsewhere in the driver
   and declare it u8, instead of int;
 * change CONFIG description to list all supported chips;

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
  • Loading branch information
Laurentiu Palcu authored and Jonathan Cameron committed Sep 13, 2014
1 parent dc4ecaf commit 8ecbb3c
Show file tree
Hide file tree
Showing 2 changed files with 178 additions and 60 deletions.
4 changes: 3 additions & 1 deletion drivers/iio/accel/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ config BMC150_ACCEL
select IIO_BUFFER
select IIO_TRIGGERED_BUFFER
help
Say yes here to build support for the Bosch BMC150 accelerometer.
Say yes here to build support for the following Bosch accelerometers:
BMC150, BMI055, BMA250E, BMA222E, BMA255, BMA280.

Currently this only supports the device via an i2c interface.

This is a combo module with both accelerometer and magnetometer.
Expand Down
Loading

0 comments on commit 8ecbb3c

Please sign in to comment.