New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 615059 link

Starred by 4 users

Issue metadata

Status: Archived
Owner:
Last visit > 30 days ago
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

ec: sensors: Add sensors interface

Project Member Reported by gwendal@chromium.org, May 26 2016

Issue description

The same sensor hal on dragon had hard coded values.
Now that this stack will work on cheet, the EC needs to provide information on sensor capabilties:

- size of the FIFO buffer (general)
- min/max sensor sampling frequencies (for each sensors).

Add this info in the sensor data structure if necessary and add in MOTIONSENSE_CMD_INFO (add a vX) option.

Also, add a command to stop/start generating sensor interrupt: it is needed for sleeping or when the android is stopped:

MOTIONSENSE_CMD_FIFO_ENABLE (with payload 0/1 to disable/enable).

Add sysfs parameters for sensor hal to retrieve the info easily.

 
 
Status: Archived (was: Started)

Comment 2 by ketakid@google.com, Mar 18 2017

Status: Available (was: Archived)
Activating. Please assign to the right owner and the appropriate priority.
Owner: nvaccaro@chromium.org
Status: Started (was: Available)
I'm not sure what the Chrome team's methodology is when adding new code.  Do we only add code that is currently needed, or do we also add code that we think could likely be needed in the future or given the right application?



This bug asks for a "fifo size (general)" to be added.  For sensors, there are two types of fifo's: common and reserved.  Common fifos are shared amongst multiple sensors, whereas reserved fifos are dedicated to a single sensor.  Having knowledge of what kind of fifo one is dealing with can be important if needing to understand how many events to expect in certain scenarios, as well as for test code that needs to verify sensor stack functionality. 

Should I add just a “fifo size (general)” field to just satisfy this bug's request, or should I mimic Android and also add a reserved fifo size field while I’m at it? 


The EC has only one fifo, so from a HAL perspective, only common FIFO is used. Reserved FIFO will always be 0, so no need to add an interface for it.
RE: Also, add a command to stop/start generating sensor interrupt: it is needed for sleeping or when the android is stopped:

There already is an ec_command for doing this, MOTIONSENSE_CMD_FIFO_INT_ENABLE.  The 3.18 and 4.4 kernels are currently calling this in their pm_ops to disable the interrupt across kernel suspend.

Question: Is this something that also needs to have a sysfs hook for?  (i.e. the HAL needs to do this in cases other than AP suspend)?

Comment 7 by gwendal@google.com, Apr 19 2017

#6: no need of sysfs hook. We can enable interrupt at a later time via iio  mechanism to enable buffer when needed (iio_buffer_setup_ops). I have a CL (https://chromium-review.googlesource.com/#/c/412450/) I need to revive.
 
The issue with enabling/disabling fifo interrupt is in case of AP crash. EC would not be aware and would keep sending interrupt even if the AP was not ready to process them.

Comment 8 by nvaccaro@google.com, Apr 29 2017

Patches to implement this change are in review, topic = "sensor_api"

EC branch firmware-glados-7820.B
  Fix out-of-space issue : https://chromium-review.googlesource.com/c/487302
  Add new sensor API     : https://chromium-review.googlesource.com/c/486102

EC branch master
  Fix out-of-space issue : https://chromium-review.googlesource.com/c/490846
  Add new sensor API     : https://chromium-review.googlesource.com/c/482703

4.4 Kernel Support
  Sync to latest ec_commands.h : https://chromium-review.googlesource.com/c/490494
  Add new sysfs entries        : https://chromium-review.googlesource.com/c/490495

3.18 Kernel Support
  Sync to latest ec_commands.h : https://chromium-review.googlesource.com/c/484746
  Add new sysfs entries        : https://chromium-review.googlesource.com/c/476174


The new sysfs entries added with these changes to each sensor device are located at :
  /sys/bus/iio/devices/iio:deviceX/min_frequency
  /sys/bus/iio/devices/iio:deviceX/max_frequency
  /sys/bus/iio/devices/iio:deviceX/max_events

replacing "X" in "iio:deviceX" above with the number of the sensor of interest.
Project Member

