dm writecache: add cond_resched to loop in persistent_memory_claim()
[linux/fpc-iii.git] / drivers / net / ipa / ipa_clock.h
blobbc52b35e6bb23519bf81509979cd660e0a849c4e
1 /* SPDX-License-Identifier: GPL-2.0 */
3 /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
4 * Copyright (C) 2018-2020 Linaro Ltd.
5 */
6 #ifndef _IPA_CLOCK_H_
7 #define _IPA_CLOCK_H_
9 struct device;
11 struct ipa;
13 /**
14 * ipa_clock_init() - Initialize IPA clocking
15 * @dev: IPA device
17 * @Return: A pointer to an ipa_clock structure, or a pointer-coded error
19 struct ipa_clock *ipa_clock_init(struct device *dev);
21 /**
22 * ipa_clock_exit() - Inverse of ipa_clock_init()
23 * @clock: IPA clock pointer
25 void ipa_clock_exit(struct ipa_clock *clock);
27 /**
28 * ipa_clock_get() - Get an IPA clock reference
29 * @ipa: IPA pointer
31 * This call blocks if this is the first reference.
33 void ipa_clock_get(struct ipa *ipa);
35 /**
36 * ipa_clock_get_additional() - Get an IPA clock reference if not first
37 * @ipa: IPA pointer
39 * This returns immediately, and only takes a reference if not the first
41 bool ipa_clock_get_additional(struct ipa *ipa);
43 /**
44 * ipa_clock_put() - Drop an IPA clock reference
45 * @ipa: IPA pointer
47 * This drops a clock reference. If the last reference is being dropped,
48 * the clock is stopped and RX endpoints are suspended. This call will
49 * not block unless the last reference is dropped.
51 void ipa_clock_put(struct ipa *ipa);
53 #endif /* _IPA_CLOCK_H_ */