Skip to content
Commit 68452bd4 authored by Gerard Marull-Paretas's avatar Gerard Marull-Paretas Committed by Carles Cufí
Browse files

pm: device_runtime: allow calling pm_device_runtime_get from ISRs



pm_device_runtime_get() uses a semaphore to protect resources.
pm_device_runtime_get() blocked forever until obtaining the lock, making
it unusable from contexts where blocking is not allowed, e.g. ISRs. With
this patch, we give the chance to use the function from an ISR by not
waiting on the lock and returning -EWOULDBLOCK instead. If device is
suspending (from a previous put_async() operation) the same value is
returned as we can't wait either.

Signed-off-by: default avatarGerard Marull-Paretas <gerard@teslabs.com>
parent 5fc17770
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment