Rachit Kankane | 1bc1149 | 2018-01-24 18:48:17 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 The Linux Foundation. All rights reserved. |
| 3 | * |
Rachit Kankane | 1bc1149 | 2018-01-24 18:48:17 +0530 | [diff] [blame] | 4 | * Permission to use, copy, modify, and/or distribute this software for |
| 5 | * any purpose with or without fee is hereby granted, provided that the |
| 6 | * above copyright notice and this permission notice appear in all |
| 7 | * copies. |
| 8 | * |
| 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 10 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 11 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 12 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 13 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 14 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 15 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 16 | * PERFORMANCE OF THIS SOFTWARE. |
| 17 | */ |
| 18 | |
Rachit Kankane | 1bc1149 | 2018-01-24 18:48:17 +0530 | [diff] [blame] | 19 | #ifndef _HTC_CREDIT_HISTORY_H_ |
| 20 | #define _HTC_CREDIT_HISTORY_H_ |
| 21 | |
| 22 | #include "htc_internal.h" |
| 23 | |
| 24 | #ifdef FEATURE_HTC_CREDIT_HISTORY |
| 25 | |
| 26 | /** |
| 27 | * htc_credit_history_init(): Init helper function to initialize HTC credit |
| 28 | * history buffers and variable. |
| 29 | * Return: None |
| 30 | */ |
| 31 | |
| 32 | void htc_credit_history_init(void); |
| 33 | void htc_credit_record(enum htc_credit_exchange_type type, uint32_t tx_credit, |
| 34 | uint32_t htc_tx_queue_depth); |
| 35 | |
| 36 | #else /* FEATURE_HTC_CREDIT_HISTORY */ |
| 37 | |
| 38 | static inline |
| 39 | void htc_credit_history_init(void) |
| 40 | { |
| 41 | } |
| 42 | |
| 43 | static inline |
| 44 | void htc_credit_record(enum htc_credit_exchange_type type, uint32_t tx_credit, |
| 45 | uint32_t htc_tx_queue_depth) |
| 46 | { } |
| 47 | #endif /* FEATURE_HTC_CREDIT_HISTORY */ |
| 48 | #endif /* _HTC_CREDIT_HISTORY_H_ */ |