Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / drivers / net / ipa / ipa_gsi.h
blobc02cb6f3a2e18c4c8fabd21c7ffecfcdd725cbe5
1 /* SPDX-License-Identifier: GPL-2.0 */
3 /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
4 * Copyright (C) 2019-2020 Linaro Ltd.
5 */
6 #ifndef _IPA_GSI_TRANS_H_
7 #define _IPA_GSI_TRANS_H_
9 #include <linux/types.h>
11 struct gsi;
12 struct gsi_trans;
13 struct ipa_gsi_endpoint_data;
15 /**
16 * ipa_gsi_trans_complete() - GSI transaction completion callback
17 * @trans: Transaction that has completed
19 * This called from the GSI layer to notify the IPA layer that a
20 * transaction has completed.
22 void ipa_gsi_trans_complete(struct gsi_trans *trans);
24 /**
25 * ipa_gsi_trans_release() - GSI transaction release callback
26 * @trans: Transaction whose resources should be freed
28 * This called from the GSI layer to notify the IPA layer that a
29 * transaction is about to be freed, so any resources associated
30 * with it should be released.
32 void ipa_gsi_trans_release(struct gsi_trans *trans);
34 /**
35 * ipa_gsi_channel_tx_queued() - GSI queued to hardware notification
36 * @gsi: GSI pointer
37 * @channel_id: Channel number
38 * @count: Number of transactions queued
39 * @byte_count: Number of bytes to transfer represented by transactions
41 * This called from the GSI layer to notify the IPA layer that some
42 * number of transactions have been queued to hardware for execution.
44 void ipa_gsi_channel_tx_queued(struct gsi *gsi, u32 channel_id, u32 count,
45 u32 byte_count);
47 /**
48 * ipa_gsi_channel_tx_completed() - GSI transaction completion callback
49 * @gsi: GSI pointer
50 * @channel_id: Channel number
51 * @count: Number of transactions completed since last report
52 * @byte_count: Number of bytes transferred represented by transactions
54 * This called from the GSI layer to notify the IPA layer that the hardware
55 * has reported the completion of some number of transactions.
57 void ipa_gsi_channel_tx_completed(struct gsi *gsi, u32 channel_id, u32 count,
58 u32 byte_count);
60 /* ipa_gsi_endpoint_data_empty() - Empty endpoint config data test
61 * @data: endpoint configuration data
63 * Determines whether an endpoint configuration data entry is empty,
64 * meaning it contains no valid configuration information and should
65 * be ignored.
67 * Return: true if empty; false otherwise
69 bool ipa_gsi_endpoint_data_empty(const struct ipa_gsi_endpoint_data *data);
71 #endif /* _IPA_GSI_TRANS_H_ */