summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
Diffstat (limited to 'board')
-rw-r--r--board/cheza/base_detect.c6
-rw-r--r--board/coachz/base_detect.c6
-rw-r--r--board/homestar/base_detect.c6
-rw-r--r--board/nocturne/base_detect.c6
-rw-r--r--board/poppy/base_detect_lux.c6
-rw-r--r--board/poppy/base_detect_poppy.c6
6 files changed, 18 insertions, 18 deletions
diff --git a/board/cheza/base_detect.c b/board/cheza/base_detect.c
index 3999ad022f..b47504144b 100644
--- a/board/cheza/base_detect.c
+++ b/board/cheza/base_detect.c
@@ -198,13 +198,13 @@ static void base_init(void)
}
DECLARE_HOOK(HOOK_INIT, base_init, HOOK_PRIO_DEFAULT+1);
-void base_force_state(int state)
+void base_force_state(enum ec_set_base_state_cmd state)
{
- if (state == 1) {
+ if (state == EC_SET_BASE_STATE_ATTACH) {
gpio_disable_interrupt(GPIO_CC_LID_BASE_ADC);
base_detect_change(BASE_CONNECTED);
CPRINTS("BD forced connected");
- } else if (state == 0) {
+ } else if (state == EC_SET_BASE_STATE_DETACH) {
gpio_disable_interrupt(GPIO_CC_LID_BASE_ADC);
base_detect_change(BASE_DISCONNECTED);
CPRINTS("BD forced disconnected");
diff --git a/board/coachz/base_detect.c b/board/coachz/base_detect.c
index 505714a016..1a27538166 100644
--- a/board/coachz/base_detect.c
+++ b/board/coachz/base_detect.c
@@ -214,13 +214,13 @@ static void base_init(void)
}
DECLARE_HOOK(HOOK_INIT, base_init, HOOK_PRIO_DEFAULT+1);
-void base_force_state(int state)
+void base_force_state(enum ec_set_base_state_cmd state)
{
- if (state == 1) {
+ if (state == EC_SET_BASE_STATE_ATTACH) {
gpio_disable_interrupt(GPIO_BASE_DET_L);
base_detect_change(BASE_CONNECTED);
CPRINTS("BD forced connected");
- } else if (state == 0) {
+ } else if (state == EC_SET_BASE_STATE_DETACH) {
gpio_disable_interrupt(GPIO_BASE_DET_L);
base_detect_change(BASE_DISCONNECTED);
CPRINTS("BD forced disconnected");
diff --git a/board/homestar/base_detect.c b/board/homestar/base_detect.c
index 59303fa1b2..53688777c1 100644
--- a/board/homestar/base_detect.c
+++ b/board/homestar/base_detect.c
@@ -213,13 +213,13 @@ static void base_init(void)
}
DECLARE_HOOK(HOOK_INIT, base_init, HOOK_PRIO_DEFAULT+1);
-void base_force_state(int state)
+void base_force_state(enum ec_set_base_state_cmd state)
{
- if (state == 1) {
+ if (state == EC_SET_BASE_STATE_ATTACH) {
gpio_disable_interrupt(GPIO_BASE_DET_L);
base_detect_change(BASE_CONNECTED);
CPRINTS("BD forced connected");
- } else if (state == 0) {
+ } else if (state == EC_SET_BASE_STATE_DETACH) {
gpio_disable_interrupt(GPIO_BASE_DET_L);
base_detect_change(BASE_DISCONNECTED);
CPRINTS("BD forced disconnected");
diff --git a/board/nocturne/base_detect.c b/board/nocturne/base_detect.c
index 3735080c49..48c7b1f9dd 100644
--- a/board/nocturne/base_detect.c
+++ b/board/nocturne/base_detect.c
@@ -380,11 +380,11 @@ DECLARE_CONSOLE_COMMAND(basedebug, command_basedetectdebug, "[ena|dis]",
"En/Disable base detection debug");
-void base_force_state(int state)
+void base_force_state(enum ec_set_base_state_cmd state)
{
- if (state == 1)
+ if (state == EC_SET_BASE_STATE_ATTACH)
forced_state = BASE_ATTACHED;
- else if (state == 0)
+ else if (state == EC_SET_BASE_STATE_DETACH)
forced_state = BASE_DETACHED;
else
forced_state = BASE_NO_FORCED_STATE;
diff --git a/board/poppy/base_detect_lux.c b/board/poppy/base_detect_lux.c
index 155243af0e..14a937a7fd 100644
--- a/board/poppy/base_detect_lux.c
+++ b/board/poppy/base_detect_lux.c
@@ -219,13 +219,13 @@ static void base_init(void)
}
DECLARE_HOOK(HOOK_INIT, base_init, HOOK_PRIO_DEFAULT+1);
-void base_force_state(int state)
+void base_force_state(enum ec_set_base_state_cmd state)
{
- if (state == 1) {
+ if (state == EC_SET_BASE_STATE_ATTACH) {
gpio_disable_interrupt(GPIO_BASE_DET_A);
base_detect_change(BASE_CONNECTED);
CPRINTS("BD forced connected");
- } else if (state == 0) {
+ } else if (state == EC_SET_BASE_STATE_DETACH) {
gpio_disable_interrupt(GPIO_BASE_DET_A);
base_detect_change(BASE_DISCONNECTED);
CPRINTS("BD forced disconnected");
diff --git a/board/poppy/base_detect_poppy.c b/board/poppy/base_detect_poppy.c
index 358461896e..8a202a21d9 100644
--- a/board/poppy/base_detect_poppy.c
+++ b/board/poppy/base_detect_poppy.c
@@ -246,13 +246,13 @@ static void base_init(void)
}
DECLARE_HOOK(HOOK_INIT, base_init, HOOK_PRIO_DEFAULT+1);
-void base_force_state(int state)
+void base_force_state(enum ec_set_base_state_cmd state)
{
- if (state == 1) {
+ if (state == EC_SET_BASE_STATE_ATTACH) {
gpio_disable_interrupt(GPIO_BASE_DET_A);
base_detect_change(BASE_CONNECTED);
CPRINTS("BD forced connected");
- } else if (state == 0) {
+ } else if (state == EC_SET_BASE_STATE_DETACH) {
gpio_disable_interrupt(GPIO_BASE_DET_A);
base_detect_change(BASE_DISCONNECTED);
CPRINTS("BD forced disconnected");