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.
14 * ipa_clock_rate() - Return the current IPA core clock rate
17 * Return: The current clock rate (in Hz), or 0.
19 u32 ipa_clock_rate(struct ipa *ipa);
22 * ipa_clock_init() - Initialize IPA clocking
25 * Return: A pointer to an ipa_clock structure, or a pointer-coded error
27 struct ipa_clock *ipa_clock_init(struct device *dev);
30 * ipa_clock_exit() - Inverse of ipa_clock_init()
31 * @clock: IPA clock pointer
33 void ipa_clock_exit(struct ipa_clock *clock);
36 * ipa_clock_get() - Get an IPA clock reference
39 * This call blocks if this is the first reference.
41 void ipa_clock_get(struct ipa *ipa);
44 * ipa_clock_get_additional() - Get an IPA clock reference if not first
47 * This returns immediately, and only takes a reference if not the first
49 bool ipa_clock_get_additional(struct ipa *ipa);
52 * ipa_clock_put() - Drop an IPA clock reference
55 * This drops a clock reference. If the last reference is being dropped,
56 * the clock is stopped and RX endpoints are suspended. This call will
57 * not block unless the last reference is dropped.
59 void ipa_clock_put(struct ipa *ipa);
61 #endif /* _IPA_CLOCK_H_ */