summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2018-01-03 10:09:22 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-01-08 17:22:48 -0800
commitc49334f1433e15ca2549c06b7aa283896249dd25 (patch)
tree6fe75a886f8bc7bfde3e15d0fa721ff4e6a0a34d /util
parentf5798790ad05477f52ce0001bfc52a5512c87d9b (diff)
downloadchrome-ec-c49334f1433e15ca2549c06b7aa283896249dd25.tar.gz
ec_commands: Add sync sensor
SYNC motion sensor are use to count event. It sends an event to the AP each time a GPIO goes low/high, the datum contains a 16 bit counter. The location indicates the source of the event, as Android sensor hal will use this information (via sysfs location attribute) to link the sensor with other subsystem. BUG=b:67743747 BRANCH=none TEST=Unit tests. Change-Id: Ia808b25730ad4100efa216c6a86b7b090197c5a3 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/848496 Reviewed-by: Alexandru M Stan <amstan@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'util')
-rw-r--r--util/ectool.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/util/ectool.c b/util/ectool.c
index 562a84e53a..5d23bb7243 100644
--- a/util/ectool.c
+++ b/util/ectool.c
@@ -3783,6 +3783,9 @@ static int cmd_motionsense(int argc, char **argv)
case MOTIONSENSE_TYPE_BARO:
printf("barometer\n");
break;
+ case MOTIONSENSE_TYPE_SYNC:
+ printf("sync\n");
+ break;
default:
printf("unknown\n");
}
@@ -3795,6 +3798,9 @@ static int cmd_motionsense(int argc, char **argv)
case MOTIONSENSE_LOC_LID:
printf("lid\n");
break;
+ case MOTIONSENSE_LOC_CAMERA:
+ printf("camera\n");
+ break;
default:
printf("unknown\n");
}
@@ -3831,6 +3837,9 @@ static int cmd_motionsense(int argc, char **argv)
case MOTIONSENSE_CHIP_BH1730:
printf("bh1730\n");
break;
+ case MOTIONSENSE_CHIP_GPIO:
+ printf("gpio\n");
+ break;
default:
printf("unknown\n");
}