iio: accel: add support for LIS302DL variant
Add support for STMicroelectronics LIS302DL accelerometer to the st_accel framework. Datasheet: https://www.st.com/resource/en/datasheet/lis302dl.pdf Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220307132502.73854-4-absicsz@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
a85257f0df
commit
8a7449d686
@ -36,8 +36,10 @@
|
||||
#define LIS3DE_ACCEL_DEV_NAME "lis3de"
|
||||
#define LIS2DE12_ACCEL_DEV_NAME "lis2de12"
|
||||
#define LIS2HH12_ACCEL_DEV_NAME "lis2hh12"
|
||||
#define LIS302DL_ACCEL_DEV_NAME "lis302dl"
|
||||
#define SC7A20_ACCEL_DEV_NAME "sc7a20"
|
||||
|
||||
|
||||
#ifdef CONFIG_IIO_BUFFER
|
||||
int st_accel_allocate_ring(struct iio_dev *indio_dev);
|
||||
int st_accel_trig_set_state(struct iio_trigger *trig, bool state);
|
||||
|
@ -444,6 +444,7 @@ static const struct st_sensor_settings st_accel_sensors_settings[] = {
|
||||
.wai_addr = ST_SENSORS_DEFAULT_WAI_ADDRESS,
|
||||
.sensors_supported = {
|
||||
[0] = LIS331DL_ACCEL_DEV_NAME,
|
||||
[1] = LIS302DL_ACCEL_DEV_NAME,
|
||||
},
|
||||
.ch = (struct iio_chan_spec *)st_accel_8bit_channels,
|
||||
.odr = {
|
||||
|
@ -107,6 +107,10 @@ static const struct of_device_id st_accel_of_match[] = {
|
||||
.compatible = "st,lis2hh12",
|
||||
.data = LIS2HH12_ACCEL_DEV_NAME,
|
||||
},
|
||||
{
|
||||
.compatible = "st,lis302dl",
|
||||
.data = LIS302DL_ACCEL_DEV_NAME,
|
||||
},
|
||||
{
|
||||
.compatible = "silan,sc7a20",
|
||||
.data = SC7A20_ACCEL_DEV_NAME,
|
||||
@ -146,6 +150,7 @@ static const struct i2c_device_id st_accel_id_table[] = {
|
||||
{ LIS3DE_ACCEL_DEV_NAME },
|
||||
{ LIS2DE12_ACCEL_DEV_NAME },
|
||||
{ LIS2HH12_ACCEL_DEV_NAME },
|
||||
{ LIS302DL_ACCEL_DEV_NAME },
|
||||
{ SC7A20_ACCEL_DEV_NAME },
|
||||
{},
|
||||
};
|
||||
|
@ -92,6 +92,10 @@ static const struct of_device_id st_accel_of_match[] = {
|
||||
.compatible = "st,lis3de",
|
||||
.data = LIS3DE_ACCEL_DEV_NAME,
|
||||
},
|
||||
{
|
||||
.compatible = "st,lis302dl",
|
||||
.data = LIS302DL_ACCEL_DEV_NAME,
|
||||
},
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, st_accel_of_match);
|
||||
@ -147,6 +151,7 @@ static const struct spi_device_id st_accel_id_table[] = {
|
||||
{ LIS2DW12_ACCEL_DEV_NAME },
|
||||
{ LIS3DHH_ACCEL_DEV_NAME },
|
||||
{ LIS3DE_ACCEL_DEV_NAME },
|
||||
{ LIS302DL_ACCEL_DEV_NAME },
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(spi, st_accel_id_table);
|
||||
|
Loading…
Reference in New Issue
Block a user