summaryrefslogtreecommitdiff
path: root/common/usb_pd_protocol.c
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2020-09-23 15:21:18 -0600
committerCommit Bot <commit-bot@chromium.org>2020-09-29 16:30:59 +0000
commitd4be394be0b91a71b2f16ca476114b7470bc630f (patch)
treee08dd7e428be1d27b65c4bae3ba8a47e40c8b1a5 /common/usb_pd_protocol.c
parent9513a63a626021b071199d02b7c73112eb746833 (diff)
downloadchrome-ec-d4be394be0b91a71b2f16ca476114b7470bc630f.tar.gz
tree: rename atomic_* functions to deprecated_atomic_*
We will move to an API compatible with Zephyr's API. See the bug for complete rationale and plan. BUG=b:169151160 BRANCH=none TEST=buildall Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: Id611f663446abf00b24298a669f2ae47fef7f632 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2427507 Tested-by: Dawid Niedźwiecki <dn@semihalf.com> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
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. */