summaryrefslogtreecommitdiff
path: root/drivers/iio/accel/st_accel_i2c.c
diff options
context:
space:
mode:
authorStephan Gerhold <stephan@gerhold.net>2023-01-06 11:22:38 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2023-01-08 13:01:02 +0000
commit23fd6f0bd6cbf010216a078a99dcbaa30c8bb5ae (patch)
treeecd6689bd0a7e0ce5bf5e0fa42796e4a91051821 /drivers/iio/accel/st_accel_i2c.c
parent4aaf3e40272d9699d84b04f09aa6c2166b7e4aba (diff)
iio: accel: st_accel: Add LSM303C
The accelerometer part of ST LSM303C is similar (perhaps even identical) to the already supported standalone LIS2HH12 accelerometer, so just add the new st,lsm303c-accel 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-3-stephan@gerhold.net Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/accel/st_accel_i2c.c')
-rw-r--r--drivers/iio/accel/st_accel_i2c.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/iio/accel/st_accel_i2c.c b/drivers/iio/accel/st_accel_i2c.c
index 45ee0ddc133c..3f02fd5d5946 100644
--- a/drivers/iio/accel/st_accel_i2c.c
+++ b/drivers/iio/accel/st_accel_i2c.c
@@ -112,6 +112,10 @@ static const struct of_device_id st_accel_of_match[] = {
.data = LIS302DL_ACCEL_DEV_NAME,
},
{
+ .compatible = "st,lsm303c-accel",
+ .data = LSM303C_ACCEL_DEV_NAME,
+ },
+ {
.compatible = "silan,sc7a20",
.data = SC7A20_ACCEL_DEV_NAME,
},
@@ -151,6 +155,7 @@ static const struct i2c_device_id st_accel_id_table[] = {
{ LIS2DE12_ACCEL_DEV_NAME },
{ LIS2HH12_ACCEL_DEV_NAME },
{ LIS302DL_ACCEL_DEV_NAME },
+ { LSM303C_ACCEL_DEV_NAME },
{ SC7A20_ACCEL_DEV_NAME },
{},
};