Comment 9 by bugdroid1@chromium.org, May 18 2017

Labels: merge-merged-firmware-glados-7820.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/cbc2cfced026989539cd2a2a2565ca768c0c1f8a

commit cbc2cfced026989539cd2a2a2565ca768c0c1f8a
Author: Nick Vaccaro <nvaccaro@chromium.org>
Date: Thu May 18 19:49:37 2017

cave: disable CONFIG_CMD_ACCEL to reduce bin size

Cave ran out of room with upcoming change, disabled CONFIG_CMD_ACCEL
and CONFIG_CMD_ACCEL_FIFO to free up the needed space and keep build
from breaking.

BRANCH=firmware-glados-7820.B
BUG= chromium:615059 
TEST=verified cave target build doesn't break
Change-Id: I48f77920f8bf919c72c8c055a01d771795ac4ddf
Signed-off-by: Nick Vaccaro <nvaccaro@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/487302
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>

[modify] https://crrev.com/cbc2cfced026989539cd2a2a2565ca768c0c1f8a/board/cave/board.h

Project Member

Comment 10 by bugdroid1@chromium.org, May 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/b0911b4362c12060c0f351f08f6fa341179c2637

commit b0911b4362c12060c0f351f08f6fa341179c2637
Author: Nick Vaccaro <nvaccaro@chromium.org>
Date: Thu May 18 19:49:45 2017

common: sensors: add extra sensor attributes

Adds min_frequency and max_frequency to struct motion_sensor_t.

New attributes min_frequency and max_frequency are now returned
in ectool's MOTIONSENSE_CMD_INFO response.

Incremented ectool's MOTIONSENSE_CMD_INFO version to version 3.

Add constants for MIN_FREQUENCY and MAX_FREQUENCY to each sensor's
header file.

BRANCH=firmware-glados-7820.B
BUG= chromium:615059 
TEST=build/boot and verify MOTIONSENSE_CMD_INFO response on caroline
Change-Id: I66db9715c122ef6bb4665ad5d086a9ecc9c7c93a
Signed-off-by: Nick Vaccaro <nvaccaro@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/486102
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>

[modify] https://crrev.com/b0911b4362c12060c0f351f08f6fa341179c2637/driver/accel_bma2x2.h
[modify] https://crrev.com/b0911b4362c12060c0f351f08f6fa341179c2637/board/sentry/board.c
[modify] https://crrev.com/b0911b4362c12060c0f351f08f6fa341179c2637/board/pbody/board.c
[modify] https://crrev.com/b0911b4362c12060c0f351f08f6fa341179c2637/include/config.h
[modify] https://crrev.com/b0911b4362c12060c0f351f08f6fa341179c2637/driver/als_si114x.h
[modify] https://crrev.com/b0911b4362c12060c0f351f08f6fa341179c2637/driver/mag_bmm150.h
[modify] https://crrev.com/b0911b4362c12060c0f351f08f6fa341179c2637/include/ec_commands.h
[modify] https://crrev.com/b0911b4362c12060c0f351f08f6fa341179c2637/driver/accelgyro_lsm6ds0.h
[modify] https://crrev.com/b0911b4362c12060c0f351f08f6fa341179c2637/driver/accelgyro_bmi160.h
[modify] https://crrev.com/b0911b4362c12060c0f351f08f6fa341179c2637/driver/accel_kxcj9.h
[modify] https://crrev.com/b0911b4362c12060c0f351f08f6fa341179c2637/util/ectool.c
[modify] https://crrev.com/b0911b4362c12060c0f351f08f6fa341179c2637/include/common.h
[modify] https://crrev.com/b0911b4362c12060c0f351f08f6fa341179c2637/driver/gyro_l3gd20h.h
[modify] https://crrev.com/b0911b4362c12060c0f351f08f6fa341179c2637/board/cave/board.c
[modify] https://crrev.com/b0911b4362c12060c0f351f08f6fa341179c2637/board/glados/board.c
[modify] https://crrev.com/b0911b4362c12060c0f351f08f6fa341179c2637/board/lars/board.c
[modify] https://crrev.com/b0911b4362c12060c0f351f08f6fa341179c2637/board/caroline/board.c
[modify] https://crrev.com/b0911b4362c12060c0f351f08f6fa341179c2637/common/motion_sense.c
[modify] https://crrev.com/b0911b4362c12060c0f351f08f6fa341179c2637/driver/accel_kx022.h
[modify] https://crrev.com/b0911b4362c12060c0f351f08f6fa341179c2637/include/util.h
[modify] https://crrev.com/b0911b4362c12060c0f351f08f6fa341179c2637/board/wheatley/board.c
[modify] https://crrev.com/b0911b4362c12060c0f351f08f6fa341179c2637/include/motion_sense.h

Project Member

Comment 11 by bugdroid1@chromium.org, May 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/9a0d0aa70d483be79c71a459dfd5f5e89da2638d

commit 9a0d0aa70d483be79c71a459dfd5f5e89da2638d
Author: Nick Vaccaro <nvaccaro@chromium.org>
Date: Fri May 19 04:05:23 2017

common: sensors: add extra sensor attributes

Adds min_frequency and max_frequency to struct motion_sensor_t.

New attributes min_frequency and max_frequency are now returned in
ectool's MOTIONSENSE_CMD_INFO response.

Incremented ectool's MOTIONSENSE_CMD_INFO version to version 3.

Add constants for MIN_FREQUENCY and MAX_FREQUENCY to each sensor's
header file.

BRANCH=none
BUG= chromium:615059 
TEST=build/boot and verify MOTIONSENSE_CMD_INFO response on kevin,
make buildall -j passes.

Change-Id: I66db9715c122ef6bb4665ad5d086a9ecc9c7c93a
Signed-off-by: Nick Vaccaro <nvaccaro@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/482703
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>

[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/driver/accel_bma2x2.h
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/board/eve/board.c
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/board/elm/board.c
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/board/reef/board.c
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/board/rowan/board.c
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/board/ryu/board.c
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/util/ectool.c
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/board/poppy/board.c
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/driver/baro_bmp280.h
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/driver/als_si114x.h
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/driver/mag_bmm150.h
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/include/ec_commands.h
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/driver/accelgyro_lsm6ds0.h
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/driver/accelgyro_bmi160.h
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/driver/accel_kxcj9.h
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/include/config.h
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/include/common.h
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/board/strago/board.c
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/driver/gyro_l3gd20h.h
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/board/kahlee/board.c
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/board/oak/board.c
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/board/glados/board.c
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/common/motion_sense.c
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/board/samus/board.c
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/driver/accel_kx022.h
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/include/util.h
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/board/wheatley/board.c
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/board/kevin/board.c
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/include/motion_sense.h
[modify] https://crrev.com/9a0d0aa70d483be79c71a459dfd5f5e89da2638d/driver/als_opt3001.h

Project Member

Comment 12 by bugdroid1@chromium.org, May 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/d7eefeffb927cfd311d40c00ce817937eab4cb61

commit d7eefeffb927cfd311d40c00ce817937eab4cb61
Author: Nick Vaccaro <nvaccaro@chromium.org>
Date: Fri May 19 04:05:22 2017

gru: disable CONFIG_CMD_ALS to reduce bin size

Gru ran out of room with upcoming change, disabled CONFIG_CMD_ALS
to free up the needed space and keep build from breaking.

BRANCH=none
BUG= chromium:615059 
TEST=verified gru target build doesn't run out of flash space using
"make buildall -j"

Change-Id: Ifb76ad0fe4693dfa4415370354c6d5af2bd4cc11
Signed-off-by: Nick Vaccaro <nvaccaro@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/490846
Reviewed-by: Scott Collyer <scollyer@chromium.org>

[modify] https://crrev.com/d7eefeffb927cfd311d40c00ce817937eab4cb61/board/kevin/board.h

The following CL is the sensor HAL change to read the new api from sysfs and populate the sensor struct with it prior to registering sensor list with sensor services.  This completes the end-to-end plumbing of the new sensor API (EC --> kernel --> android sensor HAL --> android sensor services):

https://googleplex-android-review.git.corp.google.com/#/c/2279671/

Project Member

Comment 14 by bugdroid1@chromium.org, May 20 2017

Labels: merge-merged-chromeos-3.18
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/1c7322006233c6138441481c70769e11bbdc30a4

commit 1c7322006233c6138441481c70769e11bbdc30a4
Author: Nick Vaccaro <nvaccaro@chromium.org>
Date: Sat May 20 01:03:03 2017

CHROMIUM: sensors: add extra sensor API

Adds a min_frequency, max_frequency, and fifo_max_event_count to
the /sysfs entries for each iio sensor device.

BUG= chromium:615059 
TEST=build/boot and verified new entry functionality on caroline using
newer and older EC firmware versions.

Change-Id: I3719c629f5334631c01357d9de9e91bbe65a6992
Signed-off-by: Nick Vaccaro <nvaccaro@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/476174
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>

[modify] https://crrev.com/1c7322006233c6138441481c70769e11bbdc30a4/include/linux/mfd/cros_ec_commands.h
[modify] https://crrev.com/1c7322006233c6138441481c70769e11bbdc30a4/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.h
[modify] https://crrev.com/1c7322006233c6138441481c70769e11bbdc30a4/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c

Status: Fixed (was: Started)
Project Member

Comment 16 by bugdroid1@chromium.org, Jun 7 2017

Labels: merge-merged-chromeos-4.4
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/08afe978511b5d08e9522992505d16d8d36737e3

commit 08afe978511b5d08e9522992505d16d8d36737e3
Author: Nick Vaccaro <nvaccaro@chromium.org>
Date: Wed Jun 07 10:02:57 2017

CHROMIUM: sensors: add extra sensor API

Adds a min_frequency, max_frequency, and fifo_max_event_count to
the /sysfs entries for each iio sensor device.

BUG= chromium:615059 
TEST=build/boot and verified new entry functionality on kevin using
newer and older EC firmware versions.
(cherry picked from commit a3c54832c9b3357623ec4b7d91e0ca951b9c5b6c)

Change-Id: I3719c629f5334631c01357d9de9e91bbe65a6992
Signed-off-by: Nick Vaccaro <nvaccaro@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/490495
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>

[modify] https://crrev.com/08afe978511b5d08e9522992505d16d8d36737e3/include/linux/mfd/cros_ec_commands.h
[modify] https://crrev.com/08afe978511b5d08e9522992505d16d8d36737e3/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.h
[modify] https://crrev.com/08afe978511b5d08e9522992505d16d8d36737e3/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c

Project Member

Comment 17 by bugdroid1@chromium.org, Jun 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/eef8308cdf33708b4c07b5769f1750cb53dbf329

commit eef8308cdf33708b4c07b5769f1750cb53dbf329
Author: Todd Broch <tbroch@chromium.org>
Date: Thu Jun 08 15:17:54 2017

Revert "CHROMIUM: sensors: add extra sensor API"

This reverts commit 08afe978511b5d08e9522992505d16d8d36737e3.

Reason for revert: kernel stack corrupted on Eve systems

BUG=b:62435886
TEST=manual, run reboot tests no longer see panic,

[    2.556766] cros-ec-sensors cros-ec-accel.0: Motionsense cmd version too old, aborting...
[    2.556775] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ffffffffc05a1821
[    2.556775]

Original change's description:
> CHROMIUM: sensors: add extra sensor API
>
> Adds a min_frequency, max_frequency, and fifo_max_event_count to
> the /sysfs entries for each iio sensor device.
>
> BUG= chromium:615059 
> TEST=build/boot and verified new entry functionality on kevin using
> newer and older EC firmware versions.
> (cherry picked from commit a3c54832c9b3357623ec4b7d91e0ca951b9c5b6c)
>
> Change-Id: I3719c629f5334631c01357d9de9e91bbe65a6992
> Signed-off-by: Nick Vaccaro <nvaccaro@chromium.org>
> Reviewed-on: https://chromium-review.googlesource.com/490495
> Reviewed-by: Gwendal Grignou <gwendal@chromium.org>

BUG= chromium:615059 

Change-Id: I50948f751b79d1b0b3b864b5d249549834c2676e
Reviewed-on: https://chromium-review.googlesource.com/527995
Commit-Ready: Todd Broch <tbroch@chromium.org>
Tested-by: Todd Broch <tbroch@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>

[modify] https://crrev.com/eef8308cdf33708b4c07b5769f1750cb53dbf329/include/linux/mfd/cros_ec_commands.h
[modify] https://crrev.com/eef8308cdf33708b4c07b5769f1750cb53dbf329/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.h
[modify] https://crrev.com/eef8308cdf33708b4c07b5769f1750cb53dbf329/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c

Project Member

Comment 18 by bugdroid1@chromium.org, Jun 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/e5738b486830108398e6439a452d8a02b02bba7c

commit e5738b486830108398e6439a452d8a02b02bba7c
Author: Nick Vaccaro <nvaccaro@chromium.org>
Date: Fri Jun 23 00:03:54 2017

Revert "Revert CHROMIUM: sensors: add extra sensor API"

This reverts revert commit eef8308cdf33 ("Revert 'CHROMIUM:
sensors: add extra sensor API'")

Adds a min_frequency, max_frequency, and fifo_max_event_count to
the /sysfs entries for each iio sensor device.

BUG= chromium:615059 
TEST=build/boot and verified new entry functionality on kevin using
newer and older EC firmware versions.
Cherry picked from commit a3c54832c9b3 ("CHROMIUM: sensors: add extra
sensor API")

Change-Id: I7fe3e3302fd8d136fa5263d893839bb0d29bd9e5
Signed-off-by: Nick Vaccaro <nvaccaro@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/529686
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>

[modify] https://crrev.com/e5738b486830108398e6439a452d8a02b02bba7c/include/linux/mfd/cros_ec_commands.h
[modify] https://crrev.com/e5738b486830108398e6439a452d8a02b02bba7c/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.h
[modify] https://crrev.com/e5738b486830108398e6439a452d8a02b02bba7c/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c

Project Member

Comment 19 by bugdroid1@chromium.org, Jul 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/9fad1adc800cd950e4bd3f292f83186eb0e4f272

commit 9fad1adc800cd950e4bd3f292f83186eb0e4f272
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Thu Jul 13 22:08:42 2017

driver: sensor: tune MAX_FREQ

Reduce maximum frequency of BMM150 compass to 80Hz, 800Hz is a typo.
Reduce SI1141 maximum frequency to 50Hz: 100Hz is too high when polling
mode is used.

Fix up of CL:482703

BRANCH=eve, glados
BUG= chromium:615059 
TEST=On eve, check CTS test
android.hardware.cts.SensorBatchingTests#testMagneticField_fastest_flush
passes. Observed that dumpsys sensorservice returns compass maxRate at
80Hz instead of 200Hz.

Change-Id: If4e688ab59aa53c402d34714b6bb33ccd4a4ab96
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/570482
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>

[modify] https://crrev.com/9fad1adc800cd950e4bd3f292f83186eb0e4f272/driver/mag_bmm150.h
[modify] https://crrev.com/9fad1adc800cd950e4bd3f292f83186eb0e4f272/driver/als_si114x.h

Project Member

Comment 20 by bugdroid1@chromium.org, Jul 15 2017

Labels: merge-merged-firmware-eve-9584.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/d0132ffe81a739458790fdf4f299937234515a74

commit d0132ffe81a739458790fdf4f299937234515a74
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Sat Jul 15 21:46:21 2017

driver: sensor: tune MAX_FREQ

Reduce maximum frequency of BMM150 compass to 80Hz, 800Hz is a typo.
Reduce SI1141 maximum frequency to 50Hz: 100Hz is too high when polling
mode is used.

Fix up of CL:482703

BRANCH=eve, glados
BUG= chromium:615059 
TEST=On eve, check CTS test
android.hardware.cts.SensorBatchingTests#testMagneticField_fastest_flush
passes. Observed that dumpsys sensorservice returns compass maxRate at
80Hz instead of 200Hz.

Change-Id: I5ce595bdba57d59a034fcebac885b25dfe48a135
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Original-Commit-Id: 9fad1adc800cd950e4bd3f292f83186eb0e4f272
Original-Change-Id: If4e688ab59aa53c402d34714b6bb33ccd4a4ab96
Original-Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/570482
Original-Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/572797

[modify] https://crrev.com/d0132ffe81a739458790fdf4f299937234515a74/driver/mag_bmm150.h
[modify] https://crrev.com/d0132ffe81a739458790fdf4f299937234515a74/driver/als_si114x.h

Project Member

Comment 21 by bugdroid1@chromium.org, Jul 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/d4f1476d55f842c87c649e98130a618e520826c1

commit d4f1476d55f842c87c649e98130a618e520826c1
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Sun Jul 16 04:39:42 2017

driver: sensor: tune MAX_FREQ

Reduce maximum frequency of BMM150 compass to 80Hz, 800Hz is a typo.
Reduce SI1141 maximum frequency to 50Hz: 100Hz is too high when polling
mode is used.

Fix up of CL:482703

BRANCH=eve, glados
BUG= chromium:615059 
TEST=On eve, check CTS test
android.hardware.cts.SensorBatchingTests#testMagneticField_fastest_flush
passes. Observed that dumpsys sensorservice returns compass maxRate at
80Hz instead of 200Hz.

Change-Id: If4e688ab59aa53c402d34714b6bb33ccd4a4ab96
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/570482
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
(cherry picked from commit 9fad1adc800cd950e4bd3f292f83186eb0e4f272)
Reviewed-on: https://chromium-review.googlesource.com/573223

[modify] https://crrev.com/d4f1476d55f842c87c649e98130a618e520826c1/driver/mag_bmm150.h
[modify] https://crrev.com/d4f1476d55f842c87c649e98130a618e520826c1/driver/als_si114x.h

Comment 22 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)
Project Member

Comment 23 by bugdroid1@chromium.org, Nov 30

Labels: merge-merged-firmware-octopus-11297.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/9f4bbb921250601e80cef716e7c6a54007d8869f

commit 9f4bbb921250601e80cef716e7c6a54007d8869f
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Fri Nov 30 20:18:41 2018

sensor: Adjust max_frequency based on EC performance

Put in max_frequency a value that the sensor AND the EC support.

BRANCH=none
BUG=b:118205424,b:118851581, chromium:615059 
TEST=Compile. Check all max sensors frequencies have been altered with:
for i in $(grep -rh max_frequency board | cut -d '=' -f 2 | sort | \
           uniq | grep FREQ | sed 's/FREQ.*//') ; do
   echo -n $i ; git show | grep -q $i || break;
   echo check
done
Check on nocturne accel max frequency is still correct.

Change-Id: I848396d9f150a2e94d430a8feeafc1087a6bf2c3
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/1357146
Reviewed-by: Jett Rink <jettrink@chromium.org>
Commit-Queue: Jett Rink <jettrink@chromium.org>
Tested-by: Jett Rink <jettrink@chromium.org>
Trybot-Ready: Jett Rink <jettrink@chromium.org>

[modify] https://crrev.com/9f4bbb921250601e80cef716e7c6a54007d8869f/driver/accel_bma2x2.h
[modify] https://crrev.com/9f4bbb921250601e80cef716e7c6a54007d8869f/common/motion_sense.c
[modify] https://crrev.com/9f4bbb921250601e80cef716e7c6a54007d8869f/driver/accelgyro_bmi160.h
[modify] https://crrev.com/9f4bbb921250601e80cef716e7c6a54007d8869f/driver/accel_kx022.h
[modify] https://crrev.com/9f4bbb921250601e80cef716e7c6a54007d8869f/driver/mag_lis2mdl.h
[modify] https://crrev.com/9f4bbb921250601e80cef716e7c6a54007d8869f/driver/accel_lis2dh.h
[modify] https://crrev.com/9f4bbb921250601e80cef716e7c6a54007d8869f/include/util.h
[modify] https://crrev.com/9f4bbb921250601e80cef716e7c6a54007d8869f/driver/baro_bmp280.h
[modify] https://crrev.com/9f4bbb921250601e80cef716e7c6a54007d8869f/driver/als_si114x.h
[modify] https://crrev.com/9f4bbb921250601e80cef716e7c6a54007d8869f/driver/mag_bmm150.h
[modify] https://crrev.com/9f4bbb921250601e80cef716e7c6a54007d8869f/driver/accel_kxcj9.h
[modify] https://crrev.com/9f4bbb921250601e80cef716e7c6a54007d8869f/driver/accelgyro_lsm6dsm.h
[modify] https://crrev.com/9f4bbb921250601e80cef716e7c6a54007d8869f/include/motion_sense.h
[modify] https://crrev.com/9f4bbb921250601e80cef716e7c6a54007d8869f/include/config.h
[modify] https://crrev.com/9f4bbb921250601e80cef716e7c6a54007d8869f/driver/accelgyro_lsm6ds0.h
[modify] https://crrev.com/9f4bbb921250601e80cef716e7c6a54007d8869f/driver/als_opt3001.h

Project Member

Comment 24 by bugdroid1@chromium.org, Dec 3

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/77b306b340ca428ba6785add204ccdce82185274

commit 77b306b340ca428ba6785add204ccdce82185274
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Mon Dec 03 11:11:54 2018

sensor: Adjust max_frequency based on EC performance

Put in max_frequency a value that the sensor AND the EC support.

BRANCH=none
BUG=b:118205424,b:118851581, chromium:615059 
TEST=Compile. Check all max sensors frequencies have been altered with:
for i in $(grep -rh max_frequency board | cut -d '=' -f 2 | sort | \
           uniq | grep FREQ | sed 's/FREQ.*//') ; do
   echo -n $i ; git show | grep -q $i || break;
   echo check
done
Check on nocturne accel max frequency is still correct.

Change-Id: I848396d9f150a2e94d430a8feeafc1087a6bf2c3
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1352063
Commit-Ready: Elthan Huang <elthan_huang@compal.corp-partner.google.com>
Reviewed-by: Jesse Schettler <jschettler@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Justin TerAvest <teravest@chromium.org>

[modify] https://crrev.com/77b306b340ca428ba6785add204ccdce82185274/driver/accel_bma2x2.h
[modify] https://crrev.com/77b306b340ca428ba6785add204ccdce82185274/common/motion_sense.c
[modify] https://crrev.com/77b306b340ca428ba6785add204ccdce82185274/driver/accelgyro_bmi160.h
[modify] https://crrev.com/77b306b340ca428ba6785add204ccdce82185274/driver/accel_kx022.h
[modify] https://crrev.com/77b306b340ca428ba6785add204ccdce82185274/driver/mag_lis2mdl.h
[modify] https://crrev.com/77b306b340ca428ba6785add204ccdce82185274/driver/accel_lis2dh.h
[modify] https://crrev.com/77b306b340ca428ba6785add204ccdce82185274/include/util.h
[modify] https://crrev.com/77b306b340ca428ba6785add204ccdce82185274/driver/baro_bmp280.h
[modify] https://crrev.com/77b306b340ca428ba6785add204ccdce82185274/driver/als_si114x.h
[modify] https://crrev.com/77b306b340ca428ba6785add204ccdce82185274/driver/mag_bmm150.h
[modify] https://crrev.com/77b306b340ca428ba6785add204ccdce82185274/driver/accel_kxcj9.h
[modify] https://crrev.com/77b306b340ca428ba6785add204ccdce82185274/driver/accelgyro_lsm6dsm.h
[modify] https://crrev.com/77b306b340ca428ba6785add204ccdce82185274/include/motion_sense.h
[modify] https://crrev.com/77b306b340ca428ba6785add204ccdce82185274/include/config.h
[modify] https://crrev.com/77b306b340ca428ba6785add204ccdce82185274/driver/accelgyro_lsm6ds0.h
[modify] https://crrev.com/77b306b340ca428ba6785add204ccdce82185274/driver/als_opt3001.h

Sign in to add a comment