aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/accel/adxl345_i2c.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-08-19iio: adxl345: move null check for i2c id at start of probeAlexandru Ardelean1-1/+4
Fixes ef89f4b96a2 ("iio: adxl345: Add support for the ADXL375"). This was found via static checker. After looking into the code a bit, it's unlikely that there will be a NULL dereference if the `id` object in that specific code path. However, it's safe to add a NULL (paranoid) check just to make sure and remove any uncertainties. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-15iio: adxl345: Add support for the ADXL375Lars-Peter Clausen1-2/+5
The ADXL375 is fully register map compatible to the ADXL345 (including the device ID register returning the same value ...). The only difference is the resolution of the acceleration sensor. The ADXL375 can measure up to +-200g of acceleration. Datasheet: http://www.analog.com/media/en/technical-documentation/data-sheets/ADXL375.PDF Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mircea Caprioru <mircea.caprioru@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-03-04iio: accel: adxl345: Split driver into core and I2CEva Rachel Retuya1-0/+73
Move I2C-specific code into its own file and rely on regmap to access registers. The core code provides access to x, y, z and scale readings. Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>