mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-09 00:51:29 +00:00
In order to update charger status we have added a virtual keystroke to signal change to the kernel via the MKBP interface. CL creates the virtual key press and calls it from within the USB charging code. Signed-off-by: Todd Broch <tbroch@chromium.org> BUG=chrome-os-partner:17927 BRANCH=spring TEST=manual 1. Compile for daisy,snow,spring. 2. Test on spring. Change-Id: I0afa0fc82c96fa3fd8119523a113b5028c8f64a3 Reviewed-on: https://gerrit.chromium.org/gerrit/45126 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Tested-by: Todd Broch <tbroch@chromium.org> Commit-Queue: Todd Broch <tbroch@chromium.org>
45 lines
1.3 KiB
C
45 lines
1.3 KiB
C
/* Copyright (c) 2012 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.
|
|
*/
|
|
|
|
/* Keyboard scanner module for Chrome EC */
|
|
|
|
#ifndef __CROS_EC_KEYBOARD_SCAN_H
|
|
#define __CROS_EC_KEYBOARD_SCAN_H
|
|
|
|
#include "common.h"
|
|
|
|
/* Initializes the module. */
|
|
void keyboard_scan_init(void);
|
|
|
|
/* Key held down at keyboard-controlled reset boot time. */
|
|
enum boot_key {
|
|
BOOT_KEY_NONE, /* No keys other than keyboard-controlled reset keys */
|
|
BOOT_KEY_ESC,
|
|
BOOT_KEY_DOWN_ARROW,
|
|
BOOT_KEY_OTHER = -1, /* None of the above */
|
|
};
|
|
|
|
/*
|
|
* Return the key held down at boot time in addition to the keyboard-controlled
|
|
* reset keys. Returns BOOT_KEY_OTHER if none of the keys specifically checked
|
|
* was pressed, or reset was not caused by a keyboard-controlled reset, or if
|
|
* the state has been cleared by keyboard_scan_clear_boot_key().
|
|
*/
|
|
enum boot_key keyboard_scan_get_boot_key(void);
|
|
|
|
/* Return non-zero if recovery key was pressed at boot. */
|
|
int keyboard_scan_recovery_pressed(void);
|
|
|
|
/* Clear any saved keyboard state (empty FIFO, etc) */
|
|
void keyboard_clear_state(void);
|
|
|
|
/* Enables/disables keyboard matrix scan. */
|
|
void keyboard_enable_scanning(int enable);
|
|
|
|
/* Sends KEY_BATTERY keystroke */
|
|
void keyboard_send_battery_key(void);
|
|
|
|
#endif /* __CROS_EC_KEYBOARD_SCAN_H */
|