diff options
author | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2018-09-11 16:44:19 -0700 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2018-09-24 11:20:06 +0200 |
commit | 18c0b5467498ccbedd1646cbeecbd199e5f3f860 (patch) | |
tree | e8117e57c881eccb2b8d86095b4146f2635d66c7 /drivers/hid/intel-ish-hid/ishtp/client.h | |
parent | f26de33faff19bc937311df66278a2d3a1535fff (diff) | |
download | lwn-18c0b5467498ccbedd1646cbeecbd199e5f3f860.tar.gz lwn-18c0b5467498ccbedd1646cbeecbd199e5f3f860.zip |
HID: intel_ish-hid: Enhance API to get ring buffer sizes
Added two APIs:
- ishtp_cl_get_tx_free_buffer_size:
This returns total size available for a client to queue TX data.
- ishtp_cl_get_tx_free_rings:
This returns total number of TX rings available for a client.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/intel-ish-hid/ishtp/client.h')
-rw-r--r-- | drivers/hid/intel-ish-hid/ishtp/client.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/hid/intel-ish-hid/ishtp/client.h b/drivers/hid/intel-ish-hid/ishtp/client.h index a82ee4d82cdb..042f4c4853b1 100644 --- a/drivers/hid/intel-ish-hid/ishtp/client.h +++ b/drivers/hid/intel-ish-hid/ishtp/client.h @@ -84,6 +84,7 @@ struct ishtp_cl { /* Client Tx buffers list */ unsigned int tx_ring_size; struct ishtp_cl_tx_ring tx_list, tx_free_list; + int tx_ring_free_size; spinlock_t tx_list_spinlock; spinlock_t tx_free_list_spinlock; size_t tx_offs; /* Offset in buffer at head of 'tx_list' */ @@ -137,6 +138,8 @@ int ishtp_cl_alloc_rx_ring(struct ishtp_cl *cl); int ishtp_cl_alloc_tx_ring(struct ishtp_cl *cl); void ishtp_cl_free_rx_ring(struct ishtp_cl *cl); void ishtp_cl_free_tx_ring(struct ishtp_cl *cl); +int ishtp_cl_get_tx_free_buffer_size(struct ishtp_cl *cl); +int ishtp_cl_get_tx_free_rings(struct ishtp_cl *cl); /* DMA I/F functions */ void recv_ishtp_cl_msg_dma(struct ishtp_device *dev, void *msg, |