diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2015-04-30 16:15:50 +0300 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-05-07 12:42:34 +0300 |
commit | 1038a6872802bb4a07f627162ff989bf49e2e5cc (patch) | |
tree | ef6ecde1b4806c79c8c798741b63c2b8c4ca635c /drivers/iio/magnetometer/st_magn_i2c.c | |
parent | 5e02bac3172fcad964eeef70ad21f583982a6eba (diff) | |
download | linux-1038a6872802bb4a07f627162ff989bf49e2e5cc.tar.xz |
iio: magnetometer: support for lsm303dlh
The LSM303DLH accelerometer/magnetometer has a different
device identification method than using register 0x0f, instead
three registers contain a magic value. We rely on WhoAmI
to be zero for this variant.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/magnetometer/st_magn_i2c.c')
-rw-r--r-- | drivers/iio/magnetometer/st_magn_i2c.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/iio/magnetometer/st_magn_i2c.c b/drivers/iio/magnetometer/st_magn_i2c.c index 92e5c15452a3..5311d8aea8cc 100644 --- a/drivers/iio/magnetometer/st_magn_i2c.c +++ b/drivers/iio/magnetometer/st_magn_i2c.c @@ -21,6 +21,10 @@ #ifdef CONFIG_OF static const struct of_device_id st_magn_of_match[] = { { + .compatible = "st,lsm303dlh-magn", + .data = LSM303DLH_MAGN_DEV_NAME, + }, + { .compatible = "st,lsm303dlhc-magn", .data = LSM303DLHC_MAGN_DEV_NAME, }, @@ -71,6 +75,7 @@ static int st_magn_i2c_remove(struct i2c_client *client) } static const struct i2c_device_id st_magn_id_table[] = { + { LSM303DLH_MAGN_DEV_NAME }, { LSM303DLHC_MAGN_DEV_NAME }, { LSM303DLM_MAGN_DEV_NAME }, { LIS3MDL_MAGN_DEV_NAME }, |