summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--baseboard/grunt/baseboard.c2
-rw-r--r--baseboard/volteer/baseboard.c4
-rw-r--r--baseboard/zork/variant_trembyle.c4
-rw-r--r--board/akemi/board.c4
-rw-r--r--board/asurada/board.c4
-rw-r--r--board/boten/board.c2
-rw-r--r--board/burnet/board.c2
-rw-r--r--board/cerise/board.c2
-rw-r--r--board/cheza/board.c6
-rw-r--r--board/coachz/board.c4
-rw-r--r--board/coral/board.c2
-rw-r--r--board/dalboz/board.c4
-rw-r--r--board/damu/board.c2
-rw-r--r--board/dirinboz/board.c4
-rw-r--r--board/dratini/board.c4
-rw-r--r--board/drawcia/board.c4
-rw-r--r--board/elm/board.c4
-rw-r--r--board/eve/board.c4
-rw-r--r--board/fennel/board.c2
-rw-r--r--board/galtic/board.c4
-rw-r--r--board/gumboz/board.c4
-rw-r--r--board/halvor/board.c6
-rw-r--r--board/hatch/board.c4
-rw-r--r--board/helios/board.c4
-rw-r--r--board/jacuzzi/board.c2
-rw-r--r--board/jinlon/board.c4
-rw-r--r--board/kappa/board.c2
-rw-r--r--board/kindred/board.c4
-rw-r--r--board/kohaku/board.c4
-rw-r--r--board/lantis/board.c4
-rw-r--r--board/lazor/board.c4
-rw-r--r--board/madoo/board.c4
-rw-r--r--board/magolor/board.c4
-rw-r--r--board/mchpevb1/board.c4
-rw-r--r--board/metaknight/board.c4
-rw-r--r--board/mushu/board.c4
-rw-r--r--board/nami/board.c4
-rw-r--r--board/nautilus/board.c4
-rw-r--r--board/nightfury/board.c4
-rw-r--r--board/oak/board.c6
-rw-r--r--board/palkia/board.c2
-rw-r--r--board/pompom/board.c2
-rw-r--r--board/poppy/board.c6
-rw-r--r--board/rammus/board.c4
-rw-r--r--board/reef/board.c2
-rw-r--r--board/reef_mchp/board.c2
-rw-r--r--board/samus_pd/board.c4
-rw-r--r--board/sasuke/board.c4
-rw-r--r--board/shuboz/board.c4
-rw-r--r--board/stern/board.c2
-rw-r--r--board/storo/board.c4
-rw-r--r--board/stryke/board.c4
-rw-r--r--board/trogdor/board.c4
-rw-r--r--board/twinkie/simpletrace.c2
-rw-r--r--board/twinkie/sniffer.c4
-rw-r--r--board/vilboz/board.c2
-rw-r--r--board/waddledee/board.c4
-rw-r--r--board/waddledoo/board.c4
-rw-r--r--board/wheelie/board.c4
-rw-r--r--board/willow/board.c2
-rw-r--r--board/zinger/runtime.c4
-rw-r--r--chip/ish/heci.c2
-rw-r--r--chip/ish/i2c.c2
-rw-r--r--chip/ish/ipc_heci.c2
-rw-r--r--chip/it83xx/adc.c2
-rw-r--r--chip/it83xx/i2c.c2
-rw-r--r--chip/it83xx/intc.c7
-rw-r--r--chip/lm4/adc.c2
-rw-r--r--chip/lm4/i2c.c2
-rw-r--r--chip/mchp/i2c.c2
-rw-r--r--chip/mec1322/i2c.c2
-rw-r--r--chip/npcx/adc.c2
-rw-r--r--chip/npcx/cec.c2
-rw-r--r--chip/npcx/i2c.c13
-rw-r--r--chip/npcx/peci.c2
-rw-r--r--chip/npcx/ps2.c2
-rw-r--r--chip/stm32/dma-stm32f4.c2
-rw-r--r--chip/stm32/dma.c2
-rw-r--r--chip/stm32/i2c-stm32f4.c2
-rw-r--r--chip/stm32/ucpd-stm32gx.c19
-rw-r--r--chip/stm32/usb_pd_phy.c2
-rw-r--r--common/fpsensor/fpsensor.c6
-rw-r--r--common/fpsensor/fpsensor_state.c2
-rw-r--r--common/host_command.c2
-rw-r--r--common/host_command_pd.c4
-rw-r--r--common/lightbar.c2
-rw-r--r--common/motion_sense.c10
-rw-r--r--common/rwsig.c4
-rw-r--r--common/timer.c2
-rw-r--r--common/usb_charger.c2
-rw-r--r--common/usb_common.c2
-rw-r--r--common/usb_pd_alt_mode_dfp.c5
-rw-r--r--common/usb_pd_protocol.c28
-rw-r--r--common/usb_pd_tcpc.c6
-rw-r--r--common/usbc/usb_prl_sm.c2
-rw-r--r--common/usbc/usb_tc_drp_acc_trysrc_sm.c11
-rw-r--r--common/usbc/usbc_task.c2
-rw-r--r--common/usbc_intr_task.c2
-rw-r--r--core/cortex-m/task.c12
-rw-r--r--core/cortex-m0/task.c26
-rw-r--r--core/host/task.c6
-rw-r--r--core/minute-ia/task.c9
-rw-r--r--core/nds32/task.c9
-rw-r--r--core/riscv-rv32i/task.c21
-rw-r--r--cts/mutex/dut.c3
-rw-r--r--cts/mutex/th.c3
-rw-r--r--cts/task/dut.c11
-rw-r--r--driver/accel_lis2ds.c3
-rw-r--r--driver/accel_lis2dw12.c3
-rw-r--r--driver/accelgyro_bmi160.c5
-rw-r--r--driver/accelgyro_bmi260.c3
-rw-r--r--driver/accelgyro_icm426xx.c2
-rw-r--r--driver/accelgyro_lsm6dsm.c3
-rw-r--r--driver/accelgyro_lsm6dso.c3
-rw-r--r--driver/als_si114x.c7
-rw-r--r--driver/als_tcs3400.c5
-rw-r--r--driver/bc12/max14637.c2
-rw-r--r--driver/bc12/pi3usb9281.c2
-rw-r--r--driver/sync.c2
-rw-r--r--driver/tcpm/anx74xx.c4
-rw-r--r--driver/tcpm/fusb302.c4
-rw-r--r--driver/tcpm/stub.c4
-rw-r--r--driver/tcpm/tcpci.c4
-rw-r--r--driver/touchpad_elan.c2
-rw-r--r--driver/touchpad_st.c4
-rw-r--r--extra/lightbar/main.c5
-rw-r--r--extra/lightbar/simulation.h2
-rw-r--r--fuzz/host_command_fuzz.c4
-rw-r--r--fuzz/usb_pd_fuzz.c9
-rw-r--r--include/task.h4
-rw-r--r--test/charge_ramp.c2
-rw-r--r--test/mutex.c3
-rw-r--r--test/pingpong.c3
-rw-r--r--test/usb_pd.c6
-rw-r--r--test/usb_pe_drp.c2
-rw-r--r--test/usb_tcpmv2_tcpci.c2
-rw-r--r--test/usb_typec_drp_acc_trysrc.c56
-rw-r--r--zephyr/shim/src/tasks.c3
-rw-r--r--zephyr/test/tasks/main.c12
139 files changed, 317 insertions, 341 deletions
diff --git a/baseboard/grunt/baseboard.c b/baseboard/grunt/baseboard.c
index a6192e8789..c374eda42a 100644
--- a/baseboard/grunt/baseboard.c
+++ b/baseboard/grunt/baseboard.c
@@ -197,7 +197,7 @@ static void anx74xx_cable_det_handler(void)
* and if in normal mode, then there is no need to trigger a tcpc reset.
*/
if (cable_det && !reset_n)
- task_set_event(TASK_ID_PD_C0, PD_EVENT_TCPC_RESET, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_TCPC_RESET);
}
DECLARE_DEFERRED(anx74xx_cable_det_handler);
diff --git a/baseboard/volteer/baseboard.c b/baseboard/volteer/baseboard.c
index be15e108a5..a9993c2c1f 100644
--- a/baseboard/volteer/baseboard.c
+++ b/baseboard/volteer/baseboard.c
@@ -174,11 +174,11 @@ void bc12_interrupt(enum gpio_signal signal)
{
switch (signal) {
case GPIO_USB_C0_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
break;
case GPIO_USB_C1_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
break;
default:
diff --git a/baseboard/zork/variant_trembyle.c b/baseboard/zork/variant_trembyle.c
index 050b6b4beb..c300a88cee 100644
--- a/baseboard/zork/variant_trembyle.c
+++ b/baseboard/zork/variant_trembyle.c
@@ -347,11 +347,11 @@ void bc12_interrupt(enum gpio_signal signal)
{
switch (signal) {
case GPIO_USB_C0_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
break;
case GPIO_USB_C1_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
break;
default:
diff --git a/board/akemi/board.c b/board/akemi/board.c
index cc78e77f0c..730edbac11 100644
--- a/board/akemi/board.c
+++ b/board/akemi/board.c
@@ -90,11 +90,11 @@ static void bc12_interrupt(enum gpio_signal signal)
{
switch (signal) {
case GPIO_USB_C0_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
break;
case GPIO_USB_C1_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
break;
default:
diff --git a/board/asurada/board.c b/board/asurada/board.c
index 8af8962e6e..2132885542 100644
--- a/board/asurada/board.c
+++ b/board/asurada/board.c
@@ -200,9 +200,9 @@ struct bc12_config bc12_ports[CONFIG_USB_PD_PORT_MAX_COUNT] = {
static void bc12_interrupt(enum gpio_signal signal)
{
if (signal == GPIO_USB_C0_BC12_INT_ODL)
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
else
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
}
static void board_sub_bc12_init(void)
diff --git a/board/boten/board.c b/board/boten/board.c
index f8f20bf0ec..4bdc26745f 100644
--- a/board/boten/board.c
+++ b/board/boten/board.c
@@ -53,7 +53,7 @@ static void usb_c0_interrupt(enum gpio_signal s)
* chip.
*/
schedule_deferred_pd_interrupt(0);
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
}
static void c0_ccsbu_ovp_interrupt(enum gpio_signal s)
diff --git a/board/burnet/board.c b/board/burnet/board.c
index 3ea5555ecf..c5329dcb03 100644
--- a/board/burnet/board.c
+++ b/board/burnet/board.c
@@ -237,7 +237,7 @@ int pd_snk_is_vbus_provided(int port)
void bc12_interrupt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
}
/*
diff --git a/board/cerise/board.c b/board/cerise/board.c
index 6f7f67a529..71f8f5a742 100644
--- a/board/cerise/board.c
+++ b/board/cerise/board.c
@@ -254,7 +254,7 @@ int pd_snk_is_vbus_provided(int port)
void bc12_interrupt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
}
#ifndef VARIANT_KUKUI_NO_SENSORS
diff --git a/board/cheza/board.c b/board/cheza/board.c
index 7437b8da72..daf0a4af5c 100644
--- a/board/cheza/board.c
+++ b/board/cheza/board.c
@@ -91,12 +91,12 @@ static void vbus1_evt(enum gpio_signal signal)
static void usb0_evt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
}
static void usb1_evt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
}
static void anx74xx_cable_det_handler(void)
@@ -114,7 +114,7 @@ static void anx74xx_cable_det_handler(void)
* and if in normal mode, then there is no need to trigger a tcpc reset.
*/
if (cable_det && !reset_n)
- task_set_event(TASK_ID_PD_C0, PD_EVENT_TCPC_RESET, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_TCPC_RESET);
}
DECLARE_DEFERRED(anx74xx_cable_det_handler);
diff --git a/board/coachz/board.c b/board/coachz/board.c
index b29b4ff178..7e7cd42f5d 100644
--- a/board/coachz/board.c
+++ b/board/coachz/board.c
@@ -85,12 +85,12 @@ static void tcpc_alert_event(enum gpio_signal signal)
static void usb0_evt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
}
static void usb1_evt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
}
static void ppc_interrupt(enum gpio_signal signal)
diff --git a/board/coral/board.c b/board/coral/board.c
index 829b057d77..0f58175055 100644
--- a/board/coral/board.c
+++ b/board/coral/board.c
@@ -100,7 +100,7 @@ static void anx74xx_cable_det_handler(void)
* and if in normal mode, then there is no need to trigger a tcpc reset.
*/
if (cable_det && !reset_n)
- task_set_event(TASK_ID_PD_C0, PD_EVENT_TCPC_RESET, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_TCPC_RESET);
}
DECLARE_DEFERRED(anx74xx_cable_det_handler);
diff --git a/board/dalboz/board.c b/board/dalboz/board.c
index 6d12475fb3..f9052f9ee5 100644
--- a/board/dalboz/board.c
+++ b/board/dalboz/board.c
@@ -517,11 +517,11 @@ void bc12_interrupt(enum gpio_signal signal)
{
switch (signal) {
case GPIO_USB_C0_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
break;
case GPIO_USB_C1_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
break;
default:
diff --git a/board/damu/board.c b/board/damu/board.c
index 280e834c85..26086cbc98 100644
--- a/board/damu/board.c
+++ b/board/damu/board.c
@@ -254,7 +254,7 @@ int pd_snk_is_vbus_provided(int port)
void bc12_interrupt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
}
#ifndef VARIANT_KUKUI_NO_SENSORS
diff --git a/board/dirinboz/board.c b/board/dirinboz/board.c
index d7240f1728..2deeaf8584 100644
--- a/board/dirinboz/board.c
+++ b/board/dirinboz/board.c
@@ -434,11 +434,11 @@ void bc12_interrupt(enum gpio_signal signal)
{
switch (signal) {
case GPIO_USB_C0_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
break;
case GPIO_USB_C1_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
break;
default:
diff --git a/board/dratini/board.c b/board/dratini/board.c
index b10c299af1..e2f7dbe6f4 100644
--- a/board/dratini/board.c
+++ b/board/dratini/board.c
@@ -113,11 +113,11 @@ static void bc12_interrupt(enum gpio_signal signal)
{
switch (signal) {
case GPIO_USB_C0_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
break;
case GPIO_USB_C1_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
break;
default:
diff --git a/board/drawcia/board.c b/board/drawcia/board.c
index 5102a01428..77782bbad7 100644
--- a/board/drawcia/board.c
+++ b/board/drawcia/board.c
@@ -58,7 +58,7 @@ DECLARE_DEFERRED(check_c0_line);
static void notify_c0_chips(void)
{
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
sm5803_interrupt(0);
}
@@ -93,7 +93,7 @@ DECLARE_DEFERRED(check_c1_line);
static void notify_c1_chips(void)
{
schedule_deferred_pd_interrupt(1);
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
sm5803_interrupt(1);
}
diff --git a/board/elm/board.c b/board/elm/board.c
index a78ae1b94d..9a8b412520 100644
--- a/board/elm/board.c
+++ b/board/elm/board.c
@@ -67,7 +67,7 @@ DECLARE_DEFERRED(deferred_reset_pd_mcu);
void usb_evt(enum gpio_signal signal)
{
if (!gpio_get_level(GPIO_BC12_WAKE_L))
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
}
#include "gpio_list.h"
@@ -206,7 +206,7 @@ void deferred_reset_pd_mcu(void)
gpio_set_level(GPIO_USB_C0_RST, 1);
hook_call_deferred(&deferred_reset_pd_mcu_data, 1*MSEC);
/* on PD reset, trigger PD task to reset state */
- task_set_event(TASK_ID_PD_C0, PD_EVENT_TCPC_RESET, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_TCPC_RESET);
break;
case 3:
/*
diff --git a/board/eve/board.c b/board/eve/board.c
index 095b19ef3a..4e1557f9de 100644
--- a/board/eve/board.c
+++ b/board/eve/board.c
@@ -120,7 +120,7 @@ static void anx74xx_c0_cable_det_handler(void)
* and if in normal mode, then there is no need to trigger a tcpc reset.
*/
if (cable_det && !reset_n)
- task_set_event(TASK_ID_PD_C0, PD_EVENT_TCPC_RESET, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_TCPC_RESET);
}
DECLARE_DEFERRED(anx74xx_c0_cable_det_handler);
@@ -139,7 +139,7 @@ static void anx74xx_c1_cable_det_handler(void)
* and if in normal mode, then there is no need to trigger a tcpc reset.
*/
if (cable_det && !reset_n)
- task_set_event(TASK_ID_PD_C1, PD_EVENT_TCPC_RESET, 0);
+ task_set_event(TASK_ID_PD_C1, PD_EVENT_TCPC_RESET);
}
DECLARE_DEFERRED(anx74xx_c1_cable_det_handler);
diff --git a/board/fennel/board.c b/board/fennel/board.c
index 6a3980d6a8..6ea102d886 100644
--- a/board/fennel/board.c
+++ b/board/fennel/board.c
@@ -253,7 +253,7 @@ int pd_snk_is_vbus_provided(int port)
void bc12_interrupt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
}
#ifndef VARIANT_KUKUI_NO_SENSORS
diff --git a/board/galtic/board.c b/board/galtic/board.c
index 670cc610ab..1ed1511ab6 100644
--- a/board/galtic/board.c
+++ b/board/galtic/board.c
@@ -51,7 +51,7 @@ DECLARE_DEFERRED(check_c0_line);
static void notify_c0_chips(void)
{
schedule_deferred_pd_interrupt(0);
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
}
static void check_c0_line(void)
@@ -85,7 +85,7 @@ DECLARE_DEFERRED(check_c1_line);
static void notify_c1_chips(void)
{
schedule_deferred_pd_interrupt(1);
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
}
static void check_c1_line(void)
diff --git a/board/gumboz/board.c b/board/gumboz/board.c
index d7240f1728..2deeaf8584 100644
--- a/board/gumboz/board.c
+++ b/board/gumboz/board.c
@@ -434,11 +434,11 @@ void bc12_interrupt(enum gpio_signal signal)
{
switch (signal) {
case GPIO_USB_C0_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
break;
case GPIO_USB_C1_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
break;
default:
diff --git a/board/halvor/board.c b/board/halvor/board.c
index c49fe553dc..3f660c7f76 100644
--- a/board/halvor/board.c
+++ b/board/halvor/board.c
@@ -318,13 +318,13 @@ void halvor_bc12_interrupt(enum gpio_signal signal)
{
switch (signal) {
case GPIO_USB_C0_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
break;
case GPIO_USB_C1_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
break;
case GPIO_USB_C2_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P2, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P2, USB_CHG_EVENT_BC12);
break;
default:
diff --git a/board/hatch/board.c b/board/hatch/board.c
index 69da3f5328..b3e5e3db0b 100644
--- a/board/hatch/board.c
+++ b/board/hatch/board.c
@@ -94,11 +94,11 @@ static void bc12_interrupt(enum gpio_signal signal)
{
switch (signal) {
case GPIO_USB_C0_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
break;
case GPIO_USB_C1_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
break;
default:
diff --git a/board/helios/board.c b/board/helios/board.c
index 87b2b89702..38f2d4a63e 100644
--- a/board/helios/board.c
+++ b/board/helios/board.c
@@ -84,11 +84,11 @@ static void bc12_interrupt(enum gpio_signal signal)
{
switch (signal) {
case GPIO_USB_C0_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
break;
case GPIO_USB_C1_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
break;
default:
diff --git a/board/jacuzzi/board.c b/board/jacuzzi/board.c
index 8b6478c26a..9b77b69dde 100644
--- a/board/jacuzzi/board.c
+++ b/board/jacuzzi/board.c
@@ -256,7 +256,7 @@ int pd_snk_is_vbus_provided(int port)
void bc12_interrupt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
}
#ifndef VARIANT_KUKUI_NO_SENSORS
diff --git a/board/jinlon/board.c b/board/jinlon/board.c
index f789b15590..b232c2a863 100644
--- a/board/jinlon/board.c
+++ b/board/jinlon/board.c
@@ -99,11 +99,11 @@ static void bc12_interrupt(enum gpio_signal signal)
{
switch (signal) {
case GPIO_USB_C0_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
break;
case GPIO_USB_C1_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
break;
default:
diff --git a/board/kappa/board.c b/board/kappa/board.c
index 89dd4648c6..6a47271afa 100644
--- a/board/kappa/board.c
+++ b/board/kappa/board.c
@@ -236,7 +236,7 @@ int pd_snk_is_vbus_provided(int port)
void bc12_interrupt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
}
static void board_init(void)
diff --git a/board/kindred/board.c b/board/kindred/board.c
index 0ee52f7095..948eb980d3 100644
--- a/board/kindred/board.c
+++ b/board/kindred/board.c
@@ -116,11 +116,11 @@ static void bc12_interrupt(enum gpio_signal signal)
{
switch (signal) {
case GPIO_USB_C0_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
break;
case GPIO_USB_C1_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
break;
default:
diff --git a/board/kohaku/board.c b/board/kohaku/board.c
index 8f261dff23..300a19b3bb 100644
--- a/board/kohaku/board.c
+++ b/board/kohaku/board.c
@@ -83,11 +83,11 @@ static void bc12_interrupt(enum gpio_signal signal)
{
switch (signal) {
case GPIO_USB_C0_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
break;
case GPIO_USB_C1_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
break;
default:
diff --git a/board/lantis/board.c b/board/lantis/board.c
index 8e43844bce..cff3319bbd 100644
--- a/board/lantis/board.c
+++ b/board/lantis/board.c
@@ -58,7 +58,7 @@ DECLARE_DEFERRED(check_c0_line);
static void notify_c0_chips(void)
{
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
sm5803_interrupt(0);
}
@@ -93,7 +93,7 @@ DECLARE_DEFERRED(check_c1_line);
static void notify_c1_chips(void)
{
schedule_deferred_pd_interrupt(1);
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
sm5803_interrupt(1);
}
diff --git a/board/lazor/board.c b/board/lazor/board.c
index 6e0d60935a..ad0d19e24b 100644
--- a/board/lazor/board.c
+++ b/board/lazor/board.c
@@ -70,12 +70,12 @@ static void tcpc_alert_event(enum gpio_signal signal)
static void usb0_evt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
}
static void usb1_evt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
}
static void usba_oc_deferred(void)
diff --git a/board/madoo/board.c b/board/madoo/board.c
index 520cdea17d..c66c1e29e2 100644
--- a/board/madoo/board.c
+++ b/board/madoo/board.c
@@ -62,7 +62,7 @@ static void notify_c0_chips(void)
* chip. Therefore we'll need to check both ICs.
*/
schedule_deferred_pd_interrupt(0);
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
}
static void check_c0_line(void)
@@ -97,7 +97,7 @@ DECLARE_DEFERRED(check_c1_line);
static void notify_c1_chips(void)
{
schedule_deferred_pd_interrupt(1);
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
}
static void check_c1_line(void)
diff --git a/board/magolor/board.c b/board/magolor/board.c
index 1ca090605e..18b6a77968 100644
--- a/board/magolor/board.c
+++ b/board/magolor/board.c
@@ -75,7 +75,7 @@ static void usb_c0_interrupt(enum gpio_signal s)
* chip. Therefore we'll need to check both ICs.
*/
tcpc_alert_event(s);
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
}
static void sub_usb_c1_interrupt(enum gpio_signal s)
@@ -85,7 +85,7 @@ static void sub_usb_c1_interrupt(enum gpio_signal s)
* chip. Therefore we'll need to check both ICs.
*/
tcpc_alert_event(s);
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
}
#include "gpio_list.h"
diff --git a/board/mchpevb1/board.c b/board/mchpevb1/board.c
index 79f104ff55..0a502f632c 100644
--- a/board/mchpevb1/board.c
+++ b/board/mchpevb1/board.c
@@ -192,12 +192,12 @@ void vbus1_evt(enum gpio_signal signal)
void usb0_evt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
}
void usb1_evt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
}
#endif
diff --git a/board/metaknight/board.c b/board/metaknight/board.c
index 2177430822..790b8a05e2 100644
--- a/board/metaknight/board.c
+++ b/board/metaknight/board.c
@@ -70,7 +70,7 @@ static void usb_c0_interrupt(enum gpio_signal s)
* chip. Therefore we'll need to check both ICs.
*/
tcpc_alert_event(s);
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
}
static void sub_usb_c1_interrupt(enum gpio_signal s)
@@ -80,7 +80,7 @@ static void sub_usb_c1_interrupt(enum gpio_signal s)
* chip. Therefore we'll need to check both ICs.
*/
tcpc_alert_event(s);
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
}
static void sub_hdmi_hpd_interrupt(enum gpio_signal s)
diff --git a/board/mushu/board.c b/board/mushu/board.c
index dd407091c5..ab2843853f 100644
--- a/board/mushu/board.c
+++ b/board/mushu/board.c
@@ -96,11 +96,11 @@ static void bc12_interrupt(enum gpio_signal signal)
{
switch (signal) {
case GPIO_USB_C0_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
break;
case GPIO_USB_C1_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
break;
default:
diff --git a/board/nami/board.c b/board/nami/board.c
index 3ffed42ae0..e854c4990a 100644
--- a/board/nami/board.c
+++ b/board/nami/board.c
@@ -139,12 +139,12 @@ void vbus1_evt(enum gpio_signal signal)
void usb0_evt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
}
void usb1_evt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
}
#include "gpio_list.h"
diff --git a/board/nautilus/board.c b/board/nautilus/board.c
index e538010814..ebdc360e16 100644
--- a/board/nautilus/board.c
+++ b/board/nautilus/board.c
@@ -103,12 +103,12 @@ void vbus1_evt(enum gpio_signal signal)
void usb0_evt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
}
void usb1_evt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
}
#include "gpio_list.h"
diff --git a/board/nightfury/board.c b/board/nightfury/board.c
index 7c1987c42e..8b0713e216 100644
--- a/board/nightfury/board.c
+++ b/board/nightfury/board.c
@@ -85,11 +85,11 @@ static void bc12_interrupt(enum gpio_signal signal)
{
switch (signal) {
case GPIO_USB_C0_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
break;
case GPIO_USB_C1_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
break;
default:
diff --git a/board/oak/board.c b/board/oak/board.c
index eb16c03ab1..2c76cdc98b 100644
--- a/board/oak/board.c
+++ b/board/oak/board.c
@@ -70,8 +70,8 @@ void pd_mcu_interrupt(enum gpio_signal signal)
#if BOARD_REV >= OAK_REV4
void usb_evt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_INTR, 0);
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_INTR, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_INTR);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_INTR);
}
#endif /* BOARD_REV >= OAK_REV4 */
@@ -545,7 +545,7 @@ void vbus_task(void *u)
if (wake)
task_set_event(port ? TASK_ID_USB_CHG_P1 :
TASK_ID_USB_CHG_P0,
- USB_CHG_EVENT_BC12, 0);
+ USB_CHG_EVENT_BC12);
}
task_wait_event(-1);
}
diff --git a/board/palkia/board.c b/board/palkia/board.c
index 939447fc17..4caae3d2b5 100644
--- a/board/palkia/board.c
+++ b/board/palkia/board.c
@@ -94,7 +94,7 @@ static void bc12_interrupt(enum gpio_signal signal)
{
switch (signal) {
case GPIO_USB_C0_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
break;
default:
diff --git a/board/pompom/board.c b/board/pompom/board.c
index 84c7d3183d..e91ff082c4 100644
--- a/board/pompom/board.c
+++ b/board/pompom/board.c
@@ -62,7 +62,7 @@ static void tcpc_alert_event(enum gpio_signal signal)
static void usb0_evt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
}
static void usba_oc_deferred(void)
diff --git a/board/poppy/board.c b/board/poppy/board.c
index e01446b316..6dfb9ab441 100644
--- a/board/poppy/board.c
+++ b/board/poppy/board.c
@@ -108,12 +108,12 @@ void vbus1_evt(enum gpio_signal signal)
void usb0_evt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
}
void usb1_evt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
}
#ifdef CONFIG_USB_PD_TCPC_LOW_POWER
@@ -132,7 +132,7 @@ static void anx74xx_cable_det_handler(void)
* and if in normal mode, then there is no need to trigger a tcpc reset.
*/
if (cable_det && !reset_n)
- task_set_event(TASK_ID_PD_C0, PD_EVENT_TCPC_RESET, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_TCPC_RESET);
}
DECLARE_DEFERRED(anx74xx_cable_det_handler);
diff --git a/board/rammus/board.c b/board/rammus/board.c
index 06210b2134..93de4bd0bd 100644
--- a/board/rammus/board.c
+++ b/board/rammus/board.c
@@ -105,12 +105,12 @@ void vbus1_evt(enum gpio_signal signal)
void usb0_evt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
}
void usb1_evt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
}
#include "gpio_list.h"
diff --git a/board/reef/board.c b/board/reef/board.c
index e6856f3f55..a37ad9e8d4 100644
--- a/board/reef/board.c
+++ b/board/reef/board.c
@@ -98,7 +98,7 @@ static void anx74xx_cable_det_handler(void)
* and if in normal mode, then there is no need to trigger a tcpc reset.
*/
if (cable_det && !reset_n)
- task_set_event(TASK_ID_PD_C0, PD_EVENT_TCPC_RESET, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_TCPC_RESET);
}
DECLARE_DEFERRED(anx74xx_cable_det_handler);
diff --git a/board/reef_mchp/board.c b/board/reef_mchp/board.c
index 621f6c484b..c63cee981a 100644
--- a/board/reef_mchp/board.c
+++ b/board/reef_mchp/board.c
@@ -132,7 +132,7 @@ static void anx74xx_cable_det_handler(void)
* and if in normal mode, then there is no need to trigger a tcpc reset.
*/
if (cable_det && !reset_n)
- task_set_event(TASK_ID_PD_C0, PD_EVENT_TCPC_RESET, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_TCPC_RESET);
}
DECLARE_DEFERRED(anx74xx_cable_det_handler);
/* from firmware-reef-9042.B */
diff --git a/board/samus_pd/board.c b/board/samus_pd/board.c
index 00cdb9e946..eb4d4c90c6 100644
--- a/board/samus_pd/board.c
+++ b/board/samus_pd/board.c
@@ -109,12 +109,12 @@ void vbus1_evt(enum gpio_signal signal)
void usb0_evt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
}
void usb1_evt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
}
static void chipset_s5_to_s3(void)
diff --git a/board/sasuke/board.c b/board/sasuke/board.c
index 23555facda..4f1afd4d4e 100644
--- a/board/sasuke/board.c
+++ b/board/sasuke/board.c
@@ -53,7 +53,7 @@ static void usb_c0_interrupt(enum gpio_signal s)
* chip. Therefore we'll need to check both ICs.
*/
tcpc_alert_event(s);
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
}
static void sub_usb_c1_interrupt(enum gpio_signal s)
@@ -63,7 +63,7 @@ static void sub_usb_c1_interrupt(enum gpio_signal s)
* chip. Therefore we'll need to check both ICs.
*/
tcpc_alert_event(s);
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
}
static void sub_hdmi_hpd_interrupt(enum gpio_signal s)
diff --git a/board/shuboz/board.c b/board/shuboz/board.c
index 137338a107..30839ac8bd 100644
--- a/board/shuboz/board.c
+++ b/board/shuboz/board.c
@@ -448,11 +448,11 @@ void bc12_interrupt(enum gpio_signal signal)
{
switch (signal) {
case GPIO_USB_C0_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
break;
case GPIO_USB_C1_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
break;
default:
diff --git a/board/stern/board.c b/board/stern/board.c
index 0a04842e35..248c042b4f 100644
--- a/board/stern/board.c
+++ b/board/stern/board.c
@@ -254,7 +254,7 @@ int pd_snk_is_vbus_provided(int port)
void bc12_interrupt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
}
#ifndef VARIANT_KUKUI_NO_SENSORS
diff --git a/board/storo/board.c b/board/storo/board.c
index 15dc9a9bf5..fa6e8b6aee 100644
--- a/board/storo/board.c
+++ b/board/storo/board.c
@@ -53,7 +53,7 @@ DECLARE_DEFERRED(check_c0_line);
static void notify_c0_chips(void)
{
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
sm5803_interrupt(0);
}
@@ -88,7 +88,7 @@ DECLARE_DEFERRED(check_c1_line);
static void notify_c1_chips(void)
{
schedule_deferred_pd_interrupt(1);
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
sm5803_interrupt(1);
}
diff --git a/board/stryke/board.c b/board/stryke/board.c
index afec23450c..73018ceeb6 100644
--- a/board/stryke/board.c
+++ b/board/stryke/board.c
@@ -93,11 +93,11 @@ static void bc12_interrupt(enum gpio_signal signal)
{
switch (signal) {
case GPIO_USB_C0_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
break;
case GPIO_USB_C1_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
break;
default:
diff --git a/board/trogdor/board.c b/board/trogdor/board.c
index 9cf26f3e6a..b2cbeb2a79 100644
--- a/board/trogdor/board.c
+++ b/board/trogdor/board.c
@@ -68,12 +68,12 @@ static void tcpc_alert_event(enum gpio_signal signal)
static void usb0_evt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
}
static void usb1_evt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
}
static void usba_oc_deferred(void)
diff --git a/board/twinkie/simpletrace.c b/board/twinkie/simpletrace.c
index f68a09adcf..9f151f761f 100644
--- a/board/twinkie/simpletrace.c
+++ b/board/twinkie/simpletrace.c
@@ -197,7 +197,7 @@ void rx_event(void)
pd_rx_disable_monitoring(0);
/* trigger the analysis in the task */
#ifdef HAS_TASK_SNIFFER
- task_set_event(TASK_ID_SNIFFER, 1 << i, 0);
+ task_set_event(TASK_ID_SNIFFER, 1 << i);
#endif
/* start reception only one CC line */
break;
diff --git a/board/twinkie/sniffer.c b/board/twinkie/sniffer.c
index 90359ba5e8..00effb8539 100644
--- a/board/twinkie/sniffer.c
+++ b/board/twinkie/sniffer.c
@@ -109,7 +109,7 @@ static void ep_tx(void)
: EP_BUF_SIZE;
STM32_TOGGLE_EP(USB_EP_SNIFFER, EP_TX_MASK, EP_TX_VALID, 0);
/* wake up the processing */
- task_set_event(TASK_ID_SNIFFER, USB_EVENT, 0);
+ task_set_event(TASK_ID_SNIFFER, USB_EVENT);
}
static void ep_event(enum usb_ep_event evt)
@@ -218,7 +218,7 @@ void tim_dma_handler(void)
else
tim_rx1_handler(stat);
/* time to process the samples */
- task_set_event(TASK_ID_SNIFFER, USB_EVENT, 0);
+ task_set_event(TASK_ID_SNIFFER, USB_EVENT);
}
DECLARE_IRQ(STM32_IRQ_DMA_CHANNEL_4_7, tim_dma_handler, 1);
diff --git a/board/vilboz/board.c b/board/vilboz/board.c
index 33cff6b0db..ba2eb1f152 100644
--- a/board/vilboz/board.c
+++ b/board/vilboz/board.c
@@ -375,7 +375,7 @@ void bc12_interrupt(enum gpio_signal signal)
{
switch (signal) {
case GPIO_USB_C0_BC12_INT_ODL:
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
break;
default:
diff --git a/board/waddledee/board.c b/board/waddledee/board.c
index 15dc9a9bf5..fa6e8b6aee 100644
--- a/board/waddledee/board.c
+++ b/board/waddledee/board.c
@@ -53,7 +53,7 @@ DECLARE_DEFERRED(check_c0_line);
static void notify_c0_chips(void)
{
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
sm5803_interrupt(0);
}
@@ -88,7 +88,7 @@ DECLARE_DEFERRED(check_c1_line);
static void notify_c1_chips(void)
{
schedule_deferred_pd_interrupt(1);
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
sm5803_interrupt(1);
}
diff --git a/board/waddledoo/board.c b/board/waddledoo/board.c
index c3c3f49e8b..f7146ce8f7 100644
--- a/board/waddledoo/board.c
+++ b/board/waddledoo/board.c
@@ -58,7 +58,7 @@ static void notify_c0_chips(void)
* chip. Therefore we'll need to check both ICs.
*/
schedule_deferred_pd_interrupt(0);
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
}
static void check_c0_line(void)
@@ -93,7 +93,7 @@ DECLARE_DEFERRED(check_c1_line);
static void notify_c1_chips(void)
{
schedule_deferred_pd_interrupt(1);
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
}
static void check_c1_line(void)
diff --git a/board/wheelie/board.c b/board/wheelie/board.c
index ab1cb03942..8c1e9b3def 100644
--- a/board/wheelie/board.c
+++ b/board/wheelie/board.c
@@ -45,7 +45,7 @@
/* C0 interrupt line shared by BC 1.2 and charger */
static void usb_c0_interrupt(enum gpio_signal s)
{
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
sm5803_interrupt(0);
}
@@ -53,7 +53,7 @@ static void usb_c0_interrupt(enum gpio_signal s)
static void usb_c1_interrupt(enum gpio_signal s)
{
schedule_deferred_pd_interrupt(1);
- task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P1, USB_CHG_EVENT_BC12);
sm5803_interrupt(1);
}
diff --git a/board/willow/board.c b/board/willow/board.c
index f672da2ad3..d0fd99b09e 100644
--- a/board/willow/board.c
+++ b/board/willow/board.c
@@ -253,7 +253,7 @@ int pd_snk_is_vbus_provided(int port)
void bc12_interrupt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12, 0);
+ task_set_event(TASK_ID_USB_CHG_P0, USB_CHG_EVENT_BC12);
}
#ifndef VARIANT_KUKUI_NO_SENSORS
diff --git a/board/zinger/runtime.c b/board/zinger/runtime.c
index da1a11a7ee..5d17bfda04 100644
--- a/board/zinger/runtime.c
+++ b/board/zinger/runtime.c
@@ -67,7 +67,7 @@ void interrupt_enable(void)
asm("cpsie i");
}
-uint32_t task_set_event(task_id_t tskid, uint32_t event, int wait)
+uint32_t task_set_event(task_id_t tskid, uint32_t event)
{
last_event = event;
@@ -229,7 +229,7 @@ uint32_t task_wait_event_mask(uint32_t event_mask, int timeout_us)
/* Restore any pending events not in the event_mask */
if (evt & ~event_mask)
- task_set_event(0, evt & ~event_mask, 0);
+ task_set_event(0, evt & ~event_mask);
return evt & event_mask;
}
diff --git a/chip/ish/heci.c b/chip/ish/heci.c
index 309a17c0a1..4a9bc9551b 100644
--- a/chip/ish/heci.c
+++ b/chip/ish/heci.c
@@ -706,7 +706,7 @@ static int handle_flow_control_cmd(struct hbm_flow_control *flow_ctrl)
mutex_unlock(&connect->cred_lock);
if (waiting_task)
- task_set_event(waiting_task, TASK_EVENT_IPC_READY, 0);
+ task_set_event(waiting_task, TASK_EVENT_IPC_READY);
return EC_SUCCESS;
}
diff --git a/chip/ish/i2c.c b/chip/ish/i2c.c
index 962379cad3..eeb4b38d60 100644
--- a/chip/ish/i2c.c
+++ b/chip/ish/i2c.c
@@ -446,7 +446,7 @@ static void i2c_interrupt_handler(struct i2c_context *ctx)
/* disable interrupts */
i2c_intr_switch(ctx->base, DISABLE_INT);
- task_set_event(ctx->wait_task_id, TASK_EVENT_I2C_IDLE, 0);
+ task_set_event(ctx->wait_task_id, TASK_EVENT_I2C_IDLE);
}
static void i2c_isr_bus0(void)
diff --git a/chip/ish/ipc_heci.c b/chip/ish/ipc_heci.c
index 5271aa3a91..3b8f4a31d1 100644
--- a/chip/ish/ipc_heci.c
+++ b/chip/ish/ipc_heci.c
@@ -377,7 +377,7 @@ static void handle_msg_recv_interrupt(const uint32_t peer_id)
if (!invalid_msg) {
/* send event to task */
task_set_event(ctx->msg_events[protocol].task_id,
- ctx->msg_events[protocol].event, 0);
+ ctx->msg_events[protocol].event);
} else {
CPRINTS("discard msg (%d) : %d", protocol, invalid_msg);
diff --git a/chip/it83xx/adc.c b/chip/it83xx/adc.c
index b3eb6e25a0..2dc82abab4 100644
--- a/chip/it83xx/adc.c
+++ b/chip/it83xx/adc.c
@@ -208,7 +208,7 @@ void adc_interrupt(void)
task_disable_irq(IT83XX_IRQ_ADC);
/* Wake up the task which was waiting for the interrupt */
if (task_waiting != TASK_ID_INVALID)
- task_set_event(task_waiting, TASK_EVENT_ADC_DONE, 0);
+ task_set_event(task_waiting, TASK_EVENT_ADC_DONE);
}
#ifdef CONFIG_ADC_VOLTAGE_COMPARATOR
diff --git a/chip/it83xx/i2c.c b/chip/it83xx/i2c.c
index 3fac0fbec5..d6dc366f56 100644
--- a/chip/it83xx/i2c.c
+++ b/chip/it83xx/i2c.c
@@ -769,7 +769,7 @@ void i2c_interrupt(int port)
/* If done doing work, wake up the task waiting for the transfer */
if (!i2c_transaction(port)) {
task_disable_irq(i2c_ctrl_regs[port].irq);
- task_set_event(id, TASK_EVENT_I2C_IDLE, 0);
+ task_set_event(id, TASK_EVENT_I2C_IDLE);
}
}
diff --git a/chip/it83xx/intc.c b/chip/it83xx/intc.c
index 057e51293a..cc7ffc6c02 100644
--- a/chip/it83xx/intc.c
+++ b/chip/it83xx/intc.c
@@ -40,7 +40,7 @@ static void chip_pd_irq(enum usbpd_port port)
IT83XX_USBPD_ISR(port) = USBPD_REG_MASK_HARD_RESET_DETECT;
USBPD_SW_RESET(port);
task_set_event(PD_PORT_TO_TASK_ID(port),
- PD_EVENT_RX_HARD_RESET, 0);
+ PD_EVENT_RX_HARD_RESET);
}
if (USBPD_IS_RX_DONE(port)) {
@@ -59,7 +59,7 @@ static void chip_pd_irq(enum usbpd_port port)
/* clear TX done interrupt */
IT83XX_USBPD_ISR(port) = USBPD_REG_MASK_MSG_TX_DONE;
task_set_event(PD_PORT_TO_TASK_ID(port),
- TASK_EVENT_PHY_TX_DONE, 0);
+ TASK_EVENT_PHY_TX_DONE);
}
if (IS_ENABLED(IT83XX_INTC_PLUG_IN_OUT_SUPPORT)) {
@@ -84,8 +84,7 @@ static void chip_pd_irq(enum usbpd_port port)
/* clear type-c device plug in/out detect interrupt */
IT83XX_USBPD_TCDCR(port) |=
USBPD_REG_PLUG_IN_OUT_DETECT_STAT;
- task_set_event(PD_PORT_TO_TASK_ID(port),
- PD_EVENT_CC, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_CC);
}
}
}
diff --git a/chip/lm4/adc.c b/chip/lm4/adc.c
index c06ce35df3..008288e520 100644
--- a/chip/lm4/adc.c
+++ b/chip/lm4/adc.c
@@ -189,7 +189,7 @@ static void handle_interrupt(int ss)
/* Wake up the task which was waiting on the interrupt, if any */
if (id != TASK_ID_INVALID)
- task_set_event(id, TASK_EVENT_ADC_DONE, 0);
+ task_set_event(id, TASK_EVENT_ADC_DONE);
}
void ss0_interrupt(void) { handle_interrupt(0); }
diff --git a/chip/lm4/i2c.c b/chip/lm4/i2c.c
index ac4456980d..70177df28f 100644
--- a/chip/lm4/i2c.c
+++ b/chip/lm4/i2c.c
@@ -393,7 +393,7 @@ static void handle_interrupt(int port)
/* If done doing work, wake up the task waiting for the transfer */
if (!i2c_do_work(port))
- task_set_event(id, TASK_EVENT_I2C_IDLE, 0);
+ task_set_event(id, TASK_EVENT_I2C_IDLE);
}
void i2c0_interrupt(void) { handle_interrupt(0); }
diff --git a/chip/mchp/i2c.c b/chip/mchp/i2c.c
index 8016938160..606e931a13 100644
--- a/chip/mchp/i2c.c
+++ b/chip/mchp/i2c.c
@@ -950,7 +950,7 @@ static void handle_interrupt(int controller)
/* Wake up the task which was waiting on the I2C interrupt, if any. */
if (id != TASK_ID_INVALID)
- task_set_event(id, TASK_EVENT_I2C_IDLE, 0);
+ task_set_event(id, TASK_EVENT_I2C_IDLE);
}
void i2c0_interrupt(void) { handle_interrupt(0); }
diff --git a/chip/mec1322/i2c.c b/chip/mec1322/i2c.c
index 33b6c6242c..aecc8abd9b 100644
--- a/chip/mec1322/i2c.c
+++ b/chip/mec1322/i2c.c
@@ -517,7 +517,7 @@ static void handle_interrupt(int controller)
/* Wake up the task which was waiting on the I2C interrupt, if any. */
if (id != TASK_ID_INVALID)
- task_set_event(id, TASK_EVENT_I2C_IDLE, 0);
+ task_set_event(id, TASK_EVENT_I2C_IDLE);
}
void i2c0_interrupt(void) { handle_interrupt(0); }
diff --git a/chip/npcx/adc.c b/chip/npcx/adc.c
index 365b401b87..768e7dff27 100644
--- a/chip/npcx/adc.c
+++ b/chip/npcx/adc.c
@@ -338,7 +338,7 @@ void adc_interrupt(void)
/* Wake up the task which was waiting for the interrupt */
if (task_waiting != TASK_ID_INVALID)
- task_set_event(task_waiting, TASK_EVENT_ADC_DONE, 0);
+ task_set_event(task_waiting, TASK_EVENT_ADC_DONE);
}
for (i = NPCX_THRCTS_THR1_STS; i < NPCX_ADC_THRESH_CNT; i++) {
diff --git a/chip/npcx/cec.c b/chip/npcx/cec.c
index 67eda331a6..ebaefa551a 100644
--- a/chip/npcx/cec.c
+++ b/chip/npcx/cec.c
@@ -505,7 +505,7 @@ void enter_state(enum cec_state new_state)
addr = cec_rx.transfer.buf[0] & 0x0f;
if (addr == cec_addr || addr == CEC_BROADCAST_ADDR) {
task_set_event(TASK_ID_CEC,
- TASK_EVENT_RECEIVED_DATA, 0);
+ TASK_EVENT_RECEIVED_DATA);
}
timeout = DATA_ZERO_HIGH_TICKS;
} else {
diff --git a/chip/npcx/i2c.c b/chip/npcx/i2c.c
index 90465415e7..5177aa0c31 100644
--- a/chip/npcx/i2c.c
+++ b/chip/npcx/i2c.c
@@ -493,8 +493,7 @@ void i2c_done(int controller)
task_disable_irq(i2c_irqs[controller]);
/* Notify upper layer */
- task_set_event(p_status->task_waiting,
- TASK_EVENT_I2C_IDLE, 0);
+ task_set_event(p_status->task_waiting, TASK_EVENT_I2C_IDLE);
CPUTS("-END");
}
@@ -551,8 +550,7 @@ static void i2c_handle_receive(int controller)
/* Set error code */
p_status->err_code = SMB_OK;
/* Notify upper layer of missing data */
- task_set_event(p_status->task_waiting,
- TASK_EVENT_I2C_IDLE, 0);
+ task_set_event(p_status->task_waiting, TASK_EVENT_I2C_IDLE);
CPUTS("-END");
}
}
@@ -647,8 +645,7 @@ static void i2c_fifo_handle_receive(int controller)
/* Set error code */
p_status->err_code = SMB_OK;
/* Notify upper layer of missing data */
- task_set_event(p_status->task_waiting,
- TASK_EVENT_I2C_IDLE, 0);
+ task_set_event(p_status->task_waiting, TASK_EVENT_I2C_IDLE);
CPUTS("-END");
}
@@ -767,7 +764,7 @@ void i2c_master_int_handler (int controller)
p_status->err_code = SMB_BUS_ERROR;
/* Notify upper layer */
p_status->oper_state = SMB_IDLE;
- task_set_event(p_status->task_waiting, TASK_EVENT_I2C_IDLE, 0);
+ task_set_event(p_status->task_waiting, TASK_EVENT_I2C_IDLE);
CPUTS("-BER");
/*
@@ -791,7 +788,7 @@ void i2c_master_int_handler (int controller)
p_status->err_code = SMB_MASTER_NO_ADDRESS_MATCH;
/* Notify upper layer */
p_status->oper_state = SMB_IDLE;
- task_set_event(p_status->task_waiting, TASK_EVENT_I2C_IDLE, 0);
+ task_set_event(p_status->task_waiting, TASK_EVENT_I2C_IDLE);
CPUTS("-NA");
}
diff --git a/chip/npcx/peci.c b/chip/npcx/peci.c
index f3145bd2a7..badfbd87d9 100644
--- a/chip/npcx/peci.c
+++ b/chip/npcx/peci.c
@@ -271,7 +271,7 @@ DECLARE_HOOK(HOOK_INIT, peci_init, HOOK_PRIO_DEFAULT);
/* If received a PECI DONE interrupt, post the event to PECI task */
void peci_done_interrupt(void){
if (peci_pending_task_id != NULL_PENDING_TASK_ID)
- task_set_event(peci_pending_task_id, TASK_EVENT_PECI_DONE, 0);
+ task_set_event(peci_pending_task_id, TASK_EVENT_PECI_DONE);
peci_sts = NPCX_PECI_CTL_STS & 0x18;
/* no matter what, clear status bit again */
SET_BIT(NPCX_PECI_CTL_STS, NPCX_PECI_CTL_STS_DONE);
diff --git a/chip/npcx/ps2.c b/chip/npcx/ps2.c
index c470bbe68d..7b8086cbcd 100644
--- a/chip/npcx/ps2.c
+++ b/chip/npcx/ps2.c
@@ -293,7 +293,7 @@ void ps2_int_handler(void)
/* Change the PS/2 module to receive mode */
CLEAR_BIT(NPCX_PS2_PSCON, NPCX_PS2_PSCON_XMT);
ps2_ch_data[active_ch].opr_mode = PS2_RX_MODE;
- task_set_event(task_waiting, TASK_EVENT_PS2_DONE, 0);
+ task_set_event(task_waiting, TASK_EVENT_PS2_DONE);
} else {
if (!ps2_is_rx_error(active_ch)) {
uint8_t data_read = NPCX_PS2_PSDAT;
diff --git a/chip/stm32/dma-stm32f4.c b/chip/stm32/dma-stm32f4.c
index abb33befda..860874de8c 100644
--- a/chip/stm32/dma-stm32f4.c
+++ b/chip/stm32/dma-stm32f4.c
@@ -261,7 +261,7 @@ static inline void _dma_wake_callback(void *cb_data)
task_id_t id = (task_id_t)(int)cb_data;
if (id != TASK_ID_INVALID)
- task_set_event(id, TASK_EVENT_DMA_TC, 0);
+ task_set_event(id, TASK_EVENT_DMA_TC);
}
void dma_enable_tc_interrupt(enum dma_channel stream)
diff --git a/chip/stm32/dma.c b/chip/stm32/dma.c
index a2ed6ca3cb..cd6038b2aa 100644
--- a/chip/stm32/dma.c
+++ b/chip/stm32/dma.c
@@ -276,7 +276,7 @@ static inline void _dma_wake_callback(void *cb_data)
{
task_id_t id = (task_id_t)(int)cb_data;
if (id != TASK_ID_INVALID)
- task_set_event(id, TASK_EVENT_DMA_TC, 0);
+ task_set_event(id, TASK_EVENT_DMA_TC);
}
void dma_enable_tc_interrupt(enum dma_channel channel)
diff --git a/chip/stm32/i2c-stm32f4.c b/chip/stm32/i2c-stm32f4.c
index df6e61564f..c1f19704b5 100644
--- a/chip/stm32/i2c-stm32f4.c
+++ b/chip/stm32/i2c-stm32f4.c
@@ -79,7 +79,7 @@ static inline void _i2c_dma_wake_callback(void *cb_data, int port)
task_id_t id = (task_id_t)(int)cb_data;
if (id != TASK_ID_INVALID)
- task_set_event(id, TASK_EVENT_I2C_COMPLETION(port), 0);
+ task_set_event(id, TASK_EVENT_I2C_COMPLETION(port));
}
/* Each callback is hardcoded to an I2C channel. */
diff --git a/chip/stm32/ucpd-stm32gx.c b/chip/stm32/ucpd-stm32gx.c
index 8a21087b05..f0240230c7 100644
--- a/chip/stm32/ucpd-stm32gx.c
+++ b/chip/stm32/ucpd-stm32gx.c
@@ -777,7 +777,7 @@ static void ucpd_send_good_crc(int port, uint16_t rx_header)
ucpd_tx_buffers[TX_MSG_GOOD_CRC].type = tx_type;
/* Notify ucpd task that a GoodCRC message tx request is pending */
- task_set_event(TASK_ID_UCPD, UCPD_EVT_GOOD_CRC_REQ, 0);
+ task_set_event(TASK_ID_UCPD, UCPD_EVT_GOOD_CRC_REQ);
}
int stm32gx_ucpd_transmit(int port,
@@ -800,7 +800,7 @@ int stm32gx_ucpd_transmit(int port,
len - 2);
/* Notify ucpd task that a TCPM message tx request is pending */
- task_set_event(TASK_ID_UCPD, UCPD_EVT_TCPM_MSG_REQ, 0);
+ task_set_event(TASK_ID_UCPD, UCPD_EVT_TCPM_MSG_REQ);
return EC_SUCCESS;
}
@@ -847,7 +847,7 @@ void stm32gx_ucpd1_irq(void)
/* Check for CC events, set event to wake PD task */
if (sr & (STM32_UCPD_SR_TYPECEVT1 | STM32_UCPD_SR_TYPECEVT2))
- task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_CC, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_CC);
/*
* Check for Tx events. tx_mask includes all status bits related to the
@@ -858,18 +858,17 @@ void stm32gx_ucpd1_irq(void)
if (sr & tx_done_mask) {
/* Check for tx message complete */
if (sr & STM32_UCPD_SR_TXMSGSENT) {
- task_set_event(TASK_ID_UCPD, UCPD_EVT_TX_MSG_SUCCESS,
- 0);
+ task_set_event(TASK_ID_UCPD, UCPD_EVT_TX_MSG_SUCCESS);
#ifdef CONFIG_STM32G4_UCPD_DEBUG
ucpd_log_mark_tx_comp();
#endif
} else if (sr & (STM32_UCPD_SR_TXMSGABT |
STM32_UCPD_SR_TXMSGDISC |STM32_UCPD_SR_TXUND)) {
- task_set_event(TASK_ID_UCPD, UCPD_EVT_TX_MSG_FAIL, 0);
+ task_set_event(TASK_ID_UCPD, UCPD_EVT_TX_MSG_FAIL);
} else if (sr & STM32_UCPD_SR_HRSTSENT) {
- task_set_event(TASK_ID_UCPD, UCPD_EVT_HR_DONE, 0);
+ task_set_event(TASK_ID_UCPD, UCPD_EVT_HR_DONE);
} else if (sr & STM32_UCPD_SR_HRSTDISC) {
- task_set_event(TASK_ID_UCPD, UCPD_EVT_HR_FAIL, 0);
+ task_set_event(TASK_ID_UCPD, UCPD_EVT_HR_FAIL);
}
/* Disable Tx interrupts */
ucpd_tx_interrupts_enable(port, 0);
@@ -906,7 +905,7 @@ void stm32gx_ucpd1_irq(void)
ucpd_send_good_crc(port, *rx_header);
} else {
task_set_event(TASK_ID_UCPD,
- UCPD_EVT_RX_GOOD_CRC, 0);
+ UCPD_EVT_RX_GOOD_CRC);
ucpd_crc_id = PD_HEADER_ID(*rx_header);
}
}
@@ -915,7 +914,7 @@ void stm32gx_ucpd1_irq(void)
if (sr & STM32_UCPD_SR_RXHRSTDET) {
/* hard reset received */
pd_execute_hard_reset(port);
- task_set_event(PD_PORT_TO_TASK_ID(port), TASK_EVENT_WAKE, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), TASK_EVENT_WAKE);
hook_call_deferred(&ucpd_hard_reset_rx_log_data, 0);
}
diff --git a/chip/stm32/usb_pd_phy.c b/chip/stm32/usb_pd_phy.c
index b53c5cfeeb..90506d8975 100644
--- a/chip/stm32/usb_pd_phy.c
+++ b/chip/stm32/usb_pd_phy.c
@@ -303,7 +303,7 @@ static void tx_dma_done(void *data)
pd_tx_disable(port, polarity);
#if defined(CONFIG_COMMON_RUNTIME) && defined(CONFIG_DMA_DEFAULT_HANDLERS)
- task_set_event(PD_PORT_TO_TASK_ID(port), TASK_EVENT_DMA_TC, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), TASK_EVENT_DMA_TC);
#endif
}
diff --git a/common/fpsensor/fpsensor.c b/common/fpsensor/fpsensor.c
index 6b782845f2..08a456dc0e 100644
--- a/common/fpsensor/fpsensor.c
+++ b/common/fpsensor/fpsensor.c
@@ -63,7 +63,7 @@ BUILD_ASSERT(sizeof(struct ec_fp_template_encryption_metadata) % 4 == 0);
/* Interrupt line from the fingerprint sensor */
void fps_event(enum gpio_signal signal)
{
- task_set_event(TASK_ID_FPSENSOR, TASK_EVENT_SENSOR_IRQ, 0);
+ task_set_event(TASK_ID_FPSENSOR, TASK_EVENT_SENSOR_IRQ);
}
static void send_mkbp_event(uint32_t event)
@@ -793,12 +793,12 @@ int command_fpenroll(int argc, char **argv)
enroll_str[EC_MKBP_FP_ERRCODE(event) & 3], percent);
/* wait for finger release between captures */
sensor_mode = FP_MODE_ENROLL_SESSION | FP_MODE_FINGER_UP;
- task_set_event(TASK_ID_FPSENSOR, TASK_EVENT_UPDATE_CONFIG, 0);
+ task_set_event(TASK_ID_FPSENSOR, TASK_EVENT_UPDATE_CONFIG);
while (tries-- && sensor_mode & FP_MODE_FINGER_UP)
usleep(20 * MSEC);
} while (percent < 100);
sensor_mode = 0; /* reset FP_MODE_ENROLL_SESSION */
- task_set_event(TASK_ID_FPSENSOR, TASK_EVENT_UPDATE_CONFIG, 0);
+ task_set_event(TASK_ID_FPSENSOR, TASK_EVENT_UPDATE_CONFIG);
return rc;
}
diff --git a/common/fpsensor/fpsensor_state.c b/common/fpsensor/fpsensor_state.c
index 70568d8ec4..db64110b56 100644
--- a/common/fpsensor/fpsensor_state.c
+++ b/common/fpsensor/fpsensor_state.c
@@ -192,7 +192,7 @@ int fp_set_sensor_mode(uint32_t mode, uint32_t *mode_output)
if (!(mode & FP_MODE_DONT_CHANGE)) {
sensor_mode = mode;
- task_set_event(TASK_ID_FPSENSOR, TASK_EVENT_UPDATE_CONFIG, 0);
+ task_set_event(TASK_ID_FPSENSOR, TASK_EVENT_UPDATE_CONFIG);
}
*mode_output = sensor_mode;
diff --git a/common/host_command.c b/common/host_command.c
index c5821df6d3..2c38b45f1e 100644
--- a/common/host_command.c
+++ b/common/host_command.c
@@ -179,7 +179,7 @@ void host_command_received(struct host_cmd_handler_args *args)
pending_args = args;
/* Wake up the task to handle the command */
- task_set_event(TASK_ID_HOSTCMD, TASK_EVENT_CMD_PENDING, 0);
+ task_set_event(TASK_ID_HOSTCMD, TASK_EVENT_CMD_PENDING);
return;
}
diff --git a/common/host_command_pd.c b/common/host_command_pd.c
index 869cad4493..d46220a7a6 100644
--- a/common/host_command_pd.c
+++ b/common/host_command_pd.c
@@ -51,12 +51,12 @@ void host_command_pd_send_status(enum pd_charge_state new_chg_state)
charge_state = new_chg_state;
#endif
/* Wake PD HC task to send status */
- task_set_event(TASK_ID_PDCMD, TASK_EVENT_EXCHANGE_PD_STATUS, 0);
+ task_set_event(TASK_ID_PDCMD, TASK_EVENT_EXCHANGE_PD_STATUS);
}
void host_command_pd_request_hibernate(void)
{
- task_set_event(TASK_ID_PDCMD, TASK_EVENT_HIBERNATING, 0);
+ task_set_event(TASK_ID_PDCMD, TASK_EVENT_HIBERNATING);
}
#ifdef CONFIG_HOSTCMD_PD
diff --git a/common/lightbar.c b/common/lightbar.c
index 03b6fe5ca1..f80287941d 100644
--- a/common/lightbar.c
+++ b/common/lightbar.c
@@ -1658,7 +1658,7 @@ void lightbar_sequence_f(enum lightbar_sequence num, const char *f)
CPRINTS("LB %s() requests %d %s", f, num,
lightbar_cmds[num].string);
pending_msg = num;
- task_set_event(TASK_ID_LIGHTBAR, PENDING_MSG, 0);
+ task_set_event(TASK_ID_LIGHTBAR, PENDING_MSG);
} else
CPRINTS("LB %s() requests %d - ignored", f, num);
}
diff --git a/common/motion_sense.c b/common/motion_sense.c
index d4e1cbdc10..7a306bfb4a 100644
--- a/common/motion_sense.c
+++ b/common/motion_sense.c
@@ -419,7 +419,7 @@ static void motion_sense_switch_sensor_rate(void)
if (sensor_setup_mask) {
atomic_or(&odr_event_required, sensor_setup_mask);
task_set_event(TASK_ID_MOTIONSENSE,
- TASK_EVENT_MOTION_ODR_CHANGE, 0);
+ TASK_EVENT_MOTION_ODR_CHANGE);
} else {
/* No sensor activated, reset host interval interval to 0. */
ap_event_interval = 0;
@@ -1130,7 +1130,7 @@ static enum ec_status host_cmd_motion_sense(struct host_cmd_handler_args *args)
/* Force a collection to purge old events. */
task_set_event(TASK_ID_MOTIONSENSE,
- TASK_EVENT_MOTION_ODR_CHANGE, 0);
+ TASK_EVENT_MOTION_ODR_CHANGE);
}
out->ec_rate.ret = motion_sense_ec_rate(sensor) / MSEC;
@@ -1158,7 +1158,7 @@ static enum ec_status host_cmd_motion_sense(struct host_cmd_handler_args *args)
atomic_or(&odr_event_required,
BIT(sensor - motion_sensors));
task_set_event(TASK_ID_MOTIONSENSE,
- TASK_EVENT_MOTION_ODR_CHANGE, 0);
+ TASK_EVENT_MOTION_ODR_CHANGE);
}
out->sensor_odr.ret = sensor->drv->get_data_rate(sensor);
@@ -1277,7 +1277,7 @@ static enum ec_status host_cmd_motion_sense(struct host_cmd_handler_args *args)
atomic_add(&sensor->flush_pending, 1);
task_set_event(TASK_ID_MOTIONSENSE,
- TASK_EVENT_MOTION_FLUSH_PENDING, 0);
+ TASK_EVENT_MOTION_FLUSH_PENDING);
/* pass-through */
case MOTIONSENSE_CMD_FIFO_INFO:
if (!IS_ENABLED(CONFIG_ACCEL_FIFO)) {
@@ -1671,7 +1671,7 @@ static int command_accel_data_rate(int argc, char **argv)
atomic_or(&odr_event_required, 1 << (sensor - motion_sensors));
task_set_event(TASK_ID_MOTIONSENSE,
- TASK_EVENT_MOTION_ODR_CHANGE, 0);
+ TASK_EVENT_MOTION_ODR_CHANGE);
} else {
ccprintf("Data rate for sensor %d: %d\n", id,
sensor->drv->get_data_rate(sensor));
diff --git a/common/rwsig.c b/common/rwsig.c
index e23ca23293..4ed356f472 100644
--- a/common/rwsig.c
+++ b/common/rwsig.c
@@ -254,12 +254,12 @@ enum rwsig_status rwsig_get_status(void)
void rwsig_abort(void)
{
- task_set_event(TASK_ID_RWSIG, TASK_EVENT_ABORT, 0);
+ task_set_event(TASK_ID_RWSIG, TASK_EVENT_ABORT);
}
void rwsig_continue(void)
{
- task_set_event(TASK_ID_RWSIG, TASK_EVENT_CONTINUE, 0);
+ task_set_event(TASK_ID_RWSIG, TASK_EVENT_CONTINUE);
}
void rwsig_task(void *u)
diff --git a/common/timer.c b/common/timer.c
index 7b6cd0b5f5..d0386a9eca 100644
--- a/common/timer.c
+++ b/common/timer.c
@@ -43,7 +43,7 @@ static void expire_timer(task_id_t tskid)
/* we are done with this timer */
atomic_clear_bits(&timer_running, 1 << tskid);
/* wake up the taks waiting for this timer */
- task_set_event(tskid, TASK_EVENT_TIMER, 0);
+ task_set_event(tskid, TASK_EVENT_TIMER);
}
int timestamp_expired(timestamp_t deadline, const timestamp_t *now)
diff --git a/common/usb_charger.c b/common/usb_charger.c
index a8396b47bd..5b14608021 100644
--- a/common/usb_charger.c
+++ b/common/usb_charger.c
@@ -72,7 +72,7 @@ void usb_charger_vbus_change(int port, int vbus_level)
#ifdef HAS_TASK_USB_CHG_P0
/* USB Charger task(s) */
- task_set_event(USB_CHG_PORT_TO_TASK_ID(port), USB_CHG_EVENT_VBUS, 0);
+ task_set_event(USB_CHG_PORT_TO_TASK_ID(port), USB_CHG_EVENT_VBUS);
#endif
#if (defined(CONFIG_USB_PD_VBUS_DETECT_CHARGER) \
diff --git a/common/usb_common.c b/common/usb_common.c
index 1b068ba8af..3011189ca7 100644
--- a/common/usb_common.c
+++ b/common/usb_common.c
@@ -461,7 +461,7 @@ void usb_mux_set_safe_mode(int port)
static void pd_send_hard_reset(int port)
{
- task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_SEND_HARD_RESET, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_SEND_HARD_RESET);
}
#ifdef CONFIG_USBC_OCP
diff --git a/common/usb_pd_alt_mode_dfp.c b/common/usb_pd_alt_mode_dfp.c
index 1c1801ff75..b0347067ce 100644
--- a/common/usb_pd_alt_mode_dfp.c
+++ b/common/usb_pd_alt_mode_dfp.c
@@ -149,7 +149,7 @@ void pd_prepare_sysjump(void)
continue;
sysjump_task_waiting = task_get_current();
- task_set_event(PD_PORT_TO_TASK_ID(i), PD_EVENT_SYSJUMP, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(i), PD_EVENT_SYSJUMP);
task_wait_event_mask(TASK_EVENT_SYSJUMP_READY, -1);
sysjump_task_waiting = TASK_ID_INVALID;
}
@@ -653,8 +653,7 @@ void notify_sysjump_ready(void)
* task waiting on us to complete.
*/
if (sysjump_task_waiting != TASK_ID_INVALID)
- task_set_event(sysjump_task_waiting,
- TASK_EVENT_SYSJUMP_READY, 0);
+ task_set_event(sysjump_task_waiting, TASK_EVENT_SYSJUMP_READY);
}
static inline bool is_rev3_vdo(int port, enum tcpm_transmit_type type)
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c
index 8115d9d5a6..4fae35aedb 100644
--- a/common/usb_pd_protocol.c
+++ b/common/usb_pd_protocol.c
@@ -541,7 +541,7 @@ static int reset_device_and_notify(int port)
while (waiting_tasks) {
task = __fls(waiting_tasks);
waiting_tasks &= ~BIT(task);
- task_set_event(task, TASK_EVENT_PD_AWAKE, 0);
+ task_set_event(task, TASK_EVENT_PD_AWAKE);
}
return rv;
@@ -564,8 +564,7 @@ static void pd_wait_for_wakeup(int port)
* happen much, but it if starts occurring, we can add a guard
* to prevent/reduce it.
*/
- task_set_event(PD_PORT_TO_TASK_ID(port),
- PD_EVENT_TCPC_RESET, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_TCPC_RESET);
task_wait_event_mask(TASK_EVENT_PD_AWAKE, -1);
}
}
@@ -590,7 +589,7 @@ void pd_device_accessed(int port)
handle_device_access(port);
} else {
task_set_event(PD_PORT_TO_TASK_ID(port),
- PD_EVENT_DEVICE_ACCESSED, 0);
+ PD_EVENT_DEVICE_ACCESSED);
}
}
@@ -793,7 +792,7 @@ static inline void set_state(int port, enum pd_states next_state)
* down.
*/
task_set_event(USB_CHG_PORT_TO_TASK_ID(port),
- USB_CHG_EVENT_CC_OPEN, 0);
+ USB_CHG_EVENT_CC_OPEN);
#endif /* CONFIG_BC12_DETECT_DATA_ROLE_TRIGGER */
#ifdef CONFIG_USBC_VCONN
set_vconn(port, 0);
@@ -891,7 +890,7 @@ void pd_transmit_complete(int port, int status)
inc_id(port);
pd[port].tx_status = status;
- task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_TX, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_TX);
}
static int pd_transmit(int port, enum tcpm_transmit_type type,
@@ -1326,10 +1325,10 @@ static void pd_set_data_role(int port, enum pd_data_role role)
*/
if (role == PD_ROLE_UFP)
task_set_event(USB_CHG_PORT_TO_TASK_ID(port),
- USB_CHG_EVENT_DR_UFP, 0);
+ USB_CHG_EVENT_DR_UFP);
else if (role == PD_ROLE_DFP)
task_set_event(USB_CHG_PORT_TO_TASK_ID(port),
- USB_CHG_EVENT_DR_DFP, 0);
+ USB_CHG_EVENT_DR_DFP);
#endif /* CONFIG_BC12_DETECT_DATA_ROLE_TRIGGER */
}
@@ -2499,8 +2498,7 @@ void pd_set_dual_role(int port, enum pd_dual_role_states state)
pd_set_dual_role_no_wakeup(port, state);
/* Wake task up to process change */
- task_set_event(PD_PORT_TO_TASK_ID(port),
- PD_EVENT_UPDATE_DUAL_ROLE, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_UPDATE_DUAL_ROLE);
}
static int pd_is_power_swapping(int port)
@@ -2982,7 +2980,7 @@ void pd_task(void *u)
* can hear back from our port partner if maintaining our old
* connection.
*/
- task_set_event(task_get_current(), PD_EVENT_TCPC_RESET, 0);
+ task_set_event(task_get_current(), PD_EVENT_TCPC_RESET);
}
#endif /* defined(CONFIG_USB_PD_DUAL_ROLE) */
/* Set the power role if we haven't already. */
@@ -3180,7 +3178,7 @@ void pd_task(void *u)
/* Check if there are any more messages */
if (tcpm_has_pending_message(port))
task_set_event(PD_PORT_TO_TASK_ID(port),
- TASK_EVENT_WAKE, 0);
+ TASK_EVENT_WAKE);
}
if (pd[port].req_suspend_state)
@@ -4881,8 +4879,7 @@ static void pd_chipset_startup(void)
reset_pd_cable(i);
task_set_event(PD_PORT_TO_TASK_ID(i),
PD_EVENT_POWER_STATE_CHANGE |
- PD_EVENT_UPDATE_DUAL_ROLE,
- 0);
+ PD_EVENT_UPDATE_DUAL_ROLE);
}
CPRINTS("PD:S5->S3");
}
@@ -4896,8 +4893,7 @@ static void pd_chipset_shutdown(void)
pd_set_dual_role_no_wakeup(i, PD_DRP_FORCE_SINK);
task_set_event(PD_PORT_TO_TASK_ID(i),
PD_EVENT_POWER_STATE_CHANGE |
- PD_EVENT_UPDATE_DUAL_ROLE,
- 0);
+ PD_EVENT_UPDATE_DUAL_ROLE);
}
CPRINTS("PD:S3->S5");
}
diff --git a/common/usb_pd_tcpc.c b/common/usb_pd_tcpc.c
index 2878e53574..d8f1739532 100644
--- a/common/usb_pd_tcpc.c
+++ b/common/usb_pd_tcpc.c
@@ -962,7 +962,7 @@ void pd_task(void *u)
void pd_rx_event(int port)
{
- task_set_event(PD_PORT_TO_TASK_ID(port), TASK_EVENT_WAKE, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), TASK_EVENT_WAKE);
}
int tcpc_alert_status(int port, int *alert)
@@ -1041,7 +1041,7 @@ int tcpc_set_cc(int port, int pull)
#ifdef CONFIG_USB_POWER_DELIVERY
tcpc_run(port, PD_EVENT_CC);
#else
- task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_CC, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_CC);
#endif
return EC_SUCCESS;
}
@@ -1139,7 +1139,7 @@ int tcpc_transmit(int port, enum tcpm_transmit_type type, uint16_t header,
#ifdef CONFIG_USB_POWER_DELIVERY
tcpc_run(port, PD_EVENT_TX);
#else
- task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_TX, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_TX);
#endif
return EC_SUCCESS;
}
diff --git a/common/usbc/usb_prl_sm.c b/common/usbc/usb_prl_sm.c
index 1f6dd28560..577901a173 100644
--- a/common/usbc/usb_prl_sm.c
+++ b/common/usbc/usb_prl_sm.c
@@ -1485,7 +1485,7 @@ static void rch_requesting_chunk_entry(const int port)
pdmsg[port].data_objs = 1;
pdmsg[port].ext = 1;
PRL_TX_SET_FLAG(port, PRL_FLAGS_MSG_XMIT);
- task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_TX, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_TX);
}
static void rch_requesting_chunk_run(const int port)
diff --git a/common/usbc/usb_tc_drp_acc_trysrc_sm.c b/common/usbc/usb_tc_drp_acc_trysrc_sm.c
index c663f1ec77..fa146b3bfa 100644
--- a/common/usbc/usb_tc_drp_acc_trysrc_sm.c
+++ b/common/usbc/usb_tc_drp_acc_trysrc_sm.c
@@ -685,7 +685,7 @@ static inline void pd_set_dual_role_and_event(int port,
pd_update_try_source();
if (event != 0)
- task_set_event(PD_PORT_TO_TASK_ID(port), event, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), event);
}
void pd_set_dual_role(int port, enum pd_dual_role_states state)
@@ -1160,7 +1160,7 @@ static void bc12_role_change_handler(int port, enum pd_data_role prev_data_role,
}
if (event)
- task_set_event(task_id, event, 0);
+ task_set_event(task_id, event);
}
/*
@@ -1818,7 +1818,7 @@ static __maybe_unused int reset_device_and_notify(int port)
while (waiting_tasks) {
task = __fls(waiting_tasks);
waiting_tasks &= ~BIT(task);
- task_set_event(task, TASK_EVENT_PD_AWAKE, 0);
+ task_set_event(task, TASK_EVENT_PD_AWAKE);
}
return rv;
@@ -1845,8 +1845,7 @@ void pd_wait_exit_low_power(int port)
* happen much, but it if starts occurring, we can add a guard
* to prevent/reduce it.
*/
- task_set_event(PD_PORT_TO_TASK_ID(port),
- PD_EVENT_TCPC_RESET, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_TCPC_RESET);
task_wait_event_mask(TASK_EVENT_PD_AWAKE, -1);
}
}
@@ -1861,7 +1860,7 @@ void pd_device_accessed(int port)
handle_device_access(port);
else
task_set_event(PD_PORT_TO_TASK_ID(port),
- PD_EVENT_DEVICE_ACCESSED, 0);
+ PD_EVENT_DEVICE_ACCESSED);
}
/*
diff --git a/common/usbc/usbc_task.c b/common/usbc/usbc_task.c
index 624c55a651..af9e7986bd 100644
--- a/common/usbc/usbc_task.c
+++ b/common/usbc/usbc_task.c
@@ -52,7 +52,7 @@ void tc_start_event_loop(int port)
*/
if (paused[port]) {
paused[port] = 0;
- task_set_event(PD_PORT_TO_TASK_ID(port), TASK_EVENT_WAKE, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), TASK_EVENT_WAKE);
}
}
diff --git a/common/usbc_intr_task.c b/common/usbc_intr_task.c
index ae9bc1233e..cb59882d7a 100644
--- a/common/usbc_intr_task.c
+++ b/common/usbc_intr_task.c
@@ -35,7 +35,7 @@ void schedule_deferred_pd_interrupt(const int port)
* that doesn't have pd int task is 0.
*/
if (pd_int_task_id[port] != 0)
- task_set_event(pd_int_task_id[port], PD_PROCESS_INTERRUPT, 0);
+ task_set_event(pd_int_task_id[port], PD_PROCESS_INTERRUPT);
}
/*
diff --git a/core/cortex-m/task.c b/core/cortex-m/task.c
index 8cecafffa3..b88baf4511 100644
--- a/core/cortex-m/task.c
+++ b/core/cortex-m/task.c
@@ -426,7 +426,7 @@ static uint32_t __wait_evt(int timeout_us, task_id_t resched)
return evt;
}
-uint32_t task_set_event(task_id_t tskid, uint32_t event, int wait)
+uint32_t task_set_event(task_id_t tskid, uint32_t event)
{
task_ *receiver = __task_id_to_ptr(tskid);
ASSERT(receiver);
@@ -443,10 +443,7 @@ uint32_t task_set_event(task_id_t tskid, uint32_t event, int wait)
need_resched_or_profiling = 1;
#endif
} else {
- if (wait)
- return __wait_evt(-1, tskid);
- else
- __schedule(0, tskid);
+ __schedule(0, tskid);
}
return 0;
@@ -765,8 +762,7 @@ int task_reset_cleanup(void)
*/
if (notify_id < TASK_ID_COUNT)
task_set_event(notify_id,
- TASK_EVENT_RESET_DONE,
- 0);
+ TASK_EVENT_RESET_DONE);
}
}
@@ -917,7 +913,7 @@ void mutex_unlock(struct mutex *mtx)
waiters &= ~BIT(id);
/* Somebody is waiting on the mutex */
- task_set_event(id, TASK_EVENT_MUTEX, 0);
+ task_set_event(id, TASK_EVENT_MUTEX);
}
/* Ensure no event is remaining from mutex wake-up */
diff --git a/core/cortex-m0/task.c b/core/cortex-m0/task.c
index 67da26008e..16922e10eb 100644
--- a/core/cortex-m0/task.c
+++ b/core/cortex-m0/task.c
@@ -354,7 +354,7 @@ static uint32_t __wait_evt(int timeout_us, task_id_t resched)
return evt;
}
-uint32_t task_set_event(task_id_t tskid, uint32_t event, int wait)
+uint32_t task_set_event(task_id_t tskid, uint32_t event)
{
task_ *receiver = __task_id_to_ptr(tskid);
ASSERT(receiver);
@@ -374,19 +374,15 @@ uint32_t task_set_event(task_id_t tskid, uint32_t event, int wait)
CPU_SCB_ICSR = BIT(28);
}
} else {
- if (wait) {
- return __wait_evt(-1, tskid);
- } else {
- /*
- * We need to ensure that the execution priority is
- * actually decreased after the "cpsie i" in the atomic
- * operation above else the "svc" in the __schedule
- * call below will trigger a HardFault.
- * Use a barrier to force it at that point.
- */
- asm volatile("isb");
- __schedule(0, tskid);
- }
+ /*
+ * We need to ensure that the execution priority is
+ * actually decreased after the "cpsie i" in the atomic
+ * operation above else the "svc" in the __schedule
+ * call below will trigger a HardFault.
+ * Use a barrier to force it at that point.
+ */
+ asm volatile("isb");
+ __schedule(0, tskid);
}
return 0;
@@ -535,7 +531,7 @@ void mutex_unlock(struct mutex *mtx)
waiters &= ~BIT(id);
/* Somebody is waiting on the mutex */
- task_set_event(id, TASK_EVENT_MUTEX, 0);
+ task_set_event(id, TASK_EVENT_MUTEX);
}
/* Ensure no event is remaining from mutex wake-up */
diff --git a/core/host/task.c b/core/host/task.c
index d6227384e1..36cb3467c0 100644
--- a/core/host/task.c
+++ b/core/host/task.c
@@ -198,11 +198,9 @@ pthread_t task_get_thread(task_id_t tskid)
return tasks[tskid].thread;
}
-uint32_t task_set_event(task_id_t tskid, uint32_t event, int wait)
+uint32_t task_set_event(task_id_t tskid, uint32_t event)
{
atomic_or(&tasks[tskid].event, event);
- if (wait)
- return task_wait_event(-1);
return 0;
}
@@ -286,7 +284,7 @@ void mutex_unlock(struct mutex *mtx)
for (v = 31; v >= 0; --v)
if ((1ul << v) & mtx->waiters) {
mtx->waiters &= ~(1ul << v);
- task_set_event(v, TASK_EVENT_MUTEX, 0);
+ task_set_event(v, TASK_EVENT_MUTEX);
break;
}
}
diff --git a/core/minute-ia/task.c b/core/minute-ia/task.c
index 6d5be5f92d..0cdc8a41e5 100644
--- a/core/minute-ia/task.c
+++ b/core/minute-ia/task.c
@@ -331,7 +331,7 @@ static uint32_t __wait_evt(int timeout_us, task_id_t resched)
return evt;
}
-uint32_t task_set_event(task_id_t tskid, uint32_t event, int wait)
+uint32_t task_set_event(task_id_t tskid, uint32_t event)
{
task_ *receiver = __task_id_to_ptr(tskid);
@@ -352,10 +352,7 @@ uint32_t task_set_event(task_id_t tskid, uint32_t event, int wait)
/* The receiver might run again */
atomic_or(&tasks_ready, 1 << tskid);
} else {
- if (wait)
- return __wait_evt(-1, tskid);
- else
- __schedule(0, tskid);
+ __schedule(0, tskid);
}
return 0;
@@ -493,7 +490,7 @@ void mutex_unlock(struct mutex *mtx)
waiters &= ~BIT(id);
/* Somebody is waiting on the mutex */
- task_set_event(id, TASK_EVENT_MUTEX, 0);
+ task_set_event(id, TASK_EVENT_MUTEX);
}
/* Ensure no event is remaining from mutex wake-up */
diff --git a/core/nds32/task.c b/core/nds32/task.c
index f4446bdacb..9969db34bc 100644
--- a/core/nds32/task.c
+++ b/core/nds32/task.c
@@ -417,7 +417,7 @@ static uint32_t __ram_code __wait_evt(int timeout_us, task_id_t resched)
return evt;
}
-uint32_t __ram_code task_set_event(task_id_t tskid, uint32_t event, int wait)
+uint32_t __ram_code task_set_event(task_id_t tskid, uint32_t event)
{
task_ *receiver = __task_id_to_ptr(tskid);
ASSERT(receiver);
@@ -432,10 +432,7 @@ uint32_t __ram_code task_set_event(task_id_t tskid, uint32_t event, int wait)
if (start_called)
need_resched = 1;
} else {
- if (wait)
- return __wait_evt(-1, tskid);
- else
- __schedule(0, tskid, 0);
+ __schedule(0, tskid, 0);
}
return 0;
@@ -649,7 +646,7 @@ void __ram_code mutex_unlock(struct mutex *mtx)
waiters &= ~BIT(id);
/* Somebody is waiting on the mutex */
- task_set_event(id, TASK_EVENT_MUTEX, 0);
+ task_set_event(id, TASK_EVENT_MUTEX);
}
/* Ensure no event is remaining from mutex wake-up */
diff --git a/core/riscv-rv32i/task.c b/core/riscv-rv32i/task.c
index e39e854a3e..eef46efce7 100644
--- a/core/riscv-rv32i/task.c
+++ b/core/riscv-rv32i/task.c
@@ -410,7 +410,19 @@ static uint32_t __ram_code __wait_evt(int timeout_us, task_id_t resched)
return evt;
}
-uint32_t __ram_code task_set_event(task_id_t tskid, uint32_t event, int wait)
+/* TODO: Remove the remove_me function.
+ * At the moment "make BOARD=it8xxx2_evb" returns an error
+ * "relocation truncated to fit" without it.
+ */
+uint32_t __ram_code remove_me(task_id_t tskid)
+{
+ task_ *receiver = __task_id_to_ptr(tskid);
+
+ ASSERT(receiver);
+ return 0;
+}
+
+uint32_t __ram_code task_set_event(task_id_t tskid, uint32_t event)
{
task_ *receiver = __task_id_to_ptr(tskid);
@@ -426,10 +438,7 @@ uint32_t __ram_code task_set_event(task_id_t tskid, uint32_t event, int wait)
if (start_called)
need_resched = 1;
} else {
- if (wait)
- return __wait_evt(-1, tskid);
- else
- __schedule(0, tskid, 0);
+ __schedule(0, tskid, 0);
}
return 0;
@@ -594,7 +603,7 @@ void __ram_code mutex_unlock(struct mutex *mtx)
waiters &= ~BIT(id);
/* Somebody is waiting on the mutex */
- task_set_event(id, TASK_EVENT_MUTEX, 0);
+ task_set_event(id, TASK_EVENT_MUTEX);
}
/* Ensure no event is remaining from mutex wake-up */
diff --git a/cts/mutex/dut.c b/cts/mutex/dut.c
index 4fcea73fdf..9cbbd8badb 100644
--- a/cts/mutex/dut.c
+++ b/cts/mutex/dut.c
@@ -82,7 +82,8 @@ static enum cts_rc lock_unlock_test(void)
/* --- Serialization to test simple contention --- */
ccprintf("Simple contention :\n");
/* lock the mutex from the other task */
- task_set_event(TASK_ID_MTX2, TASK_EVENT_WAKE, 1);
+ task_set_event(TASK_ID_MTX2, TASK_EVENT_WAKE);
+ task_wait_event(0);
/* block on the mutex */
ccprintf("MTX1: blocking...\n");
mutex_lock(&mtx);
diff --git a/cts/mutex/th.c b/cts/mutex/th.c
index 4fcea73fdf..9cbbd8badb 100644
--- a/cts/mutex/th.c
+++ b/cts/mutex/th.c
@@ -82,7 +82,8 @@ static enum cts_rc lock_unlock_test(void)
/* --- Serialization to test simple contention --- */
ccprintf("Simple contention :\n");
/* lock the mutex from the other task */
- task_set_event(TASK_ID_MTX2, TASK_EVENT_WAKE, 1);
+ task_set_event(TASK_ID_MTX2, TASK_EVENT_WAKE);
+ task_wait_event(0);
/* block on the mutex */
ccprintf("MTX1: blocking...\n");
mutex_lock(&mtx);
diff --git a/cts/task/dut.c b/cts/task/dut.c
index 7297b7de96..feb25f3f2c 100644
--- a/cts/task/dut.c
+++ b/cts/task/dut.c
@@ -34,10 +34,13 @@ void task_abc(void *data)
while (1) {
wake_count[id]++;
- if (id == 2 && wake_count[id] == repeat_count)
- task_set_event(TASK_ID_CTS, TASK_EVENT_WAKE, 1);
- else
- task_set_event(next, TASK_EVENT_WAKE, 1);
+ if (id == 2 && wake_count[id] == repeat_count) {
+ task_set_event(TASK_ID_CTS, TASK_EVENT_WAKE);
+ task_wait_event(-1);
+ } else {
+ task_set_event(next, TASK_EVENT_WAKE);
+ task_wait_event(-1);
+ }
}
}
diff --git a/driver/accel_lis2ds.c b/driver/accel_lis2ds.c
index 0b57f27f21..93272262ad 100644
--- a/driver/accel_lis2ds.c
+++ b/driver/accel_lis2ds.c
@@ -128,8 +128,7 @@ void lis2ds_interrupt(enum gpio_signal signal)
if (IS_ENABLED(CONFIG_ACCEL_FIFO))
last_interrupt_timestamp = __hw_clock_source_read();
- task_set_event(TASK_ID_MOTIONSENSE,
- CONFIG_ACCEL_LIS2DS_INT_EVENT, 0);
+ task_set_event(TASK_ID_MOTIONSENSE, CONFIG_ACCEL_LIS2DS_INT_EVENT);
}
/**
diff --git a/driver/accel_lis2dw12.c b/driver/accel_lis2dw12.c
index dbc3dcac03..270c2d0eed 100644
--- a/driver/accel_lis2dw12.c
+++ b/driver/accel_lis2dw12.c
@@ -200,8 +200,7 @@ static void lis2dw12_handle_interrupt_for_fifo(uint32_t ts)
time_after(ts, last_interrupt_timestamp))
last_interrupt_timestamp = ts;
- task_set_event(TASK_ID_MOTIONSENSE,
- CONFIG_ACCEL_LIS2DW12_INT_EVENT, 0);
+ task_set_event(TASK_ID_MOTIONSENSE, CONFIG_ACCEL_LIS2DW12_INT_EVENT);
}
/**
diff --git a/driver/accelgyro_bmi160.c b/driver/accelgyro_bmi160.c
index bd32fe6d59..70059dc1d7 100644
--- a/driver/accelgyro_bmi160.c
+++ b/driver/accelgyro_bmi160.c
@@ -513,8 +513,7 @@ void bmi160_interrupt(enum gpio_signal signal)
if (IS_ENABLED(CONFIG_ACCEL_FIFO))
last_interrupt_timestamp = __hw_clock_source_read();
- task_set_event(TASK_ID_MOTIONSENSE,
- CONFIG_ACCELGYRO_BMI160_INT_EVENT, 0);
+ task_set_event(TASK_ID_MOTIONSENSE, CONFIG_ACCELGYRO_BMI160_INT_EVENT);
}
/**
@@ -700,7 +699,7 @@ static int init(struct motion_sensor_t *s)
* BMI160 was in management mode.
*/
task_set_event(TASK_ID_MOTIONSENSE,
- CONFIG_ACCELGYRO_BMI160_INT_EVENT, 0);
+ CONFIG_ACCELGYRO_BMI160_INT_EVENT);
}
#endif
diff --git a/driver/accelgyro_bmi260.c b/driver/accelgyro_bmi260.c
index 1be15b21c7..f0c9f3e9db 100644
--- a/driver/accelgyro_bmi260.c
+++ b/driver/accelgyro_bmi260.c
@@ -270,8 +270,7 @@ void bmi260_interrupt(enum gpio_signal signal)
if (IS_ENABLED(CONFIG_ACCEL_FIFO))
last_interrupt_timestamp = __hw_clock_source_read();
- task_set_event(TASK_ID_MOTIONSENSE,
- CONFIG_ACCELGYRO_BMI260_INT_EVENT, 0);
+ task_set_event(TASK_ID_MOTIONSENSE, CONFIG_ACCELGYRO_BMI260_INT_EVENT);
}
static int config_interrupt(const struct motion_sensor_t *s)
diff --git a/driver/accelgyro_icm426xx.c b/driver/accelgyro_icm426xx.c
index 0bea3de575..5c2a0aaf17 100644
--- a/driver/accelgyro_icm426xx.c
+++ b/driver/accelgyro_icm426xx.c
@@ -241,7 +241,7 @@ void icm426xx_interrupt(enum gpio_signal signal)
last_interrupt_timestamp = __hw_clock_source_read();
task_set_event(TASK_ID_MOTIONSENSE,
- CONFIG_ACCELGYRO_ICM426XX_INT_EVENT, 0);
+ CONFIG_ACCELGYRO_ICM426XX_INT_EVENT);
}
/**
diff --git a/driver/accelgyro_lsm6dsm.c b/driver/accelgyro_lsm6dsm.c
index 1a1308c3f5..457c664095 100644
--- a/driver/accelgyro_lsm6dsm.c
+++ b/driver/accelgyro_lsm6dsm.c
@@ -450,8 +450,7 @@ static void handle_interrupt_for_fifo(uint32_t ts)
if (IS_ENABLED(CONFIG_ACCEL_FIFO) &&
time_after(ts, last_interrupt_timestamp))
last_interrupt_timestamp = ts;
- task_set_event(TASK_ID_MOTIONSENSE,
- CONFIG_ACCEL_LSM6DSM_INT_EVENT, 0);
+ task_set_event(TASK_ID_MOTIONSENSE, CONFIG_ACCEL_LSM6DSM_INT_EVENT);
}
/**
diff --git a/driver/accelgyro_lsm6dso.c b/driver/accelgyro_lsm6dso.c
index 64f7cad7c9..12636d1782 100644
--- a/driver/accelgyro_lsm6dso.c
+++ b/driver/accelgyro_lsm6dso.c
@@ -226,8 +226,7 @@ void lsm6dso_interrupt(enum gpio_signal signal)
if (IS_ENABLED(CONFIG_ACCEL_FIFO))
last_interrupt_timestamp = __hw_clock_source_read();
- task_set_event(TASK_ID_MOTIONSENSE,
- CONFIG_ACCEL_LSM6DSO_INT_EVENT, 0);
+ task_set_event(TASK_ID_MOTIONSENSE, CONFIG_ACCEL_LSM6DSO_INT_EVENT);
}
/**
diff --git a/driver/als_si114x.c b/driver/als_si114x.c
index 98b6c02dd5..be6bad9c33 100644
--- a/driver/als_si114x.c
+++ b/driver/als_si114x.c
@@ -167,16 +167,13 @@ static int si114x_read_results(struct motion_sensor_t *s, int nb)
void si114x_interrupt(enum gpio_signal signal)
{
- task_set_event(TASK_ID_MOTIONSENSE,
- CONFIG_ALS_SI114X_INT_EVENT, 0);
+ task_set_event(TASK_ID_MOTIONSENSE, CONFIG_ALS_SI114X_INT_EVENT);
}
#ifdef CONFIG_ALS_SI114X_POLLING
static void si114x_read_deferred(void)
{
- task_set_event(TASK_ID_MOTIONSENSE,
- CONFIG_ALS_SI114X_INT_EVENT, 0);
-
+ task_set_event(TASK_ID_MOTIONSENSE, CONFIG_ALS_SI114X_INT_EVENT);
}
DECLARE_DEFERRED(si114x_read_deferred);
#endif
diff --git a/driver/als_tcs3400.c b/driver/als_tcs3400.c
index b047cf5057..2639e9c7bd 100644
--- a/driver/als_tcs3400.c
+++ b/driver/als_tcs3400.c
@@ -79,7 +79,7 @@ static inline int tcs3400_i2c_write8(const struct motion_sensor_t *s,
static void tcs3400_read_deferred(void)
{
- task_set_event(TASK_ID_MOTIONSENSE, CONFIG_ALS_TCS3400_INT_EVENT, 0);
+ task_set_event(TASK_ID_MOTIONSENSE, CONFIG_ALS_TCS3400_INT_EVENT);
}
DECLARE_DEFERRED(tcs3400_read_deferred);
@@ -491,8 +491,7 @@ void tcs3400_interrupt(enum gpio_signal signal)
if (IS_ENABLED(CONFIG_ACCEL_FIFO))
last_interrupt_timestamp = __hw_clock_source_read();
- task_set_event(TASK_ID_MOTIONSENSE,
- CONFIG_ALS_TCS3400_INT_EVENT, 0);
+ task_set_event(TASK_ID_MOTIONSENSE, CONFIG_ALS_TCS3400_INT_EVENT);
}
/*
diff --git a/driver/bc12/max14637.c b/driver/bc12/max14637.c
index c7101b00ef..193e70ecb6 100644
--- a/driver/bc12/max14637.c
+++ b/driver/bc12/max14637.c
@@ -208,7 +208,7 @@ static void bc12_chipset_startup(void)
*/
for (port = 0; port < CONFIG_USB_PD_PORT_MAX_COUNT; port++)
task_set_event(USB_CHG_PORT_TO_TASK_ID(port),
- USB_CHG_EVENT_VBUS, 0);
+ USB_CHG_EVENT_VBUS);
}
DECLARE_HOOK(HOOK_CHIPSET_STARTUP, bc12_chipset_startup, HOOK_PRIO_DEFAULT);
DECLARE_HOOK(HOOK_CHIPSET_RESUME, bc12_chipset_startup, HOOK_PRIO_DEFAULT);
diff --git a/driver/bc12/pi3usb9281.c b/driver/bc12/pi3usb9281.c
index 56ad5bf602..9fc32e942b 100644
--- a/driver/bc12/pi3usb9281.c
+++ b/driver/bc12/pi3usb9281.c
@@ -287,7 +287,7 @@ static void pi3usb9281_set_switches(int port, enum usb_switch setting)
if (setting != USB_SWITCH_RESTORE)
usb_switch_state[port] = setting;
CPRINTS("USB MUX %d", usb_switch_state[port]);
- task_set_event(TASK_ID_USB_CHG_P0 + port, USB_CHG_EVENT_MUX, 0);
+ task_set_event(TASK_ID_USB_CHG_P0 + port, USB_CHG_EVENT_MUX);
}
static int pc3usb9281_read_interrupt(int port)
diff --git a/driver/sync.c b/driver/sync.c
index 2d412355fb..0a93ab8f9f 100644
--- a/driver/sync.c
+++ b/driver/sync.c
@@ -76,7 +76,7 @@ void sync_interrupt(enum gpio_signal signal)
next_event.counter++;
queue_add_unit(&sync_event_queue, &next_event);
- task_set_event(TASK_ID_MOTIONSENSE, CONFIG_SYNC_INT_EVENT, 0);
+ task_set_event(TASK_ID_MOTIONSENSE, CONFIG_SYNC_INT_EVENT);
}
/* Bottom half of the irq handler */
diff --git a/driver/tcpm/anx74xx.c b/driver/tcpm/anx74xx.c
index 4ca30f8eca..cdf145cc37 100644
--- a/driver/tcpm/anx74xx.c
+++ b/driver/tcpm/anx74xx.c
@@ -1011,7 +1011,7 @@ void anx74xx_tcpc_alert(int port)
if (reg & ANX74XX_REG_IRQ_CC_STATUS_INT)
/* CC status changed, wake task */
- task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_CC, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_CC);
/* Read and clear extended alert register 1 */
reg = 0;
@@ -1043,7 +1043,7 @@ void anx74xx_tcpc_alert(int port)
if (reg & ANX74XX_REG_EXT_HARD_RST) {
/* hard reset received */
task_set_event(PD_PORT_TO_TASK_ID(port),
- PD_EVENT_RX_HARD_RESET, 0);
+ PD_EVENT_RX_HARD_RESET);
}
}
diff --git a/driver/tcpm/fusb302.c b/driver/tcpm/fusb302.c
index 18ad09522f..17f71c615b 100644
--- a/driver/tcpm/fusb302.c
+++ b/driver/tcpm/fusb302.c
@@ -975,7 +975,7 @@ void fusb302_tcpc_alert(int port)
if (interrupt & TCPC_REG_INTERRUPT_BC_LVL) {
/* CC Status change */
- task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_CC, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_CC);
}
if (interrupt & TCPC_REG_INTERRUPT_COLLISION) {
@@ -1024,7 +1024,7 @@ void fusb302_tcpc_alert(int port)
/* bring FUSB302 out of reset */
fusb302_pd_reset(port);
task_set_event(PD_PORT_TO_TASK_ID(port),
- PD_EVENT_RX_HARD_RESET, 0);
+ PD_EVENT_RX_HARD_RESET);
}
if (interruptb & TCPC_REG_INTERRUPTB_GCRCSENT) {
diff --git a/driver/tcpm/stub.c b/driver/tcpm/stub.c
index 75a9c9ced6..c407e099fb 100644
--- a/driver/tcpm/stub.c
+++ b/driver/tcpm/stub.c
@@ -136,7 +136,7 @@ void tcpc_alert(int port)
if (status & TCPC_REG_ALERT_CC_STATUS) {
/* CC status changed, wake task */
- task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_CC, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_CC);
}
if (status & TCPC_REG_ALERT_RX_STATUS) {
/*
@@ -148,7 +148,7 @@ void tcpc_alert(int port)
if (status & TCPC_REG_ALERT_RX_HARD_RST) {
/* hard reset received */
task_set_event(PD_PORT_TO_TASK_ID(port),
- PD_EVENT_RX_HARD_RESET, 0);
+ PD_EVENT_RX_HARD_RESET);
}
if (status & TCPC_REG_ALERT_TX_COMPLETE) {
/* transmit complete */
diff --git a/driver/tcpm/tcpci.c b/driver/tcpm/tcpci.c
index 5fb54b1beb..c667f4b896 100644
--- a/driver/tcpm/tcpci.c
+++ b/driver/tcpm/tcpci.c
@@ -891,7 +891,7 @@ int tcpm_enqueue_message(const int port)
atomic_add(&q->head, 1);
/* Wake PD task up so it can process incoming RX messages */
- task_set_event(PD_PORT_TO_TASK_ID(port), TASK_EVENT_WAKE, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), TASK_EVENT_WAKE);
return EC_SUCCESS;
}
@@ -1262,7 +1262,7 @@ void tcpci_tcpc_alert(int port)
* the next I2C transaction to the TCPC will cause it to wake again.
*/
if (pd_event)
- task_set_event(PD_PORT_TO_TASK_ID(port), pd_event, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), pd_event);
}
/*
diff --git a/driver/touchpad_elan.c b/driver/touchpad_elan.c
index 0882f03874..d2e28d53a6 100644
--- a/driver/touchpad_elan.c
+++ b/driver/touchpad_elan.c
@@ -833,7 +833,7 @@ void touchpad_task(void *u)
#if defined(CONFIG_USB_SUSPEND) || defined(CONFIG_TABLET_MODE)
static void touchpad_power_change(void)
{
- task_set_event(TASK_ID_TOUCHPAD, TASK_EVENT_POWER, 0);
+ task_set_event(TASK_ID_TOUCHPAD, TASK_EVENT_POWER);
}
#endif
#ifdef CONFIG_USB_SUSPEND
diff --git a/driver/touchpad_st.c b/driver/touchpad_st.c
index a77ee2590f..56633bad16 100644
--- a/driver/touchpad_st.c
+++ b/driver/touchpad_st.c
@@ -1223,7 +1223,7 @@ int touchpad_update_write(int offset, int size, const uint8_t *data)
CPRINTS("%s: End update, wait for reset.", __func__);
ret = st_tp_panel_init(full_init_required);
- task_set_event(TASK_ID_TOUCHPAD, TASK_EVENT_TP_UPDATED, 0);
+ task_set_event(TASK_ID_TOUCHPAD, TASK_EVENT_TP_UPDATED);
return ret;
}
@@ -1509,7 +1509,7 @@ void touchpad_task(void *u)
#if defined(CONFIG_USB_SUSPEND) || defined(CONFIG_TABLET_MODE)
static void touchpad_power_change(void)
{
- task_set_event(TASK_ID_TOUCHPAD, TASK_EVENT_POWER, 0);
+ task_set_event(TASK_ID_TOUCHPAD, TASK_EVENT_POWER);
}
#endif
#ifdef CONFIG_USB_SUSPEND
diff --git a/extra/lightbar/main.c b/extra/lightbar/main.c
index 7ef3d07c9e..5acf3d427a 100644
--- a/extra/lightbar/main.c
+++ b/extra/lightbar/main.c
@@ -95,9 +95,8 @@ uint32_t task_wait_event(int timeout_us)
return event;
}
-uint32_t task_set_event(task_id_t tskid, /* always LIGHTBAR */
- uint32_t event,
- int wait_for_reply) /* always 0 */
+uint32_t task_set_event(task_id_t tskid, /* always LIGHTBAR */
+ uint32_t event)
{
pthread_mutex_lock(&task_mutex);
task_event = event;
diff --git a/extra/lightbar/simulation.h b/extra/lightbar/simulation.h
index eb878ed04e..4df7b69411 100644
--- a/extra/lightbar/simulation.h
+++ b/extra/lightbar/simulation.h
@@ -97,7 +97,7 @@ struct host_cmd_handler_args {
/* EC functions that we have to provide */
uint32_t task_wait_event(int timeout_us);
-uint32_t task_set_event(task_id_t tskid, uint32_t event, int wait_for_reply);
+uint32_t task_set_event(task_id_t tskid, uint32_t event);
timestamp_t get_time(void);
int system_add_jump_tag(uint16_t tag, int version, int size, const void *data);
uint8_t *system_get_jump_tag(uint16_t tag, int *version, int *size);
diff --git a/fuzz/host_command_fuzz.c b/fuzz/host_command_fuzz.c
index c4f49c9525..4ca94ff616 100644
--- a/fuzz/host_command_fuzz.c
+++ b/fuzz/host_command_fuzz.c
@@ -34,7 +34,7 @@ static struct ec_host_request *req = (struct ec_host_request *)req_buf;
static void hostcmd_respond(struct host_packet *pkt)
{
- task_set_event(TASK_ID_TEST_RUNNER, TASK_EVENT_HOSTCMD_DONE, 0);
+ task_set_event(TASK_ID_TEST_RUNNER, TASK_EVENT_HOSTCMD_DONE);
}
static char calculate_checksum(const char *buf, int size)
@@ -151,7 +151,7 @@ int test_fuzz_one_input(const uint8_t *data, unsigned int size)
if (hostcmd_fill(data, size) < 0)
return 0;
- task_set_event(TASK_ID_TEST_RUNNER, TASK_EVENT_FUZZ, 0);
+ task_set_event(TASK_ID_TEST_RUNNER, TASK_EVENT_FUZZ);
pthread_cond_wait(&done_cond, &lock);
#ifdef VALID_REQUEST_ONLY
diff --git a/fuzz/usb_pd_fuzz.c b/fuzz/usb_pd_fuzz.c
index 54b138e03c..777a86d592 100644
--- a/fuzz/usb_pd_fuzz.c
+++ b/fuzz/usb_pd_fuzz.c
@@ -114,7 +114,7 @@ int tcpm_enqueue_message(const int port)
pending = 1;
/* Wake PD task up so it can process incoming RX messages */
- task_set_event(PD_PORT_TO_TASK_ID(port), TASK_EVENT_WAKE, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), TASK_EVENT_WAKE);
return EC_SUCCESS;
}
@@ -175,14 +175,13 @@ void run_test(int argc, char **argv)
memset(&mock_tcpc_state[port],
0, sizeof(mock_tcpc_state[port]));
- task_set_event(PD_PORT_TO_TASK_ID(port),
- PD_EVENT_TCPC_RESET, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_TCPC_RESET);
task_wait_event(250 * MSEC);
mock_tcpc_state[port].cc1 = next_cc1;
mock_tcpc_state[port].cc2 = next_cc2;
- task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_CC, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_CC);
task_wait_event(50 * MSEC);
/* Fake RX messages, one by one. */
@@ -234,7 +233,7 @@ int test_fuzz_one_input(const uint8_t *data, unsigned int size)
return 0;
}
- task_set_event(TASK_ID_TEST_RUNNER, TASK_EVENT_FUZZ, 0);
+ task_set_event(TASK_ID_TEST_RUNNER, TASK_EVENT_FUZZ);
pthread_cond_wait(&done_cond, &lock);
return 0;
diff --git a/include/task.h b/include/task.h
index 680c753c62..bf1ee39dc8 100644
--- a/include/task.h
+++ b/include/task.h
@@ -147,7 +147,7 @@ void set_int_mask(uint32_t val);
* interrupt context.
* @return The bitmap of events which occurred if wait!=0, else 0.
*/
-uint32_t task_set_event(task_id_t tskid, uint32_t event, int wait);
+uint32_t task_set_event(task_id_t tskid, uint32_t event);
/**
* Wake a task. This sends it the TASK_EVENT_WAKE event.
@@ -156,7 +156,7 @@ uint32_t task_set_event(task_id_t tskid, uint32_t event, int wait);
*/
static inline void task_wake(task_id_t tskid)
{
- task_set_event(tskid, TASK_EVENT_WAKE, 0);
+ task_set_event(tskid, TASK_EVENT_WAKE);
}
/**
diff --git a/test/charge_ramp.c b/test/charge_ramp.c
index acffdadbf8..84cac57b8e 100644
--- a/test/charge_ramp.c
+++ b/test/charge_ramp.c
@@ -78,7 +78,7 @@ void board_set_charge_limit(int port, int supplier, int limit_ma,
{
charge_limit_ma = limit_ma;
if (charge_limit_ma > overcurrent_current_ma)
- task_set_event(TASK_ID_TEST_RUNNER, TASK_EVENT_OVERCURRENT, 0);
+ task_set_event(TASK_ID_TEST_RUNNER, TASK_EVENT_OVERCURRENT);
}
/* Test utilities */
diff --git a/test/mutex.c b/test/mutex.c
index d5e7e09c51..4fbf7d5cae 100644
--- a/test/mutex.c
+++ b/test/mutex.c
@@ -83,7 +83,8 @@ int mutex_main_task(void *unused)
/* --- Serialization to test simple contention --- */
ccprintf("Simple contention :\n");
/* lock the mutex from the other task */
- task_set_event(TASK_ID_MTX2, TASK_EVENT_WAKE, 1);
+ task_set_event(TASK_ID_MTX2, TASK_EVENT_WAKE);
+ task_wait_event(0);
/* block on the mutex */
ccprintf("MTX1: blocking...\n");
mutex_lock(&mtx);
diff --git a/test/pingpong.c b/test/pingpong.c
index f3ff89341f..9d3a7ed7af 100644
--- a/test/pingpong.c
+++ b/test/pingpong.c
@@ -38,7 +38,8 @@ int task_abc(void *data)
wake_count[0] = wake_count[1] = wake_count[2] = 0;
task_wait_event(-1);
} else {
- task_set_event(next, TASK_EVENT_WAKE, 1);
+ task_set_event(next, TASK_EVENT_WAKE);
+ task_wait_event(-1);
}
}
diff --git a/test/usb_pd.c b/test/usb_pd.c
index f572b5bb21..9fdb439b49 100644
--- a/test/usb_pd.c
+++ b/test/usb_pd.c
@@ -272,7 +272,7 @@ static void plug_in_source(int port, int polarity)
pd_port[port].partner_role = PD_ROLE_SOURCE;
pd_port[port].partner_polarity = polarity;
/* Indicate that the CC lines have changed. */
- task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_CC, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_CC);
}
static void plug_in_sink(int port, int polarity)
@@ -281,7 +281,7 @@ static void plug_in_sink(int port, int polarity)
pd_port[port].partner_role = PD_ROLE_SINK;
pd_port[port].partner_polarity = polarity;
/* Indicate that the CC lines have changed. */
- task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_CC, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_CC);
}
static void unplug(int port)
@@ -291,7 +291,7 @@ static void unplug(int port)
pd_port[port].has_vbus = 0;
pd_port[port].partner_role = -1;
/* Indicate that the CC lines have changed. */
- task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_CC, 0);
+ task_set_event(PD_PORT_TO_TASK_ID(port), PD_EVENT_CC);
task_wake(PD_PORT_TO_TASK_ID(port));
usleep(30 * MSEC);
}
diff --git a/test/usb_pe_drp.c b/test/usb_pe_drp.c
index 9f2b8b267d..be040dff0c 100644
--- a/test/usb_pe_drp.c
+++ b/test/usb_pe_drp.c
@@ -45,7 +45,7 @@ void before_test(void)
mock_prl_reset();
/* Restart the PD task and let it settle */
- task_set_event(TASK_ID_PD_C0, TASK_EVENT_RESET_DONE, 0);
+ task_set_event(TASK_ID_PD_C0, TASK_EVENT_RESET_DONE);
task_wait_event(SECOND);
}
diff --git a/test/usb_tcpmv2_tcpci.c b/test/usb_tcpmv2_tcpci.c
index c032c472a2..6dd04ab7d5 100644
--- a/test/usb_tcpmv2_tcpci.c
+++ b/test/usb_tcpmv2_tcpci.c
@@ -385,7 +385,7 @@ void before_test(void)
mock_tcpci_reset();
/* Restart the PD task and let it settle */
- task_set_event(TASK_ID_PD_C0, TASK_EVENT_RESET_DONE, 0);
+ task_set_event(TASK_ID_PD_C0, TASK_EVENT_RESET_DONE);
task_wait_event(SECOND);
}
diff --git a/test/usb_typec_drp_acc_trysrc.c b/test/usb_typec_drp_acc_trysrc.c
index 02bdc6e3c0..605d133934 100644
--- a/test/usb_typec_drp_acc_trysrc.c
+++ b/test/usb_typec_drp_acc_trysrc.c
@@ -71,7 +71,7 @@ __maybe_unused static int test_mux_con_dis_as_src(void)
/* Update CC lines send state machine event to process */
mock_tcpc.cc1 = TYPEC_CC_VOLT_RD;
mock_tcpc.cc2 = TYPEC_CC_VOLT_OPEN;
- task_set_event(TASK_ID_PD_C0, PD_EVENT_CC, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_CC);
pd_set_dual_role(0, PD_DRP_TOGGLE_ON);
/* This wait trainsitions through AttachWait.SRC then Attached.SRC */
@@ -83,7 +83,7 @@ __maybe_unused static int test_mux_con_dis_as_src(void)
mock_tcpc.cc1 = TYPEC_CC_VOLT_OPEN;
mock_tcpc.cc2 = TYPEC_CC_VOLT_OPEN;
- task_set_event(TASK_ID_PD_C0, PD_EVENT_CC, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_CC);
/* This wait will go through TryWait.SNK then to Unattached.SNK */
task_wait_event(10 * SECOND);
@@ -104,7 +104,7 @@ __maybe_unused static int test_mux_con_dis_as_snk(void)
mock_tcpc.cc1 = TYPEC_CC_VOLT_RP_3_0;
mock_tcpc.cc2 = TYPEC_CC_VOLT_OPEN;
mock_tcpc.vbus_level = 1;
- task_set_event(TASK_ID_PD_C0, PD_EVENT_CC, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_CC);
/* This wait will go through AttachWait.SNK to Attached.SNK */
task_wait_event(5 * SECOND);
@@ -118,7 +118,7 @@ __maybe_unused static int test_mux_con_dis_as_snk(void)
mock_tcpc.cc1 = TYPEC_CC_VOLT_OPEN;
mock_tcpc.cc2 = TYPEC_CC_VOLT_OPEN;
mock_tcpc.vbus_level = 0;
- task_set_event(TASK_ID_PD_C0, PD_EVENT_CC, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_CC);
/* This wait will go through TryWait.SNK then to Unattached.SNK */
task_wait_event(10 * SECOND);
@@ -143,7 +143,7 @@ __maybe_unused static int test_power_role_set(void)
/* Update CC lines send state machine event to process */
mock_tcpc.cc1 = TYPEC_CC_VOLT_OPEN;
mock_tcpc.cc2 = TYPEC_CC_VOLT_RD;
- task_set_event(TASK_ID_PD_C0, PD_EVENT_CC, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_CC);
task_wait_event(10 * SECOND);
/* We are in Attached.SRC now */
@@ -175,7 +175,7 @@ __maybe_unused static int test_polarity_cc1_default(void)
*/
mock_tcpc.last.polarity = POLARITY_COUNT;
- task_set_event(TASK_ID_PD_C0, PD_EVENT_CC, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_CC);
/* Before tCCDebounce elapses, we should SRC */
task_wait_event(PD_T_CC_DEBOUNCE + FUDGE);
@@ -191,7 +191,7 @@ __maybe_unused static int test_polarity_cc1_1A5(void)
mock_tcpc.cc1 = TYPEC_CC_VOLT_RP_1_5;
mock_tcpc.cc2 = TYPEC_CC_VOLT_OPEN;
mock_tcpc.vbus_level = 1;
- task_set_event(TASK_ID_PD_C0, PD_EVENT_CC, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_CC);
/* Before tCCDebounce elapses, we should SRC */
task_wait_event(PD_T_CC_DEBOUNCE + FUDGE);
@@ -207,7 +207,7 @@ __maybe_unused static int test_polarity_cc1_3A0(void)
mock_tcpc.cc1 = TYPEC_CC_VOLT_RP_3_0;
mock_tcpc.cc2 = TYPEC_CC_VOLT_OPEN;
mock_tcpc.vbus_level = 1;
- task_set_event(TASK_ID_PD_C0, PD_EVENT_CC, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_CC);
/* Before tCCDebounce elapses, we should SRC */
task_wait_event(PD_T_CC_DEBOUNCE + FUDGE);
@@ -223,7 +223,7 @@ __maybe_unused static int test_polarity_cc2_default(void)
mock_tcpc.cc1 = TYPEC_CC_VOLT_OPEN;
mock_tcpc.cc2 = TYPEC_CC_VOLT_RP_DEF;
mock_tcpc.vbus_level = 1;
- task_set_event(TASK_ID_PD_C0, PD_EVENT_CC, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_CC);
/* Before tCCDebounce elapses, we should SRC */
task_wait_event(PD_T_CC_DEBOUNCE + FUDGE);
@@ -239,7 +239,7 @@ __maybe_unused static int test_polarity_cc2_1A5(void)
mock_tcpc.cc1 = TYPEC_CC_VOLT_OPEN;
mock_tcpc.cc2 = TYPEC_CC_VOLT_RP_1_5;
mock_tcpc.vbus_level = 1;
- task_set_event(TASK_ID_PD_C0, PD_EVENT_CC, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_CC);
/* Before tCCDebounce elapses, we should SRC */
task_wait_event(PD_T_CC_DEBOUNCE + FUDGE);
@@ -255,7 +255,7 @@ __maybe_unused static int test_polarity_cc2_3A0(void)
mock_tcpc.cc1 = TYPEC_CC_VOLT_OPEN;
mock_tcpc.cc2 = TYPEC_CC_VOLT_RP_3_0;
mock_tcpc.vbus_level = 1;
- task_set_event(TASK_ID_PD_C0, PD_EVENT_CC, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_CC);
/* Before tCCDebounce elapses, we should SRC */
task_wait_event(PD_T_CC_DEBOUNCE + FUDGE);
@@ -271,7 +271,7 @@ __maybe_unused static int test_polarity_dts_cc1_default(void)
mock_tcpc.cc1 = TYPEC_CC_VOLT_RP_3_0;
mock_tcpc.cc2 = TYPEC_CC_VOLT_RP_1_5;
mock_tcpc.vbus_level = 1;
- task_set_event(TASK_ID_PD_C0, PD_EVENT_CC, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_CC);
/* Before tCCDebounce elapses, we should SRC */
task_wait_event(PD_T_CC_DEBOUNCE + FUDGE);
@@ -287,7 +287,7 @@ __maybe_unused static int test_polarity_dts_cc1_1A5(void)
mock_tcpc.cc1 = TYPEC_CC_VOLT_RP_1_5;
mock_tcpc.cc2 = TYPEC_CC_VOLT_RP_DEF;
mock_tcpc.vbus_level = 1;
- task_set_event(TASK_ID_PD_C0, PD_EVENT_CC, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_CC);
/* Before tCCDebounce elapses, we should SRC */
task_wait_event(PD_T_CC_DEBOUNCE + FUDGE);
@@ -303,7 +303,7 @@ __maybe_unused static int test_polarity_dts_cc1_3A0(void)
mock_tcpc.cc1 = TYPEC_CC_VOLT_RP_3_0;
mock_tcpc.cc2 = TYPEC_CC_VOLT_RP_DEF;
mock_tcpc.vbus_level = 1;
- task_set_event(TASK_ID_PD_C0, PD_EVENT_CC, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_CC);
/* Before tCCDebounce elapses, we should SRC */
task_wait_event(PD_T_CC_DEBOUNCE + FUDGE);
@@ -319,7 +319,7 @@ __maybe_unused static int test_polarity_dts_cc2_default(void)
mock_tcpc.cc1 = TYPEC_CC_VOLT_RP_1_5;
mock_tcpc.cc2 = TYPEC_CC_VOLT_RP_3_0;
mock_tcpc.vbus_level = 1;
- task_set_event(TASK_ID_PD_C0, PD_EVENT_CC, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_CC);
/* Before tCCDebounce elapses, we should SRC */
task_wait_event(PD_T_CC_DEBOUNCE + FUDGE);
@@ -335,7 +335,7 @@ __maybe_unused static int test_polarity_dts_cc2_1A5(void)
mock_tcpc.cc1 = TYPEC_CC_VOLT_RP_DEF;
mock_tcpc.cc2 = TYPEC_CC_VOLT_RP_1_5;
mock_tcpc.vbus_level = 1;
- task_set_event(TASK_ID_PD_C0, PD_EVENT_CC, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_CC);
/* Before tCCDebounce elapses, we should SRC */
task_wait_event(PD_T_CC_DEBOUNCE + FUDGE);
@@ -351,7 +351,7 @@ __maybe_unused static int test_polarity_dts_cc2_3A0(void)
mock_tcpc.cc1 = TYPEC_CC_VOLT_RP_DEF;
mock_tcpc.cc2 = TYPEC_CC_VOLT_RP_3_0;
mock_tcpc.vbus_level = 1;
- task_set_event(TASK_ID_PD_C0, PD_EVENT_CC, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_CC);
/* Before tCCDebounce elapses, we should SRC */
task_wait_event(PD_T_CC_DEBOUNCE + FUDGE);
@@ -381,7 +381,7 @@ __maybe_unused static int test_try_src_disabled(void)
mock_tcpc.cc1 = TYPEC_CC_VOLT_OPEN;
mock_tcpc.cc2 = TYPEC_CC_VOLT_RP_3_0;
mock_tcpc.vbus_level = 1;
- task_set_event(TASK_ID_PD_C0, PD_EVENT_CC, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_CC);
/* Wait a long time past many potential transitions */
task_wait_event(10 * SECOND);
@@ -420,7 +420,7 @@ static int switch_to_opposite_role(int port, int pull)
ccprints("[Test] Partner presents SRC with Vbus ON");
}
- task_set_event(TASK_ID_PD_C0, PD_EVENT_CC, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_CC);
return EC_SUCCESS;
};
@@ -435,7 +435,7 @@ __maybe_unused static int test_try_src_partner_switches(void)
mock_tcpc.cc1 = TYPEC_CC_VOLT_OPEN;
mock_tcpc.cc2 = TYPEC_CC_VOLT_RP_3_0;
mock_tcpc.vbus_level = 1;
- task_set_event(TASK_ID_PD_C0, PD_EVENT_CC, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_CC);
/* We are in AttachWait.SNK now */
/* Before tCCDebounce elapses, we should still be a SNK */
@@ -481,7 +481,7 @@ static int dumb_src_charger_cc_response(int port, int pull)
ccprints("[Test] Partner presents SRC with Vbus ON");
- task_set_event(TASK_ID_PD_C0, PD_EVENT_CC, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_CC);
return EC_SUCCESS;
};
@@ -496,7 +496,7 @@ __maybe_unused static int test_try_src_partner_does_not_switch_vbus(void)
mock_tcpc.cc1 = TYPEC_CC_VOLT_OPEN;
mock_tcpc.cc2 = TYPEC_CC_VOLT_RP_3_0;
mock_tcpc.vbus_level = 1;
- task_set_event(TASK_ID_PD_C0, PD_EVENT_CC, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_CC);
/* We are in AttachWait.SNK now */
/* Before tCCDebounce elapses, we should still be a SNK */
@@ -552,7 +552,7 @@ static int src_charger_drops_vbus_cc_response(int port, int pull)
ccprints("[Test] Partner presents SRC with Vbus ON");
}
- task_set_event(TASK_ID_PD_C0, PD_EVENT_CC, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_CC);
return EC_SUCCESS;
};
@@ -567,7 +567,7 @@ __maybe_unused static int test_try_src_partner_does_not_switch_no_vbus(void)
mock_tcpc.cc1 = TYPEC_CC_VOLT_OPEN;
mock_tcpc.cc2 = TYPEC_CC_VOLT_RP_3_0;
mock_tcpc.vbus_level = 1;
- task_set_event(TASK_ID_PD_C0, PD_EVENT_CC, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_CC);
/* We are in AttachWait.SNK now */
/* Before tCCDebounce elapses, we should still be a SNK */
@@ -619,7 +619,7 @@ __maybe_unused static int test_cc_open_on_normal_reset(void)
system_clear_reset_flags(EC_RESET_FLAG_POWER_ON);
- task_set_event(TASK_ID_PD_C0, TASK_EVENT_RESET_DONE, 0);
+ task_set_event(TASK_ID_PD_C0, TASK_EVENT_RESET_DONE);
task_wait_event(SECOND * 10);
/* Ensure that the first CC set call was to open (error recovery). */
@@ -645,7 +645,7 @@ __maybe_unused static int test_cc_rd_on_por_reset(void)
system_set_reset_flags(EC_RESET_FLAG_POWER_ON);
- task_set_event(TASK_ID_PD_C0, TASK_EVENT_RESET_DONE, 0);
+ task_set_event(TASK_ID_PD_C0, TASK_EVENT_RESET_DONE);
task_wait_event(SECOND * 10);
/* Ensure that the first CC set call was to Rd (sink) */
@@ -703,7 +703,7 @@ __maybe_unused static int test_auto_toggle_delay_early_connect(void)
mock_tcpc.cc1 = TYPEC_CC_VOLT_OPEN;
mock_tcpc.cc2 = TYPEC_CC_VOLT_RP_3_0;
mock_tcpc.vbus_level = 1;
- task_set_event(TASK_ID_PD_C0, PD_EVENT_CC, 0);
+ task_set_event(TASK_ID_PD_C0, PD_EVENT_CC);
/* Ensure the auto toggle enable was never called */
task_wait_event(SECOND);
@@ -727,7 +727,7 @@ void before_test(void)
mock_tcpc_reset();
/* Restart the PD task and let it settle */
- task_set_event(TASK_ID_PD_C0, TASK_EVENT_RESET_DONE, 0);
+ task_set_event(TASK_ID_PD_C0, TASK_EVENT_RESET_DONE);
task_wait_event(SECOND);
/* Print out TCPC calls for easier debugging */
diff --git a/zephyr/shim/src/tasks.c b/zephyr/shim/src/tasks.c
index 78bee0a69a..45450076ee 100644
--- a/zephyr/shim/src/tasks.c
+++ b/zephyr/shim/src/tasks.c
@@ -69,14 +69,13 @@ task_id_t task_get_current(void)
return 0;
}
-uint32_t task_set_event(task_id_t cros_task_id, uint32_t event, int wait)
+uint32_t task_set_event(task_id_t cros_task_id, uint32_t event)
{
struct task_ctx *const ctx = &shimmed_tasks[cros_task_id];
atomic_or(&ctx->event_mask, event);
k_poll_signal_raise(&ctx->new_event, 0);
- /* TODO(b/172360521): Remove wait parameter from EC. No one uses it */
return 0;
}
diff --git a/zephyr/test/tasks/main.c b/zephyr/test/tasks/main.c
index dc0661cf95..7137b88531 100644
--- a/zephyr/test/tasks/main.c
+++ b/zephyr/test/tasks/main.c
@@ -63,7 +63,7 @@ static void set_event_before_task_start2(void)
static void test_set_event_before_task_start(void)
{
/* Send event before tasks start */
- task_set_event(TASK_ID_TASK_1, 0xAAAA, 0);
+ task_set_event(TASK_ID_TASK_1, 0xAAAA);
start_ec_tasks();
@@ -121,7 +121,7 @@ static void event_delivered2(void)
{
k_sleep(K_SECONDS(5));
- task_set_event(TASK_ID_TASK_1, 0x1234, 0);
+ task_set_event(TASK_ID_TASK_1, 0x1234);
}
static void test_event_delivered(void)
@@ -132,7 +132,7 @@ static void test_event_delivered(void)
static void event_mask_not_delivered1(void)
{
- task_set_event(TASK_ID_TASK_2, 0x007F, 0);
+ task_set_event(TASK_ID_TASK_2, 0x007F);
}
static void event_mask_not_delivered2(void)
@@ -159,7 +159,7 @@ static void event_mask_extra1(void)
{
k_sleep(K_SECONDS(1));
- task_set_event(TASK_ID_TASK_2, 0x00FF, 0);
+ task_set_event(TASK_ID_TASK_2, 0x00FF);
}
static void event_mask_extra2(void)
@@ -189,9 +189,9 @@ static void empty_set_mask1(void)
* It is generally invalid to set a 0 event, but this simulates a race
* condition and exercises fallback code in task_wait_event
*/
- task_set_event(TASK_ID_TASK_2, 0, 0);
+ task_set_event(TASK_ID_TASK_2, 0);
k_sleep(K_SECONDS(1));
- task_set_event(TASK_ID_TASK_2, 0x1234, 0);
+ task_set_event(TASK_ID_TASK_2, 0x1234);
}
static void empty_set_mask2(void)