Lines Matching +full:autosuspend +full:- +full:delay
2 * SPDX-License-Identifier: MIT
71 * the runtime pm wakeref and then call the intel_wakeref_ops->get()
74 * Note that intel_wakeref_ops->get() is allowed to fail, in which case
75 * the runtime-pm wakeref will be released and the acquisition unwound,
85 if (unlikely(!atomic_inc_not_zero(&wf->count))) in intel_wakeref_get()
103 INTEL_WAKEREF_BUG_ON(atomic_read(&wf->count) <= 0); in __intel_wakeref_get()
104 atomic_inc(&wf->count); in __intel_wakeref_get()
119 return atomic_inc_not_zero(&wf->count); in intel_wakeref_get_if_active()
130 might_lock(&wf->mutex); in intel_wakeref_might_get()
139 * the runtime pm wakeref will be released after the intel_wakeref_ops->put()
142 * Note that intel_wakeref_ops->put() is allowed to fail, in which case the
143 * runtime-pm wakeref is retained.
150 GENMASK(BITS_PER_LONG - 1, __INTEL_WAKEREF_PUT_LAST_BIT__) in __intel_wakeref_put()
152 INTEL_WAKEREF_BUG_ON(atomic_read(&wf->count) <= 0); in __intel_wakeref_put()
153 if (unlikely(!atomic_add_unless(&wf->count, -1, 1))) in __intel_wakeref_put()
171 intel_wakeref_put_delay(struct intel_wakeref *wf, unsigned long delay) in intel_wakeref_put_delay() argument
175 FIELD_PREP(INTEL_WAKEREF_PUT_DELAY, delay)); in intel_wakeref_put_delay()
181 might_lock(&wf->mutex); in intel_wakeref_might_put()
194 __acquires(wf->mutex) in intel_wakeref_lock()
196 mutex_lock(&wf->mutex); in intel_wakeref_lock()
207 __releases(wf->mutex) in intel_wakeref_unlock()
209 mutex_unlock(&wf->mutex); in intel_wakeref_unlock()
216 * Waits for the active callback (under the @wf->mutex or another CPU) is
222 mutex_lock(&wf->mutex); in intel_wakeref_unlock_wait()
223 mutex_unlock(&wf->mutex); in intel_wakeref_unlock_wait()
224 flush_delayed_work(&wf->work); in intel_wakeref_unlock_wait()
236 return READ_ONCE(wf->wakeref); in intel_wakeref_is_active()
246 lockdep_assert_held(&wf->mutex); in __intel_wakeref_defer_park()
247 INTEL_WAKEREF_BUG_ON(atomic_read(&wf->count)); in __intel_wakeref_defer_park()
248 atomic_set_release(&wf->count, 1); in __intel_wakeref_defer_park()
273 * intel_wakeref_auto: Delay the runtime-pm autosuspend
277 * The runtime-pm core uses a suspend delay after the last wakeref
279 * delay is configurable via sysfs with little regard to the device
280 * characteristics. Instead, we want to tune the autosuspend based on our
284 * Pass @timeout = 0 to cancel a previous autosuspend by executing the