Lines Matching defs:chan
182 struct mbox_chan *chan = p;
188 pcct_ss = chan->con_priv;
190 mbox_chan_received_data(chan, NULL);
193 struct acpi_pcct_hw_reduced_type2 *pcct2_ss = chan->con_priv;
194 u32 id = chan - pcc_mbox_channels;
234 struct mbox_chan *chan;
244 chan = get_pcc_channel(subspace_id);
246 if (IS_ERR(chan) || chan->cl) {
251 spin_lock_irqsave(&chan->lock, flags);
252 chan->msg_free = 0;
253 chan->msg_count = 0;
254 chan->active_req = NULL;
255 chan->cl = cl;
256 init_completion(&chan->tx_complete);
258 if (chan->txdone_method == TXDONE_BY_POLL && cl->knows_txdone)
259 chan->txdone_method = TXDONE_BY_ACK;
261 spin_unlock_irqrestore(&chan->lock, flags);
267 pcc_mbox_irq, 0, MBOX_IRQ_NAME, chan);
271 pcc_mbox_free_channel(chan);
272 chan = ERR_PTR(rc);
276 return chan;
283 * @chan: Pointer to the mailbox channel as returned by
286 void pcc_mbox_free_channel(struct mbox_chan *chan)
288 u32 id = chan - pcc_mbox_channels;
291 if (!chan || !chan->cl)
300 devm_free_irq(chan->mbox->dev, pcc_doorbell_irq[id], chan);
302 spin_lock_irqsave(&chan->lock, flags);
303 chan->cl = NULL;
304 chan->active_req = NULL;
305 if (chan->txdone_method == TXDONE_BY_ACK)
306 chan->txdone_method = TXDONE_BY_POLL;
308 spin_unlock_irqrestore(&chan->lock, flags);
318 * @chan: Pointer to Mailbox channel over which to send data.
324 static int pcc_send_data(struct mbox_chan *chan, void *data)
326 struct acpi_pcct_hw_reduced *pcct_ss = chan->con_priv;
331 u32 id = chan - pcc_mbox_channels;