| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=none
TEST=none
Change-Id: I0f03f432ada1064ffba9595be78ca7ab4d25ecd1
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3155270
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Owners-Override: Jora Jacobi <jora@google.com>
Tested-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Port changes cl/289037 to generic kionix driver.
Form cl/289037
Sometimes the accelerometer doesn't initialize nicely.
Increase the timeout to 20ms.
BUG=chrome-os-partner:39269,chrome-os-partner:63146
TEST=buildall
BRANCH=veyron,cave
Change-Id: I4e4d8951fc821b8b33daa53e6c3b8da5ffa7acde
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/446132
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Port changes cl/288874 to generic kionix driver.
From cl/288874:
After we write SRST in CTRL2, there seems to be a period of time where the
accelerometer doesn't respond to i2c commmands. Instead of failing the init
just consider it as part of the timeout period.
BUG=chrome-os-partner:39269,chrome-os-partner:63146
TEST=make -j buildall
BRANCH=veyron,cave
Change-Id: I2197aa7741d1482b76c7c07b0cb0c171aab86a59
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/445973
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=chrome-os-partner:60882
BRANCH=veyron
TEST=Check the device does not wake up when unplugging/plugging power
supply while in S3.
Change-Id: I127d35d46da983173bef629805c4b01a37287e22
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/438071
Reviewed-by: Alexandru Stan <amstan@chromium.org>
Tested-by: Gwendal Grignou <gwendal@chromium.org>
Commit-Queue: Gwendal Grignou <gwendal@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove commands already removed on samus_pd:
CONFIG_CMD_SHMEM and CONFIG_CMD_TIMERINFO
BUG=chrome-os-partner:60882
BRANCH=veyron
TEST=compile, freeing 384 bytes.
Change-Id: I63e3a4404728110b2bf054aa1c67319e769aaf44
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/440382
Reviewed-by: Alexandru Stan <amstan@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To save flash space, disable "shmem" console command on samus_pd
to save 128 bytes.
BUG=chrome-os-partner:60882
BRANCH=samus_pd,veyron
TEST=make-j buildall
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/251911
Reviewed-by: Shawn N <shawnn@chromium.org>
(cherry picked from commit fc144e940ca89a020880645a823d5c2258aae8c4)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Conflicts:
board/samus_pd/board.h
Change-Id: I0d0277a0c4a80dffd90dcbf2c3ee77eba2408c57
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/440381
Reviewed-by: Alexandru Stan <amstan@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Disable the timerinfo command on samus_pd to save flash space
BUG=chrome-os-partner:60882
BRANCH=samus,veyron
TEST=make -j buildall
From .map file, 256 bytes saved
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/264939
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
(cherry picked from commit a90f4dd25ee323a1859fbe28716e7d855a1725ca)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Conflicts:
board/samus_pd/board.h
include/config.h
Change-Id: I6731967741cb28268499126f1753916319a1dcb4
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/440380
Reviewed-by: Alexandru Stan <amstan@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CONFIG_POWER_TRACK_HOST_SLEEP_STATE has a dependency on
CONFIG_POWER_COMMON, so remove it from test builds that don't have a
chipset task, rather than heavy-handedly removing it from all test
builds.
BUG=chrome-os-partner:56197,chrome-os-partner:60882
BRANCH=veyron
TEST=`make BOARD=gru tests`
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/378119
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
(cherry picked from commit e4d6f134eca0fbf5a53703c60797a397fb158091)
Conflicts:
test/test_config.h
Change-Id: I01c37c2adfe30853aa6fb524f191b3dd4f9eb948
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/440379
Reviewed-by: Alexandru Stan <amstan@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't queue non-wake events, and ensure wake events (and all subsequent
events) always get queued.
BUG=chrome-os-partner:59248, chrome-os-partner:59336,chrome-os-partner:60882
BRANCH=gru,veyron
TEST=Manual on kevin, go to suspend, press volume keys dozens of times,
press 'shift', verify device wakes. Place cursor on URL bar, go to
suspend, type "google" quickly, verify device wakes and "google" appears
on URL bar. Go to suspend, press 'VolUp' key 5 times, press keyboard,
verify device wakes and no volume meter is seen on display.
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Original-Change-Id: Ibe761187fbcefd686776a512786550970a6fc067
Reviewed-on: https://chromium-review.googlesource.com/405717
Commit-Queue: Douglas Anderson <dianders@chromium.org>
Tested-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
(cherry picked from commit aa2f01566314604404e104d7975c6c755c22a601)
Reviewed-on: https://chromium-review.googlesource.com/407958
Commit-Ready: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
(cherry picked from commit 1f6600fd344bb5eb5476206a05c2bc773252d788)
Conflicts:
common/keyboard_mkbp.c
Change-Id: Id17caf30fd8b3d609db527f254c5e4fdc09601eb
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/438070
Reviewed-by: Alexandru Stan <amstan@chromium.org>
Reviewed-by: Simon Glass <sjg@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the memmap'd host event mask copy wasn't always updated. Be
consistent with other mkbp code and call host_get_event() to get our
current mask.
BUG=chrome-os-partner:59241,chrome-os-partner:60882
BRANCH=gru,veyron
TEST=Manual on kevin, close lid to suspend, press volume keys, verify
device doesn't wake. Open lid, verify device wakes. Run
'powerd_dbus_suspend', press volume keys, verify device doesn't wake.
Press keyboard key, verify device wakes.
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/406547
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
(cherry picked from commit 763d3b2c6f26d41e7147f860e59755af2fe87fe4)
Reviewed-on: https://chromium-review.googlesource.com/407957
Commit-Ready: Douglas Anderson <dianders@chromium.org>
Tested-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
(cherry picked from commit f7d5360449aa3eead464c37d3ded19f582e6291e)
Change-Id: I3de49efa1ebc53a9c56bed57007c48356c7e97bb
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/438069
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Reviewed-by: Alexandru Stan <amstan@chromium.org>
Reviewed-by: Simon Glass <sjg@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow the host to self-report its sleep state through
EC_CMD_HOST_SLEEP_EVENT, which will typically be sent with SUSPEND
param when the host begins its sleep process. While the host has
self-reported that it is in SUSPEND, don't assert the interrupt
line, except for designated wake events.
BUG=chrome-os-partner:56156,chrome-os-partner:60882
BRANCH=veyron
TEST=On kevin, run 'ectool hostsleepstate suspend', verify that
interrupt assertion is skipped for battery host event. Run 'ectool
hostsleepstate resume' and verify interrupt is again asserted by the
battery host event.
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Original-Change-Id: I74288465587ccf7185cec717f7c1810602361b8c
Reviewed-on: https://chromium-review.googlesource.com/368391
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
(cherry picked from commit de4d25964de310effe8ede09e5ba6fa2f40dc52b)
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Conflicts:
board/kevin/board.h
include/config.h
include/ec_commands.h
power/common.c
util/ectool.c
Change-Id: Ic9e8a2677e43de8b11177f60510f7ab8da0fbaa6
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/438068
Reviewed-by: Alexandru Stan <amstan@chromium.org>
Reviewed-by: Simon Glass <sjg@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=chromium:633694,chrome-os-partner:60882
BRANCH=veyron
TEST=Flash kevin; verify that no more console spam is present on the EC.
Original-Change-Id: I240fbe330952b82e2a5f97d0be7ebe4b2a8e2b46
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/365470
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
(cherry picked from commit f5ec39ee0f70ec041eb739f931608e6ee1f96860)
Conflicts:
common/mkbp_event.c
Change-Id: Ia9e641c230538f231b906d73cae548626adf50e6
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/438067
Reviewed-by: Alexandru Stan <amstan@chromium.org>
Reviewed-by: Simon Glass <sjg@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After commit 237406c5b12ed9934fc6eab7d24f30ba6e70fdce, there is chance
that pd_power_supply_reset() will be called during S0->S3, and it
interrupts AP and fails suspend if we are using MKBP_EVENT.
This is because mkbp_send_event() does not check power state POWER_S0S3.
Modify the condition to check events when AP is not in S0.
BRANCH=none
BUG=chrome-os-partner:50833,chrome-os-partner:6082
TEST=powerd_dbus_suspend always works without being resumed
Signed-off-by: Koro Chen <koro.chen@mediatek.com>
Reviewed-on: https://chromium-review.googlesource.com/331160
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Milton Chiang <milton.chiang@mediatek.com>
Reviewed-by: Wei-Ning Huang <wnhuang@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
(cherry picked from commit fe996b200c36e5ce6134250ef60e0e6b30b9183b)
Change-Id: Id905a2cd4d2a0376bca163f40c68bcf4208d8bf5
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/438066
Reviewed-by: Alexandru Stan <amstan@chromium.org>
Reviewed-by: Simon Glass <sjg@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When AP is suspended, only predefined events could wakeup AP.
Check EC_MKBP_EVENT_KEY_MATRIX event when we use embedded keyboard to make AP
wakeup from S3 power state.
BRANCH=veyron
BUG=chrome-os-partner:47554,chrome-os-partner:60882
TEST=Enter "powerd_dbus_suspend" in AP console to make system
suspend and then press embedded keyboard to wakeup AP.
Signed-off-by: YH Huang <yh.huang@mediatek.com>
Reviewed-on: https://chromium-review.googlesource.com/312156
Tested-by: Wei-Ning Huang <wnhuang@chromium.org>
Reviewed-by: Wei-Ning Huang <wnhuang@chromium.org>
Reviewed-by: Rong Chang <rongchang@chromium.org>
(cherry picked from commit e5544226e459506b503b4ba19cf31d6256645a56)
Change-Id: I79f91776c39554a4e488e50841d3537fe85fea13
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/438065
Reviewed-by: Alexandru Stan <amstan@chromium.org>
Reviewed-by: Simon Glass <sjg@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add CONFIG_MKBP_WAKEUP_MASK, which is a white list in board level,
only allow those events to wakeup the AP during S3 power state.
BUG=chrome-os-partner:60882
BRANCH=veyron
TEST=None
Change-Id: I8bfd744cf252672d06ac722c64ecb4c7aaa5d6d1
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/419864
Reviewed-by: Simon Glass <sjg@google.com>
Reviewed-by: Shawn N <shawnn@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It may use MKBP event to send PD power change events to AP via interrupt.
According to the spec, AC power change events do not be allowed to
wake up AP. In order to avoid it, define a white list in board level,
only allow those events to wakeup the AP during S3 power state.
BRANCH=none
BUG=chrome-os-partner:45127
TEST=manual
Plug PD power adapter to oak, if system is in S3/S5 and it should
starts charging, but should not wake up system/AP at all.
Signed-off-by: Ben Lok <ben.lok@mediatek.com>
Reviewed-on: https://chromium-review.googlesource.com/300360
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
(cherry picked from commit 0596b551dfd45dd4af2e8f7a0baad1141d25bfb8)
Conflicts:
board/oak/board.h
include/config.h
Change-Id: I2f86697d5d3bd24d7de840e21064b91e8841f0eb
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/419942
Reviewed-by: Simon Glass <sjg@google.com>
Reviewed-by: Shawn N <shawnn@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update sensor information to work with new sensor stack.
Enable sensor FIFO
BUG=b:27849483
BRANCH=veyron
TEST=Install on minnie, check with AIDA64 the sensor information is
valid. Check with ectool motionsense the matrices are valid.
Check chrome handle tablet mode properly.
Still need to check why the battery is not found anymore.
Change-Id: Id1d425efddc09dc572e74069bbd728b1cb2ff996
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/378327
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To save space, remove the default case that never happens.
The case become equivalent to a __builtin_clz(sensor_active) - 27,
but by leaving the other case statement, we are not dependent on the
exact power state values.
BUG=b:27849483
TEST=With this change, we save 40 bytes.
BRANCH=none
Change-Id: Idea0791f3cf50c1b3558112c877119ac1515fea6
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/378331
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From the specs, "KX022-1020 Specifications Rev4.0", the power up time
can be as long as 10ms.
Add a loop to be sure the device is responsive before initalizing it.
BRANCH=reef,glados,oak,veyron,cyan
BUG=none
TEST=After putting a KX022 accel as first in the list, it would not
initialize properly. After adding the loop, it initializes properly.
Change-Id: I3194a5d1deb0c2eb2a04a459aab3b4269e479af3
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/394750
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
(cherry picked from commit 09f90a3b8f0f48d11b3653ad2af1d61c29691a48)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/404901
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Limit the ODR range to write a more compact function.
Given EC typically needs accels running at 10Hz for lid angle
calculation and ODR is limited at ~200Hz by the EC collection speed,
limiting the range is acceptable.
BUG=b:27849483
TEST=tested on Cyan, save 64 bytes on minnie.
BRANCH=veyron,cyan
Change-Id: I284c6fe90fd76b4b60547d4e6f53343df6083b33
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/378720
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To save space, set the resolution to its maximum and range to +/- 8G.
Range is never set from the AP, Android assume 8G.
Resolution is never set from the AP set to 12/16bit depending on the
accelerometer.
BRANCH=veyron
BUG=b:27849483
TEST=compile, save 384 bytes.
Change-Id: Iee359e600e7cfa03551fe4656f40cb41e123a856
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/378334
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Accelerometer data is read-only in motion_lid, add const to help the
compiler.
BRANCH=veyron
BUG=b:27849483
TEST=compile
Change-Id: I487030318b63a2decd4a57cd8ee0d965628a344b
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/372311
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
(cherry picked from commit 2c9c6581bd1acfb7422726254678763699475054)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
(cherry picked from commit 0a9d185eed6d7c064f58962e7552537e22251ceb)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/378329
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
_FIFO was too general, use the right define.
BRANCH=samus, veyron
BUG=b:27849483, b:27849483
TEST=Compile when GESTURE is not defined.
Change-Id: I0c1e9b3de0e322f40f955af6ce2e51a6775f389d
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
(cherry picked from commit 948c7510baddfc1011e5998ffc8a1f310b3961f6)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/378326
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To save space of working image, make the console memory commands
optional.
BRANCH=veyron
BUG=b:27849483, b:27849483
TEST=Compile, save 320 bytes.
Change-Id: Ia538b30b4c06955c44b29eb22ed1a09fad83bd9e
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
(cherry picked from commit 36ce3451c1ea630793aed425c1c31645598a11f2)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/378330
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Redundant, already set by the compiler.
BRANCH=veyron
BUG=b:27849483
TEST=compile.
Change-Id: I4d1c7263034c0cef1a6484a516edb3893c11945f
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
(cherry picked from commit 2cc34505b96fee344dd4ff4d6f56b084d62a8c25)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/378333
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When CONFIG_MKBP_EVENT is enabled, the current code is incorrect because
we have a race condition when sending a new event (we force first the
interrupt, then send the actual event content to the mkbp event
framework which forces again the interrupt level).
If the software still called EC_CMD_MKBP_STATE while CONFIG_MKBP_EVENT
is enabled, this will kill the interrupt as soon as the FIFO is empty
even though other events are pending in order to be backward compatible
with firmware using the interrupt has a hint when polling the keyboard.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=none
BUG=chrome-os-partner:33194
TEST=make buildall
fiddle with keyboard on Oak.
Change-Id: Iafaf4174124934328c4a0172adeca651e5551f28
Reviewed-on: https://chromium-review.googlesource.com/274070
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Trybot-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
(cherry picked from commit ebc3b8b93c43f09d39a6273fffa5e65b231724b8)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/404900
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove code to set interrupt threshold, unused and broken.
BUG=chromium:426659
BRANCH=kevin
TEST=compile
Change-Id: I11362d3f7131bfe9849be26edeaeb768463c0c7f
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/382675
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
(cherry picked from commit 76e66c04f3add770f2a21b76277a65c6e70f7ccb)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/404899
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the interrupt generator is now spawned right after the hooks task
and the generator can generate interrupts whenever it wants, it's
possible for an interrupt to fire before task switching is enabled.
When this happens, the main thread needs to be suspended so that the IRQ
can be serviced.
BRANCH=None
BUG=None
TEST="make clobber && make -j buildall tests" several times."
Change-Id: I5fb4f17666e3db9c670c4352bb36b84e4606dfa0
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/285634
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Trybot-Ready: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/413111
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Tested-by: Gwendal Grignou <gwendal@chromium.org>
Commit-Queue: Gwendal Grignou <gwendal@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that HOOK_INIT hooks are called from a task switching context, most
calls to task_start_called() should no longer be needed. This commit
removes them.
BRANCH=None
BUG=chrome-os-partner:27226
TEST=make -j buildall tests
TEST=Flash EC image onto samus and verify EC boot, AP boot, keyboard,
lid, and tap-for-battery all functional.
TEST=Flash EC image onto samus_pd and verify charging still works.
TEST=Flash EC image onto ryu(P3) and verify that EC boot.
TEST=Added ASSERT(task_start_called()) to the places where I removed
task_start_called(). Booted samus, samus_pd, cyan, and ryu with AC
inserted and verified that no ASSERT's were hit upon boot.
Change-Id: Ic12c61862e85ca3a0a295beedbb4eeee6d5e515b
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/285635
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Trybot-Ready: Aseda Aboagye <aaboagye@chromium.org>
(cherry picked from commit d74949e3e68c000ead762d5acf42a5e967d2d976)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/404898
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit changes the way in which tasks are started. Instead of
having all tasks marked as ready to run upon initialization, only the
hooks task is marked as ready to run. HOOK_INITs are now run at the
beginning of the hooks task. After the HOOK_INITs, the hooks task calls
back to enable the rest of the tasks, reschedules, and proceeds as
usual. This also allows the removal of checks for task_start_called().
BUG=chrome-os-partner:27226
BRANCH=None
TEST=Built and flash EC image for samus and verified that EC boot was
successful as well as AP boot. Additionally, verified that charging,
keyboard, tap-for-battery were all still functional.
TEST=make -j buildall tests
Change-Id: Iea53670222c803c2985e9c86c96974386888a4fe
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/283657
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
(cherry picked from commit fbc84dc56566f31d897b420232088ba341810ea2)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/404897
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current largest task size is not big enough,
we get stack overflow after one or several calibration requests.
BRANCH=smaug
BUG=chrome-os-partner:45570
TEST=After the change a loop of calibrate does not crash the EC.
Change-Id: I9681a890eddf274ab496e8ca6249c7ebca5edab5
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/301215
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
(cherry picked from commit dbfb5c1deeb6ee54663baaee6052849b8cba5bd5)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/404896
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove keyboard printk like: KB wait/poll when not debugging keyboard.
BUG=none
BRANCH=none
TEST=compile.
Change-Id: I9743eab4597d2b661ae7b21c0aab4e1ffdcdb9a4
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/394068
(cherry picked from commit ce92dd27dfa2b60cf4443da5eb47c51d8c7170bf)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/404895
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Put the common code for set_[data_rate|range|resolution] in the same
function
BUG=b:27849483
TEST=tested on Cyan, save 128 bytes on minnie.
BRANCH=glados
(cherry picked from commit 79c74a2a662cdc6d9ea0d8729ca4fb1d641400e5)
Reviewed-on: https://chromium-review.googlesource.com/379099
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Change-Id: Ie66f64a478ad73c2a46129a664f2a6c60c5157bc
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/379544
(cherry picked from commit 3798d8e8cc02105136f197a7bdc7ed8489213d44)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/393976
Reviewed-on: https://chromium-review.googlesource.com/378719
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Field is not required: sensor->chip already has that information.
BRANCH=glados
BUG=none
TEST=compile
(cherry picked from commit 90fcd6be2b5d2104301efef295113d7816e14042)
Reviewed-on: https://chromium-review.googlesource.com/379096
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Change-Id: I6c0bc2e71d7c848968caa78c749dd3fb916f6263
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/379541
(cherry picked from commit 5a01bd89baedea18305742078f32adfe84f8ff9f)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/393974
Reviewed-on: https://chromium-review.googlesource.com/378328
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
elm EC console output is very spammy, as EC_CMD_MOTION_SENSE_CMD
is called every 100ms, so we want to set "hcdebug" to "off" as
the default (which still includes errors, but no "normal"
commands).
BRANCH=samus
BUG=chrome-os-partner:55001, b:27849483
TEST=make buildall -j
TEST=Flash elm EC, see that output is fairly quiet.
Change-Id: I70d91c291d934b4f032e5c57f3c333e2c10b93bc
Reviewed-on: https://chromium-review.googlesource.com/359112
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
(cherry picked from commit bdfba870636632cd66030b99f631c696b2ad1343)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/378325
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If wait_us < 0, comparison against motion_min_interval actually fails,
and this negative wait_us causes task_wait_event() never returns if we
are not using any motion task event except the timer. The motion task
will then stop running and sensor data stay unchanged.
BRANCH=samus
BUG=chrome-os-partner:54092, b:27849483
TEST=hardcode wait_us to a negative value before motion_min_interval check,
and see motion task is still running by EC console cmd timerinfo
Change-Id: Ic1e7ffeeb9d2ec1f5c5beb4387294014298123af
Signed-off-by: Koro Chen <koro.chen@mediatek.com>
Reviewed-on: https://chromium-review.googlesource.com/358332
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
(cherry picked from commit 3f5d978bd523caf5797fcfeed08a5d28e6d31d79)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/378324
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, it is assumed the host will sooner or later retrieve the
events from the sensor ring: It is only used by Android and the sensor
HAL is enabling the ring buffer at boot.
But if nobody processes the ring, and the ring is almost full, the EC will
generate interrupt for every new events.
This can happen with ARC, where events generated for ChromeOS
will be in the ring but nobody will process them until Android is
started.
Add a command to allow sending ring MKBP events. It will be used when
the IIO ring buffer is enabled / disabled.
It also can be used for preventing raising interrupt when the device is
about to go to sleep.
BRANCH=ryu,cyan, samus
BUG=b:25425420,b:27849483, b:27849483
TEST=Check with fiforead that no events are queued when IIO ring
buffer is disabled.
Check with ectool and androsensor that interrupt generation stops.
Change-Id: Ibc85eed2e0eae3a9ec07d191e692118bc2fd0dab
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/356689
(cherry picked from commit f6b26dee24f4a4006e1a5509031972f8c0b5e9fc)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/378323
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a host event to support MKPB:
When sent, the ACPI code will send a notification to the kernel
cros-ec-lpcs driver that will issue EC_CMD_GET_NEXT_EVENT.
We can allow code (sensor stack for instance) that uses MKBP to work
on ACPI based architecture.
Obviously, host event over MKPB is not supported.
BRANCH=none
BUG=b:27849483
TEST=Check we get sensor events on Cyan through the sensor ring.
(cyan branch)
Change-Id: Iadc9c852b410cf69ef15bcbbb1b086c36687c687
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/353634
Reviewed-by: Randall Spangler <rspangler@chromium.org>
(cherry picked from commit 00aef53a7b4c1a302b8f1448f2c634712c7b77eb)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/378322
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added new host command to support returning lid angle.
New output from ectool:
System with lid angle support:
------------------------------------------
localhost ~ # ectool motionsense lid_angle
Lid angle: 72
System without lid angle support:
------------------------------------------
localhost ~ # ectool motionsense lid_angle
EC result 3 (INVALID_PARAM)
BUG=b:27849483
BRANCH=samus
TEST=run "ectool motionsense lid_angle"
verify the value matches the physical lid angle position
Change-Id: I4179172c778f643640561e819216f7adfee679d2
Signed-off-by: Kevin K Wong <kevin.k.wong@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/313345
Reviewed-by: Shawn N <shawnn@chromium.org>
(cherry picked from commit e24ac972e21d60a65d15e957605e8b78bd25e039)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/378321
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
refer to commit 574c8065710432f5a91fd8dd11d1fa28e2be1f3b,
adds the lid accelerometer to the list of motion sensors on the rev5.
Since commit bc404c94b4ab1e6a62e607fd7ef034aa31d6388e,
math_util.c is no longer to include "math.h" header file.
BUG=chrome-os-partner:50312
BRANCH=samus
TEST=Build Oak EC with driver enabled and verify that valid
accelerometer data is read, and that range, resolution, and odr can all
be modified.
TEST=Verified that signs of accelerometer data conform to those shown in
the doc.
TEST=make buildall tests
Change-Id: I8df1b2331a1fbea82015b97985541e2ebc393d10
Signed-off-by: Ben Lok <ben.lok@mediatek.com>
Reviewed-on: https://chromium-review.googlesource.com/319332
Commit-Ready: Rong Chang <rongchang@chromium.org>
Reviewed-by: Rong Chang <rongchang@chromium.org>
(cherry picked from commit a36a6ca96e864b2ce193df0874d84360cfce0c9e)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/378319
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cl/301134 has a bug. If the AP wants a forced sensor (i.e. light) at
100Hz but a sampling frequency at 1s, we would still wake it up every
.1s instead of 1s.
Take in account force mode only when calculating the sampling frequency
not the interrupt interval.
BRANCH=smaug, samus
BUG=b:25425420, b:27849483
TEST=Check the device goes to suspend even with 40Hz light sampling
rate:
echo 0 > /sys/bus/iio/devices/iio:device0/frequency
echo 40000 > /sys/bus/iio/devices/iio:device3/frequency
echo mem >/sys/power/state
Before it would resume just after suspend/while suspending.
Change-Id: Ie4fe36268cb1b04bc8f01ec885af84fad9e8b282
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/314315
Reviewed-by: Alec Berg <alecaberg@chromium.org>
(cherry picked from commit 70915b501249017e4e962316bf178fd00d09e696)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/378318
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When sensor_shutdown() is called, the sensors may already been powered
off, or will be soon.
In that case, do not attempts to access them.
Check their state before setting range or disabling activities.
BRANCH=smaug, samus
BUG=chromium:557966, b:27849483
TEST=compile
Change-Id: I60640b120a23f9aab393a93c4c67ef17222ced4e
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/314382
Reviewed-by: Alec Berg <alecaberg@chromium.org>
(cherry picked from commit cef0fdb90e17fae3fd9f035bb6ada17e2833369e)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/378317
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In case the actual ODR rate is way higher that the AP asked for,
we don't have to settle to a slower EC rate if
EC rate == AP requested ODR rate.
BRANCH=smaug, samus
BUG=b:27849483
TEST=Run android.hardware.cts.SingleSensorTests
Change-Id: I437f47bd942a16694c7efcdbc00201352f0480a6
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/313641
Reviewed-by: Alec Berg <alecaberg@chromium.org>
(cherry picked from commit 68502864c7db47b0dae250600dec5531c5f35619)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/378316
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AP could collect samples while motion task was still adding timestamp.
A data stream not ending with a timestamp can lead to timestamp error in
the kernel.
This is espcially true if the motion task interrupt the AP back to back,
when sensor ODR changes for instance.
BRANCH=smaug, samus
BUG=b:24367625, b:27849483
TEST=Run android.hardware.cts.SingleSensorTests
Change-Id: I5820216a2cfc0a869db7dc5ef75d4be126a53b4f
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/313640
Reviewed-by: Alec Berg <alecaberg@chromium.org>
(cherry picked from commit 708f81e3d1d222270c697b5643760b1ca361b9f9)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/378315
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Throughout the code, there are comparison between frequency (in mHz) and
period (in us). To improve readability, append units (_mhz, _us) after
variable names.
BRANCH=smaug, samus
BUG=b:27849483
TEST=compile.
Change-Id: Icc9c66d9f06c526fc3b74fd85ca9759b702ee416
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/313221
Reviewed-by: Alec Berg <alecaberg@chromium.org>
(cherry picked from commit 87a60df71f24aca95a485662e30a94076c75b0e0)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/378314
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need to wake up the main task, even if we disable a sensor. It will
force sending the sensors samples in the FIFO and put a timestamp behind
them.
Also, reduce the interrupt period by 10us to be sure we fire interrupt
to the AP even if there are some variation in the timing calculation.
BUG=b:24367625, b:27849483
BRANCH=smaug, samus
TEST=Run ts.SingleSensorTests overnight.
Change-Id: I6d966d52b5cbb72ba5eb936bc2fad6c06c7d8605
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/312986
Reviewed-by: Alec Berg <alecaberg@chromium.org>
(cherry picked from commit 9d7f1674460ce8e1a9c2fab79909cfd3bc856807)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/378313
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If EC sampling rate is close to sensor rate, decrease sampling frequency
by 5% to prevent samples by the EC without data.
It can happen when the clocks are slightly different and get
unsynchronized.
BRANCH=smaug, samus
BUG=b:24367625, b:27849483
TEST=Ran cts.SingleSensorTests overnight without error.
Change-Id: Iab5e578763171411eb474e1e717167c8e1ef7ecf
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/312985
Reviewed-by: Alec Berg <alecaberg@chromium.org>
(cherry picked from commit d98999f3685ddbd27af86e1d96f2af030af9beab)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/378312
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To ease finer calculation of ec rate change units from
ms to us.
BRANCH=smaug
BUG=b:24367625
TEST=compile
Change-Id: I52057c8ca1b1180a64b58d1ba0af9ec53f40b026
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/312984
(cherry picked from commit 420099f74976b3af1f4b24dc24b9fec461b1037b)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/378311
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Overly complex previous formula could lead the EC to throw all samples
between 2 timestamps and put 2 event within one timestamp.
That would confuse the kernel. If the motion sense task is delayed while
this happen, the delta between the 2 samples could be so long that
CTS test cts.SingleSensorTests would fail.
BRANCH=smaug, samus
BUG=b:24367625, b:27849483
TEST=Loops of cts.SingleSensorTests pass.
Change-Id: I29e6bf354ccb7ecf741a91116854d6abe07558dc
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/312364
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
(cherry picked from commit 96b65354878587df434becfbc5d707a687c85fa4)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/378310
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Ryu EVT2, where sensors share a 100kb i2c bus with other device,
when the sensors set to their maximal frequency and sampling interval
set to 5ms, the power management task would wait forever for the i2c
lock.
Increase the minimal amount of time the task can wait from 3ms to 8ms in
that case.
This is not an issue for Ryu PVT where the sensors are on a separate SPI
bus. However, on EVT, when setting the accelerometer/gyro over 125Hz, EC
won't be able to deliver the data in non-batched mode.
BRANCH=smaug, samus
BUG=b:25510300, b:27849483
TEST=Without this change, an evt2 board would crash when plugging/unplugging
the charger while the sensors are set with:
echo 200000 > iio:device0/frequency # Accel
echo 5 > iio:device0/sampling_frequency
echo 200000 > iio:device1/frequency # Gyro
echo 25000 > iio:device2/frequency # Mag
Change-Id: Idb30da9ab8da61284388db73365c37be3a250dec
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/311755
Reviewed-by: Alec Berg <alecaberg@chromium.org>
(cherry picked from commit 66a72f0b6e379edc3a2a52fa2e9b0f66c557a447)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/378309
|