mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-29 18:11:05 +00:00
This will be used as part of case closed debugging configuration. Currently, this only adds the state machine, and a test command which is available when CR50_DEV=1. It also adds a new sleep mask flag for physical presence detect, instead of oveloading FORCE_NO_DSLEEP. The physical presence state machine supports both short (tap 5 times in 15 seconds) and long (short, followed by 4 more taps 1-5 minutes apart) sequences. It will call a callback function at the end of the sequence, so that multiple things can each request physical presence in turn. This will be used by ccdopen / ccdunlock / testlab commands for CCD V1. Eventually, CCD config will replace the unlock sequence handling in wp.c. But for now, we don't touch that. See go/cr50-ccd-wp for more information. BUG=b:62537474 BRANCH=none TEST=manual Short sequence: pp short pp pp pp # See "Physical presence good" Timeout pp short pp # 15 sec later, get timeout error Long sequence: pp long pp pp pp (wait 2 sec) pp (wait 2 sec) pp # See "PP good" Long sequence, presses too fast: pp long pp pp pp pp # See "PP L too soon" (wait 2 sec) pp (wait 2 sec) pp # See "Physical presence good" Abort: pp short pp abort # See "Physical presence aborted" Change-Id: I09da81ad11d328e7d7740c3fe838a5f67d7b8708 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/568796 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org>
90 lines
2.8 KiB
C
90 lines
2.8 KiB
C
/* -*- mode:c -*-
|
|
*
|
|
* Copyright 2016 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
CONSOLE_CHANNEL(CC_COMMAND, "command")
|
|
CONSOLE_CHANNEL(CC_ACCEL, "accel")
|
|
#ifdef CONFIG_BLUETOOTH_LE
|
|
CONSOLE_CHANNEL(CC_BLUETOOTH_LE, "bluetooth_le")
|
|
#ifdef CONFIG_BLUETOOTH_LL_DEBUG
|
|
CONSOLE_CHANNEL(CC_BLUETOOTH_LL, "bluetooth_ll")
|
|
#endif
|
|
#ifdef CONFIG_BLUETOOTH_HCI_DEBUG
|
|
CONSOLE_CHANNEL(CC_BLUETOOTH_HCI,"bluetooth_hci")
|
|
#endif
|
|
#endif /* CONFIG_BLUETOOTH_LE */
|
|
#ifdef CONFIG_EXTENSION_COMMAND
|
|
CONSOLE_CHANNEL(CC_EXTENSION, "extension")
|
|
#endif
|
|
#if defined(CONFIG_CASE_CLOSED_DEBUG) || defined(CONFIG_PHYSICAL_PRESENCE)
|
|
CONSOLE_CHANNEL(CC_CCD, "ccd")
|
|
#endif
|
|
CONSOLE_CHANNEL(CC_CHARGER, "charger")
|
|
CONSOLE_CHANNEL(CC_CHIPSET, "chipset")
|
|
CONSOLE_CHANNEL(CC_CLOCK, "clock")
|
|
#ifdef CONFIG_DMA
|
|
CONSOLE_CHANNEL(CC_DMA, "dma")
|
|
#endif
|
|
CONSOLE_CHANNEL(CC_EVENTS, "events")
|
|
#ifdef HAS_TASK_FPC1140
|
|
CONSOLE_CHANNEL(CC_FP, "fingerprint")
|
|
#endif
|
|
#ifdef CONFIG_GESTURE_SW_DETECTION
|
|
CONSOLE_CHANNEL(CC_GESTURE, "gesture")
|
|
#endif
|
|
CONSOLE_CHANNEL(CC_GPIO, "gpio")
|
|
#ifdef HAS_TASK_HOSTCMD
|
|
CONSOLE_CHANNEL(CC_HOSTCMD, "hostcmd")
|
|
#endif
|
|
#ifdef CONFIG_I2C
|
|
CONSOLE_CHANNEL(CC_I2C, "i2c")
|
|
#endif
|
|
CONSOLE_CHANNEL(CC_KEYBOARD, "keyboard")
|
|
CONSOLE_CHANNEL(CC_KEYSCAN, "keyscan")
|
|
CONSOLE_CHANNEL(CC_LIDANGLE, "lidangle")
|
|
#ifdef HAS_TASK_LIGHTBAR
|
|
CONSOLE_CHANNEL(CC_LIGHTBAR, "lightbar")
|
|
#endif
|
|
#ifdef CONFIG_LPC
|
|
CONSOLE_CHANNEL(CC_LPC, "lpc")
|
|
#endif
|
|
CONSOLE_CHANNEL(CC_MOTION_LID, "motionlid")
|
|
CONSOLE_CHANNEL(CC_MOTION_SENSE, "motionsense")
|
|
#ifdef HAS_TASK_PDCMD
|
|
CONSOLE_CHANNEL(CC_PD_HOST_CMD, "pdhostcm")
|
|
#endif
|
|
CONSOLE_CHANNEL(CC_PORT80, "port80")
|
|
#if defined(CONFIG_PWM) || defined(CONFIG_FANS)
|
|
CONSOLE_CHANNEL(CC_PWM, "pwm")
|
|
#endif
|
|
CONSOLE_CHANNEL(CC_SPI, "spi")
|
|
#ifdef CONFIG_RBOX
|
|
CONSOLE_CHANNEL(CC_RBOX, "rbox")
|
|
#endif
|
|
#ifdef CONFIG_SPS
|
|
CONSOLE_CHANNEL(CC_SPS, "sps")
|
|
#endif
|
|
#if defined(CONFIG_SWITCH) || defined(CONFIG_LID_SWITCH)
|
|
CONSOLE_CHANNEL(CC_SWITCH, "switch")
|
|
#endif
|
|
CONSOLE_CHANNEL(CC_SYSTEM, "system")
|
|
CONSOLE_CHANNEL(CC_TASK, "task")
|
|
#ifdef CONFIG_TOUCHPAD_ELAN
|
|
CONSOLE_CHANNEL(CC_TOUCHPAD, "touchpad")
|
|
#endif
|
|
#ifdef CONFIG_DPTF
|
|
CONSOLE_CHANNEL(CC_DPTF, "dptf")
|
|
#endif
|
|
CONSOLE_CHANNEL(CC_THERMAL, "thermal")
|
|
CONSOLE_CHANNEL(CC_TPM, "tpm")
|
|
CONSOLE_CHANNEL(CC_USB, "usb")
|
|
CONSOLE_CHANNEL(CC_USBCHARGE, "usbcharge")
|
|
#if defined(CONFIG_USB_POWER_DELIVERY) || defined(CONFIG_USB_PD_TCPC)
|
|
CONSOLE_CHANNEL(CC_USBPD, "usbpd")
|
|
#endif
|
|
CONSOLE_CHANNEL(CC_VBOOT, "vboot")
|
|
CONSOLE_CHANNEL(CC_HOOK, "hook")
|