* [PATCH] iio: imu: st_lsm6dsx: enable 833Hz sample frequency for tagged sensors
@ 2020-04-24 10:44 Lorenzo Bianconi
2020-04-25 17:05 ` Jonathan Cameron
0 siblings, 1 reply; 3+ messages in thread
From: Lorenzo Bianconi @ 2020-04-24 10:44 UTC (permalink / raw)
To: jic23; +Cc: linux-iio, lorenzo.bianconi
Enable 833Hz ODR for sensors that supports tagged hw FIFO:
- LSM6DSO/LSM6DSOX
- LSM6DSR/LSM6DSRX
- ASM330LHH
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 21 +++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
index 84d219ae6aee..e6339bbb4469 100644
--- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
+++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
@@ -27,7 +27,8 @@
* - FIFO size: 4KB
*
* - LSM6DSO/LSM6DSOX/ASM330LHH/LSM6DSR/ISM330DHCX:
- * - Accelerometer/Gyroscope supported ODR [Hz]: 13, 26, 52, 104, 208, 416
+ * - Accelerometer/Gyroscope supported ODR [Hz]: 13, 26, 52, 104, 208, 416,
+ * 833
* - Accelerometer supported full-scale [g]: +-2/+-4/+-8/+-16
* - Gyroscope supported full-scale [dps]: +-125/+-245/+-500/+-1000/+-2000
* - FIFO size: 3KB
@@ -791,7 +792,8 @@ static const struct st_lsm6dsx_settings st_lsm6dsx_sensor_settings[] = {
.odr_avl[3] = { 104000, 0x04 },
.odr_avl[4] = { 208000, 0x05 },
.odr_avl[5] = { 416000, 0x06 },
- .odr_len = 6,
+ .odr_avl[6] = { 833000, 0x07 },
+ .odr_len = 7,
},
[ST_LSM6DSX_ID_GYRO] = {
.reg = {
@@ -804,7 +806,8 @@ static const struct st_lsm6dsx_settings st_lsm6dsx_sensor_settings[] = {
.odr_avl[3] = { 104000, 0x04 },
.odr_avl[4] = { 208000, 0x05 },
.odr_avl[5] = { 416000, 0x06 },
- .odr_len = 6,
+ .odr_avl[6] = { 833000, 0x07 },
+ .odr_len = 7,
},
},
.fs_table = {
@@ -994,7 +997,8 @@ static const struct st_lsm6dsx_settings st_lsm6dsx_sensor_settings[] = {
.odr_avl[3] = { 104000, 0x04 },
.odr_avl[4] = { 208000, 0x05 },
.odr_avl[5] = { 416000, 0x06 },
- .odr_len = 6,
+ .odr_avl[6] = { 833000, 0x07 },
+ .odr_len = 7,
},
[ST_LSM6DSX_ID_GYRO] = {
.reg = {
@@ -1007,7 +1011,8 @@ static const struct st_lsm6dsx_settings st_lsm6dsx_sensor_settings[] = {
.odr_avl[3] = { 104000, 0x04 },
.odr_avl[4] = { 208000, 0x05 },
.odr_avl[5] = { 416000, 0x06 },
- .odr_len = 6,
+ .odr_avl[6] = { 833000, 0x07 },
+ .odr_len = 7,
},
},
.fs_table = {
@@ -1171,7 +1176,8 @@ static const struct st_lsm6dsx_settings st_lsm6dsx_sensor_settings[] = {
.odr_avl[3] = { 104000, 0x04 },
.odr_avl[4] = { 208000, 0x05 },
.odr_avl[5] = { 416000, 0x06 },
- .odr_len = 6,
+ .odr_avl[6] = { 833000, 0x07 },
+ .odr_len = 7,
},
[ST_LSM6DSX_ID_GYRO] = {
.reg = {
@@ -1184,7 +1190,8 @@ static const struct st_lsm6dsx_settings st_lsm6dsx_sensor_settings[] = {
.odr_avl[3] = { 104000, 0x04 },
.odr_avl[4] = { 208000, 0x05 },
.odr_avl[5] = { 416000, 0x06 },
- .odr_len = 6,
+ .odr_avl[6] = { 833000, 0x07 },
+ .odr_len = 7,
},
},
.fs_table = {
--
2.25.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: imu: st_lsm6dsx: enable 833Hz sample frequency for tagged sensors
2020-04-24 10:44 [PATCH] iio: imu: st_lsm6dsx: enable 833Hz sample frequency for tagged sensors Lorenzo Bianconi
@ 2020-04-25 17:05 ` Jonathan Cameron
2020-04-26 14:28 ` Lorenzo Bianconi
0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Cameron @ 2020-04-25 17:05 UTC (permalink / raw)
To: Lorenzo Bianconi; +Cc: linux-iio, lorenzo.bianconi
On Fri, 24 Apr 2020 12:44:38 +0200
Lorenzo Bianconi <lorenzo@kernel.org> wrote:
> Enable 833Hz ODR for sensors that supports tagged hw FIFO:
> - LSM6DSO/LSM6DSOX
> - LSM6DSR/LSM6DSRX
> - ASM330LHH
>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Would ideally have liked a little more info on the 'why'. Was this previously
capped by practicality - i.e. not possible to read faster or is there
something else going on here?
Don't really need to know for the applied patch though so
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.
Thanks,
Jonathan
> ---
> drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 21 +++++++++++++-------
> 1 file changed, 14 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
> index 84d219ae6aee..e6339bbb4469 100644
> --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
> +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
> @@ -27,7 +27,8 @@
> * - FIFO size: 4KB
> *
> * - LSM6DSO/LSM6DSOX/ASM330LHH/LSM6DSR/ISM330DHCX:
> - * - Accelerometer/Gyroscope supported ODR [Hz]: 13, 26, 52, 104, 208, 416
> + * - Accelerometer/Gyroscope supported ODR [Hz]: 13, 26, 52, 104, 208, 416,
> + * 833
> * - Accelerometer supported full-scale [g]: +-2/+-4/+-8/+-16
> * - Gyroscope supported full-scale [dps]: +-125/+-245/+-500/+-1000/+-2000
> * - FIFO size: 3KB
> @@ -791,7 +792,8 @@ static const struct st_lsm6dsx_settings st_lsm6dsx_sensor_settings[] = {
> .odr_avl[3] = { 104000, 0x04 },
> .odr_avl[4] = { 208000, 0x05 },
> .odr_avl[5] = { 416000, 0x06 },
> - .odr_len = 6,
> + .odr_avl[6] = { 833000, 0x07 },
> + .odr_len = 7,
> },
> [ST_LSM6DSX_ID_GYRO] = {
> .reg = {
> @@ -804,7 +806,8 @@ static const struct st_lsm6dsx_settings st_lsm6dsx_sensor_settings[] = {
> .odr_avl[3] = { 104000, 0x04 },
> .odr_avl[4] = { 208000, 0x05 },
> .odr_avl[5] = { 416000, 0x06 },
> - .odr_len = 6,
> + .odr_avl[6] = { 833000, 0x07 },
> + .odr_len = 7,
> },
> },
> .fs_table = {
> @@ -994,7 +997,8 @@ static const struct st_lsm6dsx_settings st_lsm6dsx_sensor_settings[] = {
> .odr_avl[3] = { 104000, 0x04 },
> .odr_avl[4] = { 208000, 0x05 },
> .odr_avl[5] = { 416000, 0x06 },
> - .odr_len = 6,
> + .odr_avl[6] = { 833000, 0x07 },
> + .odr_len = 7,
> },
> [ST_LSM6DSX_ID_GYRO] = {
> .reg = {
> @@ -1007,7 +1011,8 @@ static const struct st_lsm6dsx_settings st_lsm6dsx_sensor_settings[] = {
> .odr_avl[3] = { 104000, 0x04 },
> .odr_avl[4] = { 208000, 0x05 },
> .odr_avl[5] = { 416000, 0x06 },
> - .odr_len = 6,
> + .odr_avl[6] = { 833000, 0x07 },
> + .odr_len = 7,
> },
> },
> .fs_table = {
> @@ -1171,7 +1176,8 @@ static const struct st_lsm6dsx_settings st_lsm6dsx_sensor_settings[] = {
> .odr_avl[3] = { 104000, 0x04 },
> .odr_avl[4] = { 208000, 0x05 },
> .odr_avl[5] = { 416000, 0x06 },
> - .odr_len = 6,
> + .odr_avl[6] = { 833000, 0x07 },
> + .odr_len = 7,
> },
> [ST_LSM6DSX_ID_GYRO] = {
> .reg = {
> @@ -1184,7 +1190,8 @@ static const struct st_lsm6dsx_settings st_lsm6dsx_sensor_settings[] = {
> .odr_avl[3] = { 104000, 0x04 },
> .odr_avl[4] = { 208000, 0x05 },
> .odr_avl[5] = { 416000, 0x06 },
> - .odr_len = 6,
> + .odr_avl[6] = { 833000, 0x07 },
> + .odr_len = 7,
> },
> },
> .fs_table = {
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: imu: st_lsm6dsx: enable 833Hz sample frequency for tagged sensors
2020-04-25 17:05 ` Jonathan Cameron
@ 2020-04-26 14:28 ` Lorenzo Bianconi
0 siblings, 0 replies; 3+ messages in thread
From: Lorenzo Bianconi @ 2020-04-26 14:28 UTC (permalink / raw)
To: Jonathan Cameron; +Cc: Lorenzo Bianconi, linux-iio
>
> On Fri, 24 Apr 2020 12:44:38 +0200
> Lorenzo Bianconi <lorenzo@kernel.org> wrote:
>
> > Enable 833Hz ODR for sensors that supports tagged hw FIFO:
> > - LSM6DSO/LSM6DSOX
> > - LSM6DSR/LSM6DSRX
> > - ASM330LHH
> >
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> Would ideally have liked a little more info on the 'why'. Was this previously
> capped by practicality - i.e. not possible to read faster or is there
> something else going on here?
Hi Jonathan,
you are right sorry, the commit log can be improved :)
Actually AFAIK aosp CTS requires 800Hz as sampling frequency for accel
and gyro (but I am out of it for a while now so I can be wrong).
Anyway I tested it and it works fine, so why not? :)
Regards,
Lorenzo
>
> Don't really need to know for the applied patch though so
> Applied to the togreg branch of iio.git and pushed out as testing
> for the autobuilders to play with it.
>
> Thanks,
>
> Jonathan
>
> > ---
> > drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 21 +++++++++++++-------
> > 1 file changed, 14 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
> > index 84d219ae6aee..e6339bbb4469 100644
> > --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
> > +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
> > @@ -27,7 +27,8 @@
> > * - FIFO size: 4KB
> > *
> > * - LSM6DSO/LSM6DSOX/ASM330LHH/LSM6DSR/ISM330DHCX:
> > - * - Accelerometer/Gyroscope supported ODR [Hz]: 13, 26, 52, 104, 208, 416
> > + * - Accelerometer/Gyroscope supported ODR [Hz]: 13, 26, 52, 104, 208, 416,
> > + * 833
> > * - Accelerometer supported full-scale [g]: +-2/+-4/+-8/+-16
> > * - Gyroscope supported full-scale [dps]: +-125/+-245/+-500/+-1000/+-2000
> > * - FIFO size: 3KB
> > @@ -791,7 +792,8 @@ static const struct st_lsm6dsx_settings st_lsm6dsx_sensor_settings[] = {
> > .odr_avl[3] = { 104000, 0x04 },
> > .odr_avl[4] = { 208000, 0x05 },
> > .odr_avl[5] = { 416000, 0x06 },
> > - .odr_len = 6,
> > + .odr_avl[6] = { 833000, 0x07 },
> > + .odr_len = 7,
> > },
> > [ST_LSM6DSX_ID_GYRO] = {
> > .reg = {
> > @@ -804,7 +806,8 @@ static const struct st_lsm6dsx_settings st_lsm6dsx_sensor_settings[] = {
> > .odr_avl[3] = { 104000, 0x04 },
> > .odr_avl[4] = { 208000, 0x05 },
> > .odr_avl[5] = { 416000, 0x06 },
> > - .odr_len = 6,
> > + .odr_avl[6] = { 833000, 0x07 },
> > + .odr_len = 7,
> > },
> > },
> > .fs_table = {
> > @@ -994,7 +997,8 @@ static const struct st_lsm6dsx_settings st_lsm6dsx_sensor_settings[] = {
> > .odr_avl[3] = { 104000, 0x04 },
> > .odr_avl[4] = { 208000, 0x05 },
> > .odr_avl[5] = { 416000, 0x06 },
> > - .odr_len = 6,
> > + .odr_avl[6] = { 833000, 0x07 },
> > + .odr_len = 7,
> > },
> > [ST_LSM6DSX_ID_GYRO] = {
> > .reg = {
> > @@ -1007,7 +1011,8 @@ static const struct st_lsm6dsx_settings st_lsm6dsx_sensor_settings[] = {
> > .odr_avl[3] = { 104000, 0x04 },
> > .odr_avl[4] = { 208000, 0x05 },
> > .odr_avl[5] = { 416000, 0x06 },
> > - .odr_len = 6,
> > + .odr_avl[6] = { 833000, 0x07 },
> > + .odr_len = 7,
> > },
> > },
> > .fs_table = {
> > @@ -1171,7 +1176,8 @@ static const struct st_lsm6dsx_settings st_lsm6dsx_sensor_settings[] = {
> > .odr_avl[3] = { 104000, 0x04 },
> > .odr_avl[4] = { 208000, 0x05 },
> > .odr_avl[5] = { 416000, 0x06 },
> > - .odr_len = 6,
> > + .odr_avl[6] = { 833000, 0x07 },
> > + .odr_len = 7,
> > },
> > [ST_LSM6DSX_ID_GYRO] = {
> > .reg = {
> > @@ -1184,7 +1190,8 @@ static const struct st_lsm6dsx_settings st_lsm6dsx_sensor_settings[] = {
> > .odr_avl[3] = { 104000, 0x04 },
> > .odr_avl[4] = { 208000, 0x05 },
> > .odr_avl[5] = { 416000, 0x06 },
> > - .odr_len = 6,
> > + .odr_avl[6] = { 833000, 0x07 },
> > + .odr_len = 7,
> > },
> > },
> > .fs_table = {
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-26 14:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-24 10:44 [PATCH] iio: imu: st_lsm6dsx: enable 833Hz sample frequency for tagged sensors Lorenzo Bianconi
2020-04-25 17:05 ` Jonathan Cameron
2020-04-26 14:28 ` Lorenzo Bianconi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.