diff options
author | Stephan Gerhold <stephan@gerhold.net> | 2023-01-06 11:22:39 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2023-01-08 13:01:02 +0000 |
commit | 721a2a7edcdd10f55ef7d3cf74fc276b0d4177e8 (patch) | |
tree | e93455d5e234c172498c34f4029d0eed8da68e2a /drivers/iio/magnetometer/st_magn_i2c.c | |
parent | 23fd6f0bd6cbf010216a078a99dcbaa30c8bb5ae (diff) | |
download | linux-stable-721a2a7edcdd10f55ef7d3cf74fc276b0d4177e8.tar.gz linux-stable-721a2a7edcdd10f55ef7d3cf74fc276b0d4177e8.tar.bz2 linux-stable-721a2a7edcdd10f55ef7d3cf74fc276b0d4177e8.zip |
iio: magnetometer: st_magn: Add LSM303C
The magnetometer part of ST LSM303C is similar (perhaps even identical)
to the already supported standalone LIS3MDL magnetometer, so just
add the new st,lsm303c-magn compatible for the existing definitions.
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230106102239.9647-4-stephan@gerhold.net
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
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 b4098d3b3813..cc0e0e94b129 100644 --- a/drivers/iio/magnetometer/st_magn_i2c.c +++ b/drivers/iio/magnetometer/st_magn_i2c.c @@ -50,6 +50,10 @@ static const struct of_device_id st_magn_of_match[] = { .compatible = "st,iis2mdc", .data = IIS2MDC_MAGN_DEV_NAME, }, + { + .compatible = "st,lsm303c-magn", + .data = LSM303C_MAGN_DEV_NAME, + }, {}, }; MODULE_DEVICE_TABLE(of, st_magn_of_match); @@ -97,6 +101,7 @@ static const struct i2c_device_id st_magn_id_table[] = { { LIS2MDL_MAGN_DEV_NAME }, { LSM9DS1_MAGN_DEV_NAME }, { IIS2MDC_MAGN_DEV_NAME }, + { LSM303C_MAGN_DEV_NAME }, {}, }; MODULE_DEVICE_TABLE(i2c, st_magn_id_table); |