summaryrefslogtreecommitdiff
path: root/include/led_onoff_states.h
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2021-11-04 12:11:58 -0600
committerCommit Bot <commit-bot@chromium.org>2021-11-05 04:22:34 +0000
commit252457d4b21f46889eebad61d4c0a65331919cec (patch)
tree01856c4d31d710b20e85a74c8d7b5836e35c3b98 /include/led_onoff_states.h
parent08f5a1e6fc2c9467230444ac9b582dcf4d9f0068 (diff)
downloadchrome-ec-stabilize-14695.85.B-ish.tar.gz
In the interest of making long-term branch maintenance incur as little technical debt on us as possible, we should not maintain any files on the branch we are not actually using. This has the added effect of making it extremely clear when merging CLs from the main branch when changes have the possibility to affect us. The follow-on CL adds a convenience script to actually pull updates from the main branch and generate a CL for the update. BUG=b:204206272 BRANCH=ish TEST=make BOARD=arcada_ish && make BOARD=drallion_ish Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Diffstat (limited to 'include/led_onoff_states.h')
-rw-r--r--include/led_onoff_states.h88
1 files changed, 0 insertions, 88 deletions
diff --git a/include/led_onoff_states.h b/include/led_onoff_states.h
deleted file mode 100644
index 63955e590a..0000000000
--- a/include/led_onoff_states.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* Copyright 2018 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.
- *
- * Common functions for stateful LEDs (charger and power)
- */
-
-#ifndef __CROS_EC_ONOFFSTATES_LED_H
-#define __CROS_EC_ONOFFSTATES_LED_H
-
-#include "ec_commands.h"
-
-#define LED_INDEFINITE UINT8_MAX
-#define LED_ONE_SEC (1000 / HOOK_TICK_INTERVAL_MS)
-#define LED_OFF EC_LED_COLOR_COUNT
-
-/*
- * All LED states should have one phase defined,
- * and an additional phase can be defined for blinking
- */
-enum led_phase {
- LED_PHASE_0,
- LED_PHASE_1,
- LED_NUM_PHASES
-};
-
-/*
- * STATE_CHARGING_LVL_1 is when 0 <= charge_percentage < led_charge_level_1
- * STATE_CHARGING_LVL_2 is when led_charge_level_1 <=
- * charge_percentage < led_charge_level_2.
- * STATE_CHARGING_FULL_CHARGE is when
- * led_charge_level_2 <= charge_percentage < 100.
- *
- * STATE_CHARGING_FULL_S5 is optional and state machine will fall back to
- * FULL_CHARGE if not defined
- */
-enum led_states {
- STATE_CHARGING_LVL_1,
- STATE_CHARGING_LVL_2,
- STATE_CHARGING_FULL_CHARGE,
- STATE_CHARGING_FULL_S5,
- STATE_DISCHARGE_S0,
- STATE_DISCHARGE_S0_BAT_LOW,
- STATE_DISCHARGE_S3,
- STATE_DISCHARGE_S5,
- STATE_BATTERY_ERROR,
- STATE_FACTORY_TEST,
- LED_NUM_STATES
-};
-
-struct led_descriptor {
- enum ec_led_colors color;
- uint8_t time;
-};
-
-extern const int led_charge_lvl_1;
-extern const int led_charge_lvl_2;
-
-enum pwr_led_states {
- PWR_LED_STATE_ON,
- PWR_LED_STATE_SUSPEND_AC,
- PWR_LED_STATE_SUSPEND_NO_AC,
- PWR_LED_STATE_OFF,
- PWR_LED_STATE_OFF_LOW_POWER, /* Falls back to OFF if not defined */
- PWR_LED_NUM_STATES
-};
-
-/**
- * Set battery LED color - defined in board's led.c if supported, along with:
- * - led_bat_state_table
- * - led_charge_lvl_1
- * - led_charge_lvl_2
- *
- * @param color Color to set on battery LED
- *
- */
-__override_proto void led_set_color_battery(enum ec_led_colors color);
-
-/**
- * Set power LED color - defined in board's led.c if supported, along with:
- * - led_pwr_state_table
- */
-__override_proto void led_set_color_power(enum ec_led_colors color);
-
-__override_proto enum led_states
-board_get_led_state(enum led_states desired_state);
-
-#endif /* __CROS_EC_ONOFFSTATES_LED_H */