summaryrefslogtreecommitdiff
path: root/chip/npcx
diff options
context:
space:
mode:
authorDawid Niedzwiecki <dn@semihalf.com>2020-11-06 09:20:56 +0100
committerCommit Bot <commit-bot@chromium.org>2020-12-14 19:59:09 +0000
commitf96f176c303a73973d7cf5ddf1abf86f534a6e39 (patch)
treea793c58f008cfa94cc93ea34627fd1b6457e3a1b /chip/npcx
parenta23ef3d074335f2b6953194671f966117fd1fe60 (diff)
downloadchrome-ec-f96f176c303a73973d7cf5ddf1abf86f534a6e39.tar.gz
task_set_event: remove the wait argument
There is an option in the task_set_event function which force the calling task to wait for an event. However, the option is never used thus remove it. This also will help in the Zephyr migration process. BUG=b:172360521 BRANCH=none TEST=make buildall Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: Ic152fd3d6862d487bcc0024c48d136556c0b81bc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2521599 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'chip/npcx')
-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
5 files changed, 9 insertions, 12 deletions
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;