summaryrefslogtreecommitdiff
path: root/common/usb_pd_protocol.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/usb_pd_protocol.c')
-rw-r--r--common/usb_pd_protocol.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c
index 83d16720d1..cbf1a193cb 100644
--- a/common/usb_pd_protocol.c
+++ b/common/usb_pd_protocol.c
@@ -531,10 +531,11 @@ static int reset_device_and_notify(int port)
* waking the TCPC, but it has also set PD_EVENT_TCPC_RESET again, which
* would result in a second, unnecessary init.
*/
- atomic_clear(task_get_event_bitmap(task_get_current()),
- PD_EVENT_TCPC_RESET);
+ deprecated_atomic_clear(task_get_event_bitmap(task_get_current()),
+ PD_EVENT_TCPC_RESET);
- waiting_tasks = atomic_read_clear(&pd[port].tasks_waiting_on_reset);
+ waiting_tasks =
+ deprecated_atomic_read_clear(&pd[port].tasks_waiting_on_reset);
/*
* Now that we are done waking up the device, handle device access
@@ -562,8 +563,8 @@ static void pd_wait_for_wakeup(int port)
reset_device_and_notify(port);
} else {
/* Otherwise, we need to wait for the TCPC reset to complete */
- atomic_or(&pd[port].tasks_waiting_on_reset,
- 1 << task_get_current());
+ deprecated_atomic_or(&pd[port].tasks_waiting_on_reset,
+ 1 << task_get_current());
/*
* NOTE: We could be sending the PD task the reset event while
* it is already processing the reset event. If that occurs,
@@ -607,9 +608,11 @@ void pd_prevent_low_power_mode(int port, int prevent)
const int current_task_mask = (1 << task_get_current());
if (prevent)
- atomic_or(&pd[port].tasks_preventing_lpm, current_task_mask);
+ deprecated_atomic_or(&pd[port].tasks_preventing_lpm,
+ current_task_mask);
else
- atomic_clear(&pd[port].tasks_preventing_lpm, current_task_mask);
+ deprecated_atomic_clear(&pd[port].tasks_preventing_lpm,
+ current_task_mask);
}
/* This is only called from the PD tasks that owns the port. */