Lines Matching +full:autosuspend +full:- +full:delay

2  * SPDX-License-Identifier: MIT
74 * Note that @fn is allowed to fail, in which case the runtime-pm wakeref
84 if (unlikely(!atomic_inc_not_zero(&wf->count))) in intel_wakeref_get()
102 INTEL_WAKEREF_BUG_ON(atomic_read(&wf->count) <= 0); in __intel_wakeref_get()
103 atomic_inc(&wf->count); in __intel_wakeref_get()
118 return atomic_inc_not_zero(&wf->count); in intel_wakeref_get_if_active()
135 * Note that @fn is allowed to fail, in which case the runtime-pm wakeref
145 GENMASK(BITS_PER_LONG - 1, __INTEL_WAKEREF_PUT_LAST_BIT__) in __intel_wakeref_put()
147 INTEL_WAKEREF_BUG_ON(atomic_read(&wf->count) <= 0); in __intel_wakeref_put()
148 if (unlikely(!atomic_add_unless(&wf->count, -1, 1))) in __intel_wakeref_put()
166 intel_wakeref_put_delay(struct intel_wakeref *wf, unsigned long delay) in intel_wakeref_put_delay() argument
170 FIELD_PREP(INTEL_WAKEREF_PUT_DELAY, delay)); in intel_wakeref_put_delay()
183 __acquires(wf->mutex) in intel_wakeref_lock()
185 mutex_lock(&wf->mutex); in intel_wakeref_lock()
196 __releases(wf->mutex) in intel_wakeref_unlock()
198 mutex_unlock(&wf->mutex); in intel_wakeref_unlock()
205 * Waits for the active callback (under the @wf->mutex or another CPU) is
211 mutex_lock(&wf->mutex); in intel_wakeref_unlock_wait()
212 mutex_unlock(&wf->mutex); in intel_wakeref_unlock_wait()
213 flush_delayed_work(&wf->work); in intel_wakeref_unlock_wait()
225 return READ_ONCE(wf->wakeref); in intel_wakeref_is_active()
235 lockdep_assert_held(&wf->mutex); in __intel_wakeref_defer_park()
236 INTEL_WAKEREF_BUG_ON(atomic_read(&wf->count)); in __intel_wakeref_defer_park()
237 atomic_set_release(&wf->count, 1); in __intel_wakeref_defer_park()
262 * intel_wakeref_auto: Delay the runtime-pm autosuspend
266 * The runtime-pm core uses a suspend delay after the last wakeref
268 * delay is configurable via sysfs with little regard to the device
269 * characteristics. Instead, we want to tune the autosuspend based on our
273 * Pass @timeout = 0 to cancel a previous autosuspend by executing the