OSDN Git Service

iio: accel: BMC150: add support for other Bosch chips
authorLaurentiu Palcu <laurentiu.palcu@intel.com>
Sun, 9 Feb 2014 10:30:00 +0000 (10:30 +0000)
committerJonathan Cameron <jic23@kernel.org>
Sat, 13 Sep 2014 20:35:46 +0000 (21:35 +0100)
commit8ecbb3c3c712d9c859586886d621e3b6175da972
treee4ba972d22b5b2f1c202353fc5310d229850e4e2
parentdc4ecaf21c4a0c060f2728d31bf492ceb2c8daaf
iio: accel: BMC150: add support for other Bosch chips

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>
drivers/iio/accel/Kconfig
drivers/iio/accel/bmc150-accel.c