mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-12 08:09:56 +00:00
iio: st_gyro: Add lsm9ds0-gyro support
This device has an identical interface to other supported sensors and the patch only adds IDs. Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
parent
f21122593d
commit
41c128cb25
@ -51,6 +51,7 @@ Gyroscopes:
|
|||||||
- st,l3gd20-gyro
|
- st,l3gd20-gyro
|
||||||
- st,l3g4is-gyro
|
- st,l3g4is-gyro
|
||||||
- st,lsm330-gyro
|
- st,lsm330-gyro
|
||||||
|
- st,lsm9ds0-gyro
|
||||||
|
|
||||||
Magnetometers:
|
Magnetometers:
|
||||||
- st,lsm303agr-magn
|
- st,lsm303agr-magn
|
||||||
|
@ -93,7 +93,7 @@ config IIO_ST_GYRO_3AXIS
|
|||||||
select IIO_TRIGGERED_BUFFER if (IIO_BUFFER)
|
select IIO_TRIGGERED_BUFFER if (IIO_BUFFER)
|
||||||
help
|
help
|
||||||
Say yes here to build support for STMicroelectronics gyroscopes:
|
Say yes here to build support for STMicroelectronics gyroscopes:
|
||||||
L3G4200D, LSM330DL, L3GD20, LSM330DLC, L3G4IS, LSM330.
|
L3G4200D, LSM330DL, L3GD20, LSM330DLC, L3G4IS, LSM330, LSM9DS0.
|
||||||
|
|
||||||
This driver can also be built as a module. If so, these modules
|
This driver can also be built as a module. If so, these modules
|
||||||
will be created:
|
will be created:
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#define L3GD20_GYRO_DEV_NAME "l3gd20"
|
#define L3GD20_GYRO_DEV_NAME "l3gd20"
|
||||||
#define L3G4IS_GYRO_DEV_NAME "l3g4is_ui"
|
#define L3G4IS_GYRO_DEV_NAME "l3g4is_ui"
|
||||||
#define LSM330_GYRO_DEV_NAME "lsm330_gyro"
|
#define LSM330_GYRO_DEV_NAME "lsm330_gyro"
|
||||||
|
#define LSM9DS0_GYRO_DEV_NAME "lsm9ds0_gyro"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct st_sensors_platform_data - gyro platform data
|
* struct st_sensors_platform_data - gyro platform data
|
||||||
|
@ -204,6 +204,7 @@ static const struct st_sensor_settings st_gyro_sensors_settings[] = {
|
|||||||
[2] = LSM330DLC_GYRO_DEV_NAME,
|
[2] = LSM330DLC_GYRO_DEV_NAME,
|
||||||
[3] = L3G4IS_GYRO_DEV_NAME,
|
[3] = L3G4IS_GYRO_DEV_NAME,
|
||||||
[4] = LSM330_GYRO_DEV_NAME,
|
[4] = LSM330_GYRO_DEV_NAME,
|
||||||
|
[5] = LSM9DS0_GYRO_DEV_NAME,
|
||||||
},
|
},
|
||||||
.ch = (struct iio_chan_spec *)st_gyro_16bit_channels,
|
.ch = (struct iio_chan_spec *)st_gyro_16bit_channels,
|
||||||
.odr = {
|
.odr = {
|
||||||
|
@ -48,6 +48,10 @@ static const struct of_device_id st_gyro_of_match[] = {
|
|||||||
.compatible = "st,lsm330-gyro",
|
.compatible = "st,lsm330-gyro",
|
||||||
.data = LSM330_GYRO_DEV_NAME,
|
.data = LSM330_GYRO_DEV_NAME,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.compatible = "st,lsm9ds0-gyro",
|
||||||
|
.data = LSM9DS0_GYRO_DEV_NAME,
|
||||||
|
},
|
||||||
{},
|
{},
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(of, st_gyro_of_match);
|
MODULE_DEVICE_TABLE(of, st_gyro_of_match);
|
||||||
@ -93,6 +97,7 @@ static const struct i2c_device_id st_gyro_id_table[] = {
|
|||||||
{ L3GD20_GYRO_DEV_NAME },
|
{ L3GD20_GYRO_DEV_NAME },
|
||||||
{ L3G4IS_GYRO_DEV_NAME },
|
{ L3G4IS_GYRO_DEV_NAME },
|
||||||
{ LSM330_GYRO_DEV_NAME },
|
{ LSM330_GYRO_DEV_NAME },
|
||||||
|
{ LSM9DS0_GYRO_DEV_NAME },
|
||||||
{},
|
{},
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(i2c, st_gyro_id_table);
|
MODULE_DEVICE_TABLE(i2c, st_gyro_id_table);
|
||||||
|
@ -54,6 +54,7 @@ static const struct spi_device_id st_gyro_id_table[] = {
|
|||||||
{ L3GD20_GYRO_DEV_NAME },
|
{ L3GD20_GYRO_DEV_NAME },
|
||||||
{ L3G4IS_GYRO_DEV_NAME },
|
{ L3G4IS_GYRO_DEV_NAME },
|
||||||
{ LSM330_GYRO_DEV_NAME },
|
{ LSM330_GYRO_DEV_NAME },
|
||||||
|
{ LSM9DS0_GYRO_DEV_NAME },
|
||||||
{},
|
{},
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(spi, st_gyro_id_table);
|
MODULE_DEVICE_TABLE(spi, st_gyro_id_table);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user