iio: adxl345: Add support for the ADXL375
[linux-2.6-block.git] / drivers / iio / accel / adxl345_i2c.c
index 05e1ec49700c93410609a5730cf1a4775191bd11..785c89de91e7b28373addfcdda7c975147027d3d 100644 (file)
@@ -34,7 +34,8 @@ static int adxl345_i2c_probe(struct i2c_client *client,
                return PTR_ERR(regmap);
        }
 
-       return adxl345_core_probe(&client->dev, regmap, id ? id->name : NULL);
+       return adxl345_core_probe(&client->dev, regmap, id->driver_data,
+                                 id ? id->name : NULL);
 }
 
 static int adxl345_i2c_remove(struct i2c_client *client)
@@ -43,7 +44,8 @@ static int adxl345_i2c_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id adxl345_i2c_id[] = {
-       { "adxl345", 0 },
+       { "adxl345", ADXL345 },
+       { "adxl375", ADXL375 },
        { }
 };
 
@@ -51,6 +53,7 @@ MODULE_DEVICE_TABLE(i2c, adxl345_i2c_id);
 
 static const struct of_device_id adxl345_of_match[] = {
        { .compatible = "adi,adxl345" },
+       { .compatible = "adi,adxl375" },
        { },
 };