iio: adxl345: Add support for the ADXL375
[linux-2.6-block.git] / drivers / iio / accel / adxl345_spi.c
index 6d658196f81c1018e439222fc7f041ba13e1ea3f..67b7c66a84929f49f819e8e3a6e078780b84828f 100644 (file)
@@ -42,7 +42,7 @@ static int adxl345_spi_probe(struct spi_device *spi)
                return PTR_ERR(regmap);
        }
 
-       return adxl345_core_probe(&spi->dev, regmap, id->name);
+       return adxl345_core_probe(&spi->dev, regmap, id->driver_data, id->name);
 }
 
 static int adxl345_spi_remove(struct spi_device *spi)
@@ -51,7 +51,8 @@ static int adxl345_spi_remove(struct spi_device *spi)
 }
 
 static const struct spi_device_id adxl345_spi_id[] = {
-       { "adxl345", 0 },
+       { "adxl345", ADXL345 },
+       { "adxl375", ADXL375 },
        { }
 };
 
@@ -59,6 +60,7 @@ MODULE_DEVICE_TABLE(spi, adxl345_spi_id);
 
 static const struct of_device_id adxl345_of_match[] = {
        { .compatible = "adi,adxl345" },
+       { .compatible = "adi,adxl375" },
        { },
 };