Lines Matching refs:mhi_dev
20 struct mhi_device *mhi_dev; member
81 struct mhi_device *mhi_dev = mhiwwan->mhi_dev; in mhi_wwan_ctrl_refill_work() local
99 if (mhi_queue_skb(mhi_dev, DMA_FROM_DEVICE, skb, mhiwwan->mtu, MHI_EOT)) { in mhi_wwan_ctrl_refill_work()
100 dev_err(&mhi_dev->dev, "Failed to queue buffer\n"); in mhi_wwan_ctrl_refill_work()
113 ret = mhi_prepare_for_transfer(mhiwwan->mhi_dev); in mhi_wwan_ctrl_start()
118 mhiwwan->rx_budget = mhi_get_free_desc_count(mhiwwan->mhi_dev, DMA_FROM_DEVICE); in mhi_wwan_ctrl_start()
139 mhi_unprepare_from_transfer(mhiwwan->mhi_dev); in mhi_wwan_ctrl_stop()
155 ret = mhi_queue_skb(mhiwwan->mhi_dev, DMA_TO_DEVICE, skb, skb->len, MHI_EOT); in mhi_wwan_ctrl_tx()
156 if (mhi_queue_is_full(mhiwwan->mhi_dev, DMA_TO_DEVICE)) in mhi_wwan_ctrl_tx()
169 static void mhi_ul_xfer_cb(struct mhi_device *mhi_dev, in mhi_ul_xfer_cb() argument
172 struct mhi_wwan_dev *mhiwwan = dev_get_drvdata(&mhi_dev->dev); in mhi_ul_xfer_cb()
176 dev_dbg(&mhi_dev->dev, "%s: status: %d xfer_len: %zu\n", __func__, in mhi_ul_xfer_cb()
184 if (!mhi_queue_is_full(mhiwwan->mhi_dev, DMA_TO_DEVICE)) in mhi_ul_xfer_cb()
189 static void mhi_dl_xfer_cb(struct mhi_device *mhi_dev, in mhi_dl_xfer_cb() argument
192 struct mhi_wwan_dev *mhiwwan = dev_get_drvdata(&mhi_dev->dev); in mhi_dl_xfer_cb()
196 dev_dbg(&mhi_dev->dev, "%s: status: %d receive_len: %zu\n", __func__, in mhi_dl_xfer_cb()
214 static int mhi_wwan_ctrl_probe(struct mhi_device *mhi_dev, in mhi_wwan_ctrl_probe() argument
217 struct mhi_controller *cntrl = mhi_dev->mhi_cntrl; in mhi_wwan_ctrl_probe()
225 mhiwwan->mhi_dev = mhi_dev; in mhi_wwan_ctrl_probe()
231 if (mhi_dev->dl_chan) in mhi_wwan_ctrl_probe()
233 if (mhi_dev->ul_chan) in mhi_wwan_ctrl_probe()
236 dev_set_drvdata(&mhi_dev->dev, mhiwwan); in mhi_wwan_ctrl_probe()
239 port = wwan_create_port(&cntrl->mhi_dev->dev, id->driver_data, in mhi_wwan_ctrl_probe()
251 static void mhi_wwan_ctrl_remove(struct mhi_device *mhi_dev) in mhi_wwan_ctrl_remove() argument
253 struct mhi_wwan_dev *mhiwwan = dev_get_drvdata(&mhi_dev->dev); in mhi_wwan_ctrl_remove()