mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
iio: accel: add support for IIS328DQ variant
Since the ST IIS328DQ accelerometer is compatible to the ST LIS331DL, just add the new compatible to the st_accel framework. Link: https://www.st.com/resource/en/datasheet/iis328dq.pdf Signed-off-by: Stefan Wahren <stefan.wahren@chargebyte.com> Link: https://lore.kernel.org/r/20230317103323.7741-6-stefan.wahren@chargebyte.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
f9dbd94ba8
commit
46e33707fe
@ -39,6 +39,7 @@
|
||||
#define LIS302DL_ACCEL_DEV_NAME "lis302dl"
|
||||
#define LSM303C_ACCEL_DEV_NAME "lsm303c_accel"
|
||||
#define SC7A20_ACCEL_DEV_NAME "sc7a20"
|
||||
#define IIS328DQ_ACCEL_DEV_NAME "iis328dq"
|
||||
|
||||
|
||||
#ifdef CONFIG_IIO_BUFFER
|
||||
|
@ -517,6 +517,7 @@ static const struct st_sensor_settings st_accel_sensors_settings[] = {
|
||||
.wai_addr = ST_SENSORS_DEFAULT_WAI_ADDRESS,
|
||||
.sensors_supported = {
|
||||
[0] = H3LIS331DL_ACCEL_DEV_NAME,
|
||||
[1] = IIS328DQ_ACCEL_DEV_NAME,
|
||||
},
|
||||
.ch = (struct iio_chan_spec *)st_accel_12bit_channels,
|
||||
.odr = {
|
||||
|
@ -119,6 +119,10 @@ static const struct of_device_id st_accel_of_match[] = {
|
||||
.compatible = "silan,sc7a20",
|
||||
.data = SC7A20_ACCEL_DEV_NAME,
|
||||
},
|
||||
{
|
||||
.compatible = "st,iis328dq",
|
||||
.data = IIS328DQ_ACCEL_DEV_NAME,
|
||||
},
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, st_accel_of_match);
|
||||
@ -157,6 +161,7 @@ static const struct i2c_device_id st_accel_id_table[] = {
|
||||
{ LIS302DL_ACCEL_DEV_NAME },
|
||||
{ LSM303C_ACCEL_DEV_NAME },
|
||||
{ SC7A20_ACCEL_DEV_NAME },
|
||||
{ IIS328DQ_ACCEL_DEV_NAME },
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, st_accel_id_table);
|
||||
|
@ -100,6 +100,10 @@ static const struct of_device_id st_accel_of_match[] = {
|
||||
.compatible = "st,lsm303c-accel",
|
||||
.data = LSM303C_ACCEL_DEV_NAME,
|
||||
},
|
||||
{
|
||||
.compatible = "st,iis328dq",
|
||||
.data = IIS328DQ_ACCEL_DEV_NAME,
|
||||
},
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, st_accel_of_match);
|
||||
@ -157,6 +161,7 @@ static const struct spi_device_id st_accel_id_table[] = {
|
||||
{ LIS3DE_ACCEL_DEV_NAME },
|
||||
{ LIS302DL_ACCEL_DEV_NAME },
|
||||
{ LSM303C_ACCEL_DEV_NAME },
|
||||
{ IIS328DQ_ACCEL_DEV_NAME },
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(spi, st_accel_id_table);
|
||||
|
Loading…
Reference in New Issue
Block a user