summaryrefslogtreecommitdiff
path: root/power
diff options
context:
space:
mode:
Diffstat (limited to 'power')
-rw-r--r--power/tegra.c59
1 files changed, 0 insertions, 59 deletions
diff --git a/power/tegra.c b/power/tegra.c
index 47364e13c1..8b3c3c766a 100644
--- a/power/tegra.c
+++ b/power/tegra.c
@@ -585,62 +585,3 @@ static void powerbtn_tegra_changed(void)
}
DECLARE_HOOK(HOOK_POWER_BUTTON_CHANGE, powerbtn_tegra_changed,
HOOK_PRIO_DEFAULT);
-
-/*****************************************************************************/
-/* Console debug command */
-
-static const char *power_req_name[POWER_REQ_COUNT] = {
- "none",
- "off",
- "on",
-};
-
-/* Power states that we can report */
-enum power_state_t {
- PSTATE_UNKNOWN,
- PSTATE_OFF,
- PSTATE_SUSPEND,
- PSTATE_ON,
-
- PSTATE_COUNT,
-};
-
-static const char * const state_name[] = {
- "unknown",
- "off",
- "suspend",
- "on",
-};
-
-static int command_power(int argc, char **argv)
-{
- int v;
-
- if (argc < 2) {
- enum power_state_t state;
-
- state = PSTATE_UNKNOWN;
- if (chipset_in_state(CHIPSET_STATE_ANY_OFF))
- state = PSTATE_OFF;
- if (chipset_in_state(CHIPSET_STATE_SUSPEND))
- state = PSTATE_SUSPEND;
- if (chipset_in_state(CHIPSET_STATE_ON))
- state = PSTATE_ON;
- ccprintf("%s\n", state_name[state]);
-
- return EC_SUCCESS;
- }
-
- if (!parse_bool(argv[1], &v))
- return EC_ERROR_PARAM1;
-
- power_request = v ? POWER_REQ_ON : POWER_REQ_OFF;
- ccprintf("Requesting power %s\n", power_req_name[power_request]);
- task_wake(TASK_ID_CHIPSET);
-
- return EC_SUCCESS;
-}
-DECLARE_CONSOLE_COMMAND(power, command_power,
- "on/off",
- "Turn AP power on/off",
- NULL);