Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit af7d3841 authored by Jack Pham's avatar Jack Pham
Browse files

usb: pd: Make select_pdo_store() wait until request goes through



When sending a request through the 'select_pdo' sysfs file,
make sure the request has gone through and is acknowledged
by the source before returning. This allows for checking if
the request was rejected so that an error can be returned.

Rename the 'swap_complete' completion variable to 'is_ready'
so it can be reused in this context. Also add a mutex so that
select_pdo will not contend with a dual_role swap.

Change-Id: Ie8b088faa15c67915e3bd96972b4f59f0cc66afe
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent ee1f9051
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment