Lines Matching refs:tx
110 struct slim_ctrl_buf tx; member
155 spin_lock_irqsave(&ctrl->tx.lock, flags); in slim_ack_txn()
156 idx = ctrl->tx.head; in slim_ack_txn()
157 ctrl->tx.head = (ctrl->tx.head + 1) % ctrl->tx.n; in slim_ack_txn()
158 spin_unlock_irqrestore(&ctrl->tx.lock, flags); in slim_ack_txn()
309 spin_lock_irqsave(&ctrl->tx.lock, flags); in slim_alloc_txbuf()
310 if (((ctrl->tx.head + 1) % ctrl->tx.n) == ctrl->tx.tail) { in slim_alloc_txbuf()
311 spin_unlock_irqrestore(&ctrl->tx.lock, flags); in slim_alloc_txbuf()
315 idx = ctrl->tx.tail; in slim_alloc_txbuf()
317 ctrl->tx.tail = (ctrl->tx.tail + 1) % ctrl->tx.n; in slim_alloc_txbuf()
319 spin_unlock_irqrestore(&ctrl->tx.lock, flags); in slim_alloc_txbuf()
321 return ctrl->tx.base + (idx * ctrl->tx.sl_sz); in slim_alloc_txbuf()
528 ctrl->tx.n = QCOM_TX_MSGS; in qcom_slim_probe()
529 ctrl->tx.sl_sz = SLIM_MSGQ_BUF_LEN; in qcom_slim_probe()
538 spin_lock_init(&ctrl->tx.lock); in qcom_slim_probe()
569 ctrl->tx.base = devm_kcalloc(&pdev->dev, ctrl->tx.n, ctrl->tx.sl_sz, in qcom_slim_probe()
571 if (!ctrl->tx.base) { in qcom_slim_probe()