summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Clear OWNERS for factory/firmware branchfirmware-oak-8438.BBrian Norris2021-09-112-10/+1
| | | | | | | | | | | | 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/+/3155213 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Owners-Override: Jora Jacobi <jora@google.com> Tested-by: Jack Rosenthal <jrosenth@chromium.org>
* hana: lower the maximum allowed ODR to 100HzGwendal Grignou2019-10-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | Some tests are failing on Hana at the highest ODR. This is likely due to Hana not having a dedicated GPIO path for MKBP events, instead relying on the ACPI path which is known to have lower latency guarantees than we expect. Lowering the ODR allows the tests to pass more reliably. They were passing before CL:1536488, when ODR was reported at 100Hz to ARC++. BUG=b:142026126 BRANCH=elm TEST=[TBD]: Compile, loaded on Hana, pass on R79: CTS_P.9.0_r9.x86.CtsSensorTestCases Change-Id: I31d74c5e4316fdddcbdaf693731c5a5ba0b13881 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1839195 Reviewed-by: Kazuhiro Inaba <kinaba@chromium.org> Commit-Queue: Kazuhiro Inaba <kinaba@chromium.org> Tested-by: Kazuhiro Inaba <kinaba@chromium.org>
* poppy: Lower sensor max ODRGwendal Grignou2019-10-041-2/+9
| | | | | | | | | | | | | | | | | | | | | EC seems to miss sample while providing sensor data at 200Hz. Limit sensors ODR to 100Hz. BUG=b:67112751,b:142026126 BRANCH=oak TEST=compile Reviewed-on: https://chromium-review.googlesource.com/753434 Commit-Ready: Li1 Feng <li1.feng@intel.com> Tested-by: Li1 Feng <li1.feng@intel.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> (cherry picked from commit c5c061f9b5707205bb32abdac15dc14a9af14800) Change-Id: Ic324c3d989854ae8b7f6b27bf6338266ce01ceda Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1839194 Reviewed-by: Kazuhiro Inaba <kinaba@chromium.org> Commit-Queue: Kazuhiro Inaba <kinaba@chromium.org> Tested-by: Kazuhiro Inaba <kinaba@chromium.org>
* driver: set Kionix accel min frequency to 12.5HzEnrico Granata2019-06-192-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The EC is running at 10Hz itself, so it won't be able to properly handle frequencies below that threshold, and data will end up being sent to the kernel at 10Hz. This is a source of CTS issues on some devices, as Android expects to be able to program the sensor to send data at 1Hz given the sensor's configuration parameters. Fix the issue by picking the closest frequency above 10Hz that the accelerometer supports, i.e. 12.5Hz Conflicts: MOTION_MAX_SENSOR_FREQUENCY not defined in the branch BUG=b:134422740 BRANCH=oak TEST=run CtsSensorTestCases, observe it pass Change-Id: I56772009817e3cbd452e96637c0a78f54f3854c7 Signed-off-by: Enrico Granata <egranata@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1647363 Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1667524 Reviewed-by: Allan Sword <asword@google.com> Commit-Queue: Allan Sword <asword@google.com>
* hana: sensors: add extra sensor attributesEnrico Granata2019-03-299-8/+91
| | | | | | | | | | | | | This is a direct port of CL:482703 to the oak firmware branch. BRANCH=oak BUG=b:129101597 TEST=build Change-Id: I51cb7e5ea57e2b79f6d92671286dd44ad0d3760b Signed-off-by: Enrico Granata <egranata@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1536488 Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
* hana:Add more battery informationtian.tian2018-11-051-0/+24
| | | | | | | | | | | | | | | | | | | Add battery information for: - SMP L17M3PB0 - LGC L17L3PB0 - Sunwoda L18D3PG1 BRANCH=oak BUG=b:117532984 TEST=none Change-Id: I30db092d63b9e361ec6014e7b63c11a7e2870ba8 Reviewed-on: https://chromium-review.googlesource.com/c/1314310 Reviewed-by: Lu Zhang <lu.zhang@bitland.corp-partner.google.com> Reviewed-by: Chao Ding <chao.ding@bitland.corp-partner.google.com> Reviewed-by: Philip Chen <philipchen@chromium.org> Commit-Queue: Lu Zhang <lu.zhang@bitland.corp-partner.google.com> Tested-by: Chao Ding <chao.ding@bitland.corp-partner.google.com>
* hana:Add battery informationtian.tian2018-10-251-5/+75
| | | | | | | | | | | | | | | | | | | Add battery information for: - SMP L18M3PG5 - LGC L18L3PG5 - Sunwoda L18D3PG5 BRANCH=oak BUG=b:117618412,b:117532984 TEST=none Change-Id: I4b359d6bb8dc6558daec215b086936b82e766ca0 Reviewed-on: https://chromium-review.googlesource.com/c/1296429 Reviewed-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Chao Ding <chao.ding@bitland.corp-partner.google.com> Reviewed-by: Xiong Huang <xiong.huang@bitland.corp-partner.google.com> Tested-by: Lu Zhang <lu.zhang@bitland.corp-partner.google.com> Commit-Queue: Xiong Huang <xiong.huang@bitland.corp-partner.google.com>
* hana/birch: Function board_spi_enable() be called more than once,SPI will be ↵gc2018-02-111-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | still disabled. After function board_spi_enable() called at first time, reset SPI in board_spi_enable(), and function spi_master_initialize() will be locked.If system from S0 state goto S3 state, and then back S0 state, board_spi_enable() will be called once through function board_chipset_resume() and board_spi_disable() not. So if keep the action(S0->S3->S0), SPI will be still disabled.Function board_spi_enable() called through board_chipset_resume() in S3 -> S0. Correspondingly it is better to call function board_spi_disable() through board_chipset_suspend() in S0 -> S3.On the other hand it is appropriate to call board_reset_sensors() through board_init() only in RW stage. BRANCH=oak TEST=1. Log in system with Guest mode. 2. Clode lid. 3. Open lid more than 180 degree. 4. Keyboard is still available. 5. Open VT2 , G-sensor data is constant with "ectool motionsense". Change-Id: Ia121983e772f6b44895393d25e697d5efcbf9fc6 Reviewed-on: https://chromium-review.googlesource.com/907710 Reviewed-by: Rong Chang <rongchang@chromium.org> Commit-Queue: wang bing <cherish.wang@bitland.com.cn> Tested-by: wang bing <cherish.wang@bitland.com.cn> Tested-by: Paul Ma <magf@bitland.corp-partner.google.com>
* hana/birch: Against the DUT can't probe G-Sensor stablygc2018-01-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | and hard reset for G-sensor to ensure it work normally. Making EC hard reset on G-sensor againest hana-300e can not probe G-sensor.Adding board_reset_sensors() calls to board_init() in RW,and there is no leakage from EC to G-sensor through SPI_pins during hard reset.During hard reset, falling time of VDD is about 13ms by catching signal,it is better to keep 'VDD off time' more than 10ms base on G-sensor's SPEC. BRANCH=oak BUG=b:69346100 TEST=1. measured G-sensor power up, and got the rise up time 2. press power button 10 second to power off. 3. power on the DUT 4. refresh + power button to cold reboot the DUT 5. Check the g-sensor by 'ectool motionsense' Change-Id: I470ce7386b171f9b3b1758013016210f2701124b Reviewed-on: https://chromium-review.googlesource.com/873590 Reviewed-by: Rong Chang <rongchang@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Tested-by: Xiong Huang <xiong.huang@bitland.corp-partner.google.com> Commit-Queue: Xiong Huang <xiong.huang@bitland.corp-partner.google.com>
* hana/birch: Against the DUT can't probe G-Sensor stablygc2017-12-122-3/+6
| | | | | | | | | | | | | | | | | | | | | | | and avoid leakage from EC to KX022 through SPI pins. Making EC power-up initializing to set SPI NSS pin low for effective againsting hana-300e can not probe G-Sensor stably.Adding gpio_set_level(*NSS, 1) calls to board_spi_enable() after POWER_3V3 powe up,which advoid leakage(70ms G-Sensor VCC level up to 1 VOLT) from EC to KX022 through SPI pins. BRANCH=oak BUG=b:69346100 TEST=1. measured G-sensor power up, and got the rise up time 2. press power button 10 second to power off. 3. power on the DUT 4. refresh + power button to cold reboot the DUT 5. Check the g-sensor by 'ectool motionsense' Change-Id: I06dbce828fe0b2135bf991318443bd2adf7245cf Reviewed-on: https://chromium-review.googlesource.com/787490 Reviewed-by: Rong Chang <rongchang@chromium.org> Commit-Queue: Cherish Wang <cherish.wang@bitland.corp-partner.google.com> Tested-by: Cherish Wang <cherish.wang@bitland.corp-partner.google.com>
* pd: Ignore Augmented PDOs when choosing PDO to request.Todd Broch2017-11-302-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Augmented PDOs are part of the PD3.0 specification. As present USB PD sinks can't support these PDO types we need to ignore them. Signed-off-by: Todd Broch <tbroch@chromium.org> BRANCH=samus,glados,oak,gru,reef BUG=b:37476637 TEST=manual, On samus, plug-in blackcat (EVT) charger and see it ignore these Augmented PDOs when making its PDO request. Original-Change-Id: I28a0377e1486368f25f37cad640af71244a4c30b Originally-Reviewed-on: https://chromium-review.googlesource.com/484687 Commit-Ready: Todd Broch <tbroch@chromium.org> Tested-by: Todd Broch <tbroch@chromium.org> Reviewed-by: Benson Leung <bleung@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> (cherry picked from commit 49c776b5b78462ae2118fca240f7fb5df7dc444c) Change-Id: I372c4cde3bd3521fd21d830fcd73f6bc462199f4 (cherry picked from commit c37e9e6f04148b9074262387c40ed27681e7472a) Reviewed-on: https://chromium-review.googlesource.com/506887 Reviewed-by: Benson Leung <bleung@chromium.org> Commit-Queue: Todd Broch <tbroch@chromium.org> Tested-by: Todd Broch <tbroch@chromium.org>
* pd: prefer CD pin assignments over EF for USBC->USBC case.Todd Broch2017-11-301-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Todd Broch <tbroch@chromium.org> BRANCH=samus,glados,oak,gru,reef BUG=chromium:694597 TEST=manual, connect samus to USB-C monitor via cable and see it select pin assigmnent 'C' Original-Change-Id: Iddad5b654715bd30ba081c62f8fb53e07816498c Originally-Reviewed-on: https://chromium-review.googlesource.com/465379 Commit-Ready: Todd Broch <tbroch@chromium.org> Tested-by: Todd Broch <tbroch@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> (cherry picked from commit a8e6b070cbd107d8c2f44f44ae8231a4f4efea90) Change-Id: Ibbe7a0368ad4e7dc44ef22d2bd546bf72c75b9b4 Reviewed-on: https://chromium-review.googlesource.com/506666 Reviewed-by: Benson Leung <bleung@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Queue: Todd Broch <tbroch@chromium.org> Tested-by: Todd Broch <tbroch@chromium.org>
* Re-enable Google USBC peripheral FW updates.Todd Broch2017-11-305-5/+75
| | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Todd Broch <tbroch@chromium.org> BRANCH=glados,gru,oak BUG=chrome-os-partner:57458 TEST=usbpd_GFU Original-Change-Id: I5a6bfde742a5c698680f99f342b1696084fd002a Originally-Reviewed-on: https://chromium-review.googlesource.com/397862 Commit-Ready: Todd Broch <tbroch@chromium.org> Tested-by: Todd Broch <tbroch@chromium.org> Reviewed-by: Benson Leung <bleung@google.com> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> (cherry picked from commit 35e580b7a9d0dedbb2664dbfd694ab5bd3a87226) Change-Id: I683460fad171760fdeee49fd49d6fc9c804141a4 Reviewed-on: https://chromium-review.googlesource.com/506665 Reviewed-by: Benson Leung <bleung@chromium.org> Commit-Queue: Todd Broch <tbroch@chromium.org> Tested-by: Todd Broch <tbroch@chromium.org>
* pi3usb9281: sync USB switch hardware control with switch stateRong Chang2017-11-101-0/+3
| | | | | | | | | | | | | | | | | When sysjump to another image, if USB switch state and HW switch control are not sychronized, the switch can be left in open state. This CL resets USB switch on init to close USB. BRANCH=oak BUG=b:36234142 TEST=manual plug BC1.2 charger, sysjump to another EC image and unplug the chager. check pi3usb9281 control register(02h) bit2 == 1. Change-Id: I46c9b9b07cae91b86269e424364249355960d874 Signed-off-by: Rong Chang <rongchang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/758496 Reviewed-by: Shawn N <shawnn@chromium.org>
* hana: Add EC console USART internal pull-upRong Chang2017-10-201-1/+1
| | | | | | | | | | | | | | | This change prevents the floating RX console pin from entering unwanted commands. BRANCH=oak BUG=b:67033247 TEST=manual load on hana and probe USART RX pin Change-Id: I6dc05e03f82dcc71ea6f957f93c5fe7c6b65d2bf Signed-off-by: Rong Chang <rongchang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/729721 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* driver: kionix: Add software reset flow for KX022Yidi Lin2017-08-022-38/+62
| | | | | | | | | | | | | | | | | | | Kionix suggests that it is recommended to issue the Software Reset command after the device was powered. This is effective against dynamic or non-liner behavior of a power supply or unexpected noise above normal on the power rail during a power up. BRANCH=oak BUG=b:62607555 TEST=1. press power button 10 second to power off. 2. power on the DUT 3. refresh + power button to cold reboot the DUT 4. Check the g-sensor by 'ectool motionsense' Change-Id: I362f2af59253519aa35b72cfb6b666c49e425777 Signed-off-by: Yidi Lin <yidi.lin@mediatek.com> Reviewed-on: https://chromium-review.googlesource.com/536723 Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
* Common: charge timeout function should exclude manual mode in factory.Ryan Zhang2017-07-181-1/+2
| | | | | | | | | | | | | | | | | Clear deadline & battery_seems_to_be_dead(use for LED indicator) when system is in manual mode. BUG=chrome-os-partner:53590 BRANCH=glados-7820.B TEST=system won't be timeout after switching between ectool chargecontrol normal/idle/discharge Change-Id: Iadb2963aedb9d8414f5ca3f9ae105f8be772c340 Signed-off-by: Ryan Zhang <ryan.zhang@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/567611 Reviewed-by: Shawn N <shawnn@chromium.org> (cherry picked from commit a5d1b7169f7ca04cbac7c5bab33602b9eb6f49b4) Reviewed-on: https://chromium-review.googlesource.com/569281
* elm: some 15W TypeC adapters will cause CPU throttledRyan Zhang2017-07-172-0/+23
| | | | | | | | | | | | | | | | | We get adapter type: CHARGE_SUPPLIER_TYPEC and set input current limit to 3000mA and PROCHOT_AC is 3072mA by default. However these two limitation values are so close that ISL9237 will trigger prochot and cause CPU throttled. BUG=b:62291338 BRANCH=oak-8438.B TEST=CPU throttling was release after 0x47 is set to 3200 Signed-off-by: Ryan Zhang <ryan.zhang@quanta.corp-partner.google.com> Change-Id: I9d25901c14e37d27883d87427cc660004e0624d6 Reviewed-on: https://chromium-review.googlesource.com/572888 Commit-Queue: Ryan Zhang <ryan.zhang@quanta.corp-partner.google.com> Tested-by: Ryan Zhang <ryan.zhang@quanta.corp-partner.google.com> Reviewed-by: Shawn N <shawnn@chromium.org>
* elm: Increase MOTION stack after ARC++Gwendal Grignou2017-04-231-1/+1
| | | | | | | | | | BUG=b:35584721 TEST=compile Change-Id: If8b3d7c339f4fda913026eaf1eed2253af3fc0cc Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/484784 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* hana/birch: Add support for Sunwoda batteryYidi Lin2017-04-181-8/+114
| | | | | | | | | | | | | | | Hana and Birch use same board files but have different batteries. Refactor battery_hana.c to support multiple battery profiles. BUG=b:35586837 BRANCH=oak TEST=verified with Simplo and Sunwoda battery Change-Id: Ib5050798c583aa8f358431888f8f6b028c9219aa Signed-off-by: Yidi Lin <yidi.lin@mediatek.com> Reviewed-on: https://chromium-review.googlesource.com/428526 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Rong Chang <rongchang@chromium.org>
* driver: kionix: Add checking whoami value at initialization.Yidi Lin2017-04-053-1/+3
| | | | | | | | | | | | | | | | spi_transaction() always returns success even without the sensor. Check whoami value to make sure that the sensor is existed. BUG=none BRANCH=none TEST=remove LID accel sensor from elm and see init failed log. [1.258973 Lid Accel: 1: init failed: 4] Change-Id: I55aa35bc9790e5dec61e22aa2f51243e29368a86 Signed-off-by: Yidi Lin <yidi.lin@mediatek.com> Reviewed-on: https://chromium-review.googlesource.com/453579 Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/454503
* birch: Configure power LEDYidi Lin2017-03-221-1/+3
| | | | | | | | | | | | | Birch's Power LED is controlled by GPIO_POWER_LED1. BUG=chrome-os-partner:62088 BRANCH=oak TEST= Change-Id: I5e1b26d630e56bc3a3933a0061014ab7e2e748c5 Signed-off-by: Yidi Lin <yidi.lin@mediatek.com> Reviewed-on: https://chromium-review.googlesource.com/428599 Reviewed-by: Rong Chang <rongchang@chromium.org>
* elm / hana: Enable CONFIG_USB_PD_COMM_LOCKEDRong Chang2017-03-031-0/+1
| | | | | | | | | | | | | | | | Enable CONFIG_USB_PD_COMM_LOCKED to disable PD communication in locked RO. BUG=b:35871692 BUG=b:35881069 TEST=manual on elm. lock system and boot to recovery, then verify PD communication isn't functional. BRANCH=oak Change-Id: I33b07512e8fa0d7ff2c1909ff33bcb6ced2cde04 Signed-off-by: Rong Chang <rongchang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/449515 Reviewed-by: Shawn N <shawnn@chromium.org>
* stm32f09x: fix flash protection offsetRong Chang2017-02-275-1/+116
| | | | | | | | | | | | | | | | | | | | | | STM32F091VC has 32 flash protection sectors (31 x 4KB + 1 x 132KB), which doesn't fit the layout requirement in config_std_internal_flash.h. This CL hardcodes the layout and flash bank mapping. BUG=chrome-os-partner:62372 BUG=chromium:694972 TEST=load on elm and manually enable write protect using flashrom # flashrom -p ec:dev=0 --wp-enable check ec console write protect option bytes, bank 31 is writable > rw 0x1ffff808 read 0x1ffff808 = 0xff00ff00 > rw 0x1ffff80c read 0x1ffff80c = 0x7f80ff00 BRANCH=oak Change-Id: I23dcf87bfbcd2f37e97a87e94847dce1ea1d343c Signed-off-by: Rong Chang <rongchang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/446800 Reviewed-by: Shawn N <shawnn@chromium.org>
* pd: Reduce VDO_CMD_GET_LOG timeout to 75msShawn Nematbakhsh2017-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | VDO_CMD_GET_LOG is sent for each port from a host command handler, so we must ensure that it returns quickly to prevent host timeout. BUG=chrome-os-partner:61910 BUG=chrome-os-partner:51394 BRANCH=gru TEST=Manual on kevin, attach hoho and verify 'cros-ec-spi' timeout errors are not seen every 60s. Also verify that zinger pdlogs are correctly retrieved. Change-Id: Ie0466a8b614ec6bfe5874cde9d700e80a15d298e Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/428164 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Todd Broch <tbroch@chromium.org> (cherry picked from commit a904328c5d13e2b6e41dd8989273143f6083651a) Reviewed-on: https://chromium-review.googlesource.com/440050 Commit-Queue: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Trybot-Ready: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Rong Chang <rongchang@chromium.org>
* tcpm: enable pd message passing after hard resetDivya Sasidharan2017-02-031-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | On ANX port connecting hoho and issuing hard reset never recovered. From TCPCI spec R1.0.4.7.2 "TCPM writes to the RECEIVE_DETECT register to enable PD message passing". This was missing when the port sent HARD RESET when it acts as SRC. BRANCH=none BUG=chrome-os-partner:61377 TEST= On Electro, on anx port, connect hoho and issuing pd 0 hard successfully recovers from hard rst Change-Id: Ia2cfcaf52b88fbc24ee702c6a089389400eb42d1 Signed-off-by: Divya Sasidharan <divya.s.sasidharan@intel.com> Reviewed-on: https://chromium-review.googlesource.com/433387 Commit-Ready: Divya S Sasidharan <divya.s.sasidharan@intel.com> Tested-by: Divya S Sasidharan <divya.s.sasidharan@intel.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Todd Broch <tbroch@chromium.org> (cherry picked from commit c05d723dcf1f59dc8fe4655f7d5dd16647a13216) Reviewed-on: https://chromium-review.googlesource.com/434164 Reviewed-by: Benson Leung <bleung@chromium.org> Commit-Queue: Todd Broch <tbroch@chromium.org> Tested-by: Todd Broch <tbroch@chromium.org>
* motion_sense: Add "spoof" modeAseda Aboagye2017-01-217-15/+292
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a "spoof" mode feature to the motionsense stack. It allows the user to arbitrarily set the outputs of the sensor in order to "spoof" the readings of the sensor. This can be useful in emulating tablet mode or device rotations. A command is available from the EC console named `accelspoof` and there is a corresponding motionsense command in ectool called `spoof`. The usage is as follows: - EC console > accelspoof [id] [on/off] [X Y Z] - ectool # ectool motionsense spoof -- [id] [0/1] [X Y Z] If on or off(or 0/1) is not specified, the current spoof mode status of the sensor is returned. If on is specified, but no components are provided, the sensor will lock the current values and provide those as the spoofed values. If the components are provided, those will be used as the spoofed values. BUG=chromium:675263 BRANCH=cyan,glados,gru,oak TEST=Flash a DUT with accels. From AP console, run `ectool motionsense lid_angle` in a loop, use 'accelspoof' EC console command to set spoofed values. Verify that the angle is fixed regardless of the actual angle of the DUT. TEST=Flash a DUT with accels. From AP console, use `ectool motionsense spoof` to spoof values and verify that `ectool motionsense` reflects the spoofed values. Test with both provided component values and no component values. Change-Id: Ie30688d22f38054e7243b1af493a3092b2cdfb72 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/425855 Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* elm: hana: oak: Don't disable peripherals in S0.Aseda Aboagye2017-01-192-4/+29
| | | | | | | | | | | | | | | | | | When the device is in S0, the EC should not disable the peripherals; it should be up to the AP to decide whether or not to ignore these input devices. BUG=chrome-os-partner:61871 BRANCH=oak TEST=Flash oak; verify that keyscanning is not disabled in tablet mode when the system is in S0. Change-Id: Ia80afdc523c4c3fcd707792c2757931ca55a0061 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/428553 Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org>
* hana: Update the led behavior to follow the latest specificationgeap2017-01-031-66/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | For power led: Use single led with white color. Hardware also need to be changed. S0: White led always on S5: White led always off S3: off for AC out, 500ms off/3s on for AC in For battery led: Still use green and red color. For discharge: off For charge: Battery capacity 0%~4% Red Battery capacity 5%~96% Orange (Red+Green) Battery capacity 97%~100% Green BUG=chrome-os-partner:60239 BRANCH=oak TEST=load and test on hana-rev1 Change-Id: Idaed29f47b8be2d64ff1bf67b8a95dddde62befb Reviewed-on: https://chromium-review.googlesource.com/421382 Tested-by: Barry Ge <geap@bitland.com.cn> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Commit-Queue: Barry Ge <geap@bitland.com.cn>
* elm/hana: Enable CONFIG_I2C_PASSTHROUGHYidi Lin2016-12-231-0/+1
| | | | | | | | | | | | | Enable CONFIG_I2C_PASSTHROUGH to support smart battery pass-through. BUG=chrome-os-partner:60125 TEST=read the battery status by using "power-supply-info" command with LG and simplo battery. Change-Id: I020302b32c8b81bc3db2f2cd3366ce167033ed47 Signed-off-by: Yidi Lin <yidi.lin@mediatek.com> Reviewed-on: https://chromium-review.googlesource.com/422671 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* usb_pd_protocol: Force rediscovering identity on bootNicolas Boichat2016-12-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | This is useful with Apple's HDMI adapter, as the code that sends the discovery message will also swap vconn as required. BRANCH=none BUG=chromium:644663 TEST=On elm, S5. Plug adapter with power+HDMI. Switch on elm, display works. Change-Id: I21d47c69e2c7153a5d808dedcb1abe360ce3f5c0 Reviewed-on: https://chromium-review.googlesource.com/415698 Commit-Ready: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> (cherry picked from commit dba4c111137b1819538a314043760bf17092690f) Signed-off-by: Nicolas Boichat <drinkcat@google.com> [drinkcat: Context conflict in usb_pd_protocol.c:dual_role_on] Reviewed-on: https://chromium-review.googlesource.com/420426 Commit-Queue: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Rong Chang <rongchang@chromium.org>
* usb_pd_policy: Automatically swap vconn if adapter requests itNicolas Boichat2016-12-153-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | During discovery, if adapter requests vconn power in the AMA flags, make sure that we provide vconn. This, for example, is necessary for the Apple HDMI adapter to work on boot, when connected in S5. In that case, adapter does request vconn swap, but we reject that as the system is off, and, therefore 5V supply is off. On boot, we send another discovery request, which will detect this case and swap the power. BRANCH=none BUG=chromium:644663 TEST=On elm, S5. Plug adapter with power+HDMI. Switch on elm, type "pd 0 vdm ident" in console, display works. Change-Id: I55b6658c2bc0574b8427ae086f61daf03730a725 Reviewed-on: https://chromium-review.googlesource.com/415697 Commit-Ready: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> (cherry picked from commit 87e8cd610313fa7fe902c2fd359ade18e6b22ef0) Signed-off-by: Nicolas Boichat <drinkcat@google.com> Reviewed-on: https://chromium-review.googlesource.com/420425 Commit-Queue: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Rong Chang <rongchang@chromium.org>
* usb_pd_protocol: Rename PD_FLAGS_DATA_SWAPPED to _CHECK_IDENTITYNicolas Boichat2016-12-152-18/+10
| | | | | | | | | | | | | | | | | | | | | | | | Rename the variable to actually tell us what it does (it sends a Discover Identity command), instead of littering the code with comments explaining why we set DATA_SWAPPED when the data roles have not really been swapped. BRANCH=none BUG=chromium:644663 TEST=make buildall -j Change-Id: Idbad38e48a55d6518ef82b32a4d96fee65264aae Reviewed-on: https://chromium-review.googlesource.com/415696 Commit-Ready: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org> (cherry picked from commit a573d17be93b52e6b3cb0ab7bf374199091752f4) Signed-off-by: Nicolas Boichat <drinkcat@google.com> [drinkcat: Minor conflicts in usb_pd_protocol.c] Reviewed-on: https://chromium-review.googlesource.com/420424 Commit-Queue: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Rong Chang <rongchang@chromium.org>
* usb_pd_protocol: tcpm_get_message: Check return valueNicolas Boichat2016-12-094-12/+8
| | | | | | | | | | | | | | | | | | | | | | | We currently rely on *head == 0 as error condition, which is fragile and inconsistent across TCPCs implementations. Instead, let's return a proper return value on all implementations. BRANCH=none BUG=chrome-os-partner:60575 TEST=elm FW as of 65fb80d (later version include a fix that would hide this issue), cherry-pick this patch, connect j5create adapter, then HDMI, then power => no crash Change-Id: If7235e0491e9f80fdd50ce2605477ee518f8e1aa Reviewed-on: https://chromium-review.googlesource.com/417443 Commit-Ready: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/418635 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Commit-Queue: Nicolas Boichat <drinkcat@chromium.org> Trybot-Ready: Nicolas Boichat <drinkcat@chromium.org>
* tcpci_tcpm_get_message: TCPC_REG_RX_BYTE_CNT includes headerNicolas Boichat2016-12-092-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From TCPC spec: """ RECEIVE_BYTE_COUNT: Indicates number of bytes in this register that are not stale. The TCPM should read the first RECEIVE_BYTE_COUNT bytes in this register. This is the number of bytes in the RX_BUFFER_DATA_OBJECTS plus three (for the RX_BUF_FRAME_TYPE and RX_BUF_HEADER). """ We were always reading 3 bytes too many. This is an issue if we receive a packet followed by a hard reset, as the register value will be set back to 0, but TCPC_REG_RX_HDR may contain a valid header, leading to corrupted packets being passed down the stack. Also update usb_pd_tcpc to match the specification. BRANCH=none BUG=chrome-os-partner:60575 TEST=elm FW as of 65fb80d (later version include a fix that would hide this issue), cherry-pick this patch, connect j5create adapter, then HDMI, then power => no crash Change-Id: I9ed8f3b500d5733ec7563e31246505e0b8bd48bb Previous-Reviewed-on: https://chromium-review.googlesource.com/417442 (cherry picked from commit 19cf3cb8952a89bc70bcd5376b44e019b7117aef) Reviewed-on: https://chromium-review.googlesource.com/418101 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Commit-Queue: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Trybot-Ready: Nicolas Boichat <drinkcat@chromium.org>
* usb_pd_policy: pd_extract_pdo_power: Check that mv != 0Nicolas Boichat2016-12-071-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | It's preferable to print an error when mv = 0, rather than crashing. Also, do not even select invalid PDO in pd_find_pdo_index. This was seen on elm, where ANX7688 appears to send the EC a corrupted packet during hard reset when connected to j5create adapter. BRANCH=none BUG=chrome-os-partner:60575 TEST=Plug in j5create adapter, then HDMI adapter, then power, elm does not crash (note that the HDMI output still does not work, but at least elm charges). Change-Id: I2150ad6f13465a005444804ec44ec3bdc0ded361 Reviewed-on: https://chromium-review.googlesource.com/416700 Commit-Ready: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> (cherry picked from commit d0af9df60552aecd2ea308753c25ea607f217fe8) Reviewed-on: https://chromium-review.googlesource.com/416090 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Commit-Queue: Nicolas Boichat <drinkcat@chromium.org> Trybot-Ready: Nicolas Boichat <drinkcat@chromium.org>
* host_command_pd: reduce to 5msec delay in between PD interrupt handlingKevin K Wong2016-12-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since PD task are highest priority, the 50msec delay between was intended allow other tasks to execute if PD has continuous interrupt. With two separate TCPC handled by host_command_pd task, interrupt from one TCPC will block the interrupt handling of another TCPC by this 50msec and cause error in the PD negotiation. Reduced to 5msec to ensure TCPC interrupt is handled as soon as possible while allow other tasks to execute if needed. BUG=chrome-os-partner:59061 BUG=chrome-os-partner:59938 BUG=chrome-os-partner:60563 BUG=chrome-os-partner:60575 BRANCH=none TEST=Verify zinger can negotiate to 20V, hoho can get display. Also tested with faking PD interrupt always asserted to check for watchdog reset. TEST=On elm, connect Apple HDMI adapter (FW 1.58) with HDMI+power already connected, both power and display work. TEST=On elm, connect j5create adapter, then HDMI, then power => no crash TEST=On elm, S5, connect Huawei dock with HDMI+power already connected, after boot, both power and display work. Change-Id: I9b71277a3d65923f1f5bbfd744b3399e34fd0e6c Signed-off-by: Kevin K Wong <kevin.k.wong@intel.com> Reviewed-on: https://chromium-review.googlesource.com/407542 Tested-by: Divya S Sasidharan <divya.s.sasidharan@intel.com> Reviewed-by: Scott Collyer <scollyer@chromium.org> (cherry picked from commit 72d72ea0089ab27fadc7b9bf81829c1646e20847) Reviewed-on: https://chromium-review.googlesource.com/416089 Commit-Queue: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Trybot-Ready: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Rong Chang <rongchang@chromium.org>
* hana: Update LED colorYidi Lin2016-11-303-3/+202
| | | | | | | | | | | | | | | Hana uses green and red color for LED indication which is different from Elm's design. Like battery, led_hana.c is created for Hana's setttings. BUG=chrome-os-partner:58983 BRANCH=oak TEST=load and test on hana-rev0. Change-Id: Ia9c58c47f5ee789b3776a8748201f9b9ed4e8013 Signed-off-by: Yidi Lin <yidi.lin@mediatek.com> Reviewed-on: https://chromium-review.googlesource.com/414825 Reviewed-by: Philip Chen <philipchen@chromium.org>
* i2c-stm32f0: wait_isr: Try to read status again before timeoutNicolas Boichat2016-11-221-4/+5
| | | | | | | | | | | | | | | | | | When the EC is exceptionally busy (e.g., during software sync), it is possible that wait_isr returns EC_ERROR_TIMEOUT even though the status has already been updated. This patch gives us once last chance to succeed. BRANCH=none BUG=chrome-os-partner:58750 TEST=100x fwupdatetest between 19.0 and 25.0, with custom EC RO. Change-Id: Ic8288d281b54e292ae75d2169b8c48ba2a033a8f Reviewed-on: https://chromium-review.googlesource.com/409752 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Queue: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Trybot-Ready: Nicolas Boichat <drinkcat@chromium.org>
* kionix: Add reading whoami to be sure device has booted.Gwendal Grignou2016-11-172-1/+28
| | | | | | | | | | | | | | | | | | 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. Reviewed-on: https://chromium-review.googlesource.com/394750 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> (cherry picked from commit 09f90a3b8f0f48d11b3653ad2af1d61c29691a48) Change-Id: I3194a5d1deb0c2eb2a04a459aab3b4269e479af3 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/412031
* hana: update the rotation matrix of accelerometerMilton Chiang2016-11-091-0/+15
| | | | | | | | | | | | | BUG=chrome-os-partner:58983 BRANCH=oak TEST=make BOARD=hana -j load and test on hana-rev1 Change-Id: Ie20e90bd5fbd6cee8f850c13c922616fd3e5ad89 Signed-off-by: Milton Chiang <milton.chiang@mediatek.com> Reviewed-on: https://chromium-review.googlesource.com/406128 Reviewed-by: Paris Yeh <pyeh@chromium.org> Reviewed-by: Rong Chang <rongchang@chromium.org>
* host_command_pd: pd_exchange_status: Fix first_exchange logicNicolas Boichat2016-10-211-1/+4
| | | | | | | | | | | | | | | | | | | | | | The code clearly indends to sleep on the second time the loop is taken, but the variable first_exchange is reset to 1 inside the loop. If, for whatever reason, PD alert status cannot be cleared, the code will then loop forever, and lead to a watchdog reset. BRANCH=none BUG=chrome-os-partner:58750 TEST=Flash EC RO using ec_util Run fwupdatetest with charger unplugged for 10 iterations. Change-Id: I9e13f2523111853fdc5c45e75886c11f1c8006eb Previous-Reviewed-on: https://chromium-review.googlesource.com/401238 (cherry picked from commit a0d01b37dbfb7d03e76473aa74da67401b35f62c) Reviewed-on: https://chromium-review.googlesource.com/401083 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Commit-Queue: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Trybot-Ready: Nicolas Boichat <drinkcat@chromium.org>
* elm: disable 3.3V to ANX7688 by default and enable it in board_power_on_pd_mcu.Milton Chiang2016-10-132-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | In dead battery mode, we can find ANX7688 will pull the CC to Rp in the beginning; some of the adapters will drop the VBUS since this should be treated as a disconnection, hence the whole system lost the only power source and cannot boot up. According to chrome-os-partner:58283, there's a chance for ANX7688 to be in an abnormal state if the system provides it with 3.3V first but RESET_N and PWR_EN are still in an unstable level. To prevent this situation, we try to enable the 3.3V only after RESET_N and PWR_EN are in their initial state. BRANCH=none BUG=chrome-os-partner:58283 TEST=plug in the adapter, check ANX7688 does not pull CC to Rp in the beginning, and boot up system in dead battery mode Change-Id: Ibb81a33a7dd957d3bdc6c54bb7723cc9ffdcfd26 Signed-off-by: Milton Chiang <milton.chiang@mediatek.com> Reviewed-on: https://chromium-review.googlesource.com/394408 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> (cherry picked from commit 0fd106fbf4671306114f2d4de51c2d44f46fef55) Reviewed-on: https://chromium-review.googlesource.com/397204 Reviewed-by: Philip Chen <philipchen@chromium.org>
* common: Print host command code in error.Aseda Aboagye2016-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | For some boards, the HCDEBUG setting is defaulting to off due to "too spammy" console output. An unfortunate side effect of this is that when a host command results in an error, it's impossible to know what was the command that failed. This commit adds the host command code to the error print so that it's clear what command failed. BUG=None BRANCH=gru,glados,oak TEST=Build and flash kevin, verify that any host commands that resulted in an error have the command code printed alongside them. Change-Id: I6a5f251e7941a47a3cf102a1fb6c5e96ffc8fa5d Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/396128 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org>
* hana: initial hana mainboardMilton Chiang2016-10-075-1/+53
| | | | | | | | | | | | | | | | Hana is an Elm variant platform. Clone board-related settings from elm folder and updated some minor changes of battery info. BUG=chrome-os-partner:57249 BRANCH=oak TEST=manual make BOARD=hana -j load and test on hana-rev0 Change-Id: I1b50cd94ada0f0c695cd582c51a7b1377e0ef801 Signed-off-by: Milton Chiang <milton.chiang@mediatek.com> Reviewed-on: https://chromium-review.googlesource.com/393467 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* elm: Add FIFO support for ARC++Gwendal Grignou2016-09-212-8/+25
| | | | | | | | | | | | | | | | | FIFO needed for ARC++ support. BUG=b:27849483,b:31609073 BRANCH=oak TEST=On elm, install R55-8795.0.0, in ARC++, install AIDA64. Check the lid accelerometer is seen. Ran CTS tests: SensorBatchingTests and SingleSensorTests: ./out/host/linux-x86/cts/android-cts/tools/cts-tradefed run \ commandAndExit cts -s <IP>:22 -c android.hardware.cts.<TEST> Change-Id: Iefaaee874bbc32f464c3afe79d03b3087b211ee0 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/387164 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* UPSTREAM: motion: Add minimum to oversample.Gwendal Grignou2016-09-211-3/+11
| | | | | | | | | | | | | | | | | | | | | | | In case the AP is asking for a ODR frequency the sensor can not achieve (for instance over 76Hz for BMP280), be sure we do not set oversampling to 0. Otherwise, no sensor data will be sent to the AP. BUG=b:27849483,b:27849483,b:31609073 BRANCH=oak TEST=Check Androsensor reports presure information even when frequency is set at 100Hz. Change-Id: Idb849782daa96531cc33d21ea6780fd7f1f299d5 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/385081 Commit-Ready: Gwendal Grignou <gwendal@google.com> Tested-by: Gwendal Grignou <gwendal@google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> (cherry picked from commit 51c5fd5c150dd1bad2660dbb38d432e7234910f0) Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/387163 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* UPSTREAM: motion: make fiforead optionalGwendal Grignou2016-09-212-1/+2
| | | | | | | | | | | | | | | | | This command is rarely used, make it optional when sensor fifo is enabled. BUG=b:27849483,b:31609073 BRANCH=oak TEST=compile Change-Id: I2b8351924697953d8df08a0724b5968948603222 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/382676 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> (cherry picked from commit c96d0418f83d98e0e35d41ee85d2d49de6c3acfc) Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/387162 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* UPSTREAM: motion: remove accel_int_xxx, dead codeGwendal Grignou2016-09-212-66/+0
| | | | | | | | | | | | | | | | | Remove code to set interrupt threshold, unused and broken. BUG=chromium:426659,b:31609073 BRANCH=oak 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/387161 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* UPSTREAM: motion: Remove redundant set_range.Gwendal Grignou2016-09-211-6/+0
| | | | | | | | | | | | | | | | | | | | No need to do set_range in motion_sense_shutdown(), already done at init. Besides, this is an error if the sensor is not powered in S5. BUG=b:27849483,b:27849483,b:31609073 BRANCH=oak TEST=Check sensor range is set correctly. (cherry picked from commit 1018eac30db86dd1d78d5b84b7651edd6aca9225) Reviewed-on: https://chromium-review.googlesource.com/379097 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Change-Id: Id0b9c2e4988ffc8b55b21258f60b1efa26156dbb Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/379542 (cherry picked from commit 54f4612764e07e5e3ccd8a4af04ee83a46454612) Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/387160 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>