Lines Matching refs:mhi_dev

70  * @mhi_dev: Pointer to associated MHI device.
79 struct mhi_device *mhi_dev;
113 static void qaic_timesync_ul_xfer_cb(struct mhi_device *mhi_dev, struct mhi_result *mhi_result)
115 struct mqts_dev *mqtsdev = dev_get_drvdata(&mhi_dev->dev);
123 static void qaic_timesync_dl_xfer_cb(struct mhi_device *mhi_dev, struct mhi_result *mhi_result)
125 struct mqts_dev *mqtsdev = dev_get_drvdata(&mhi_dev->dev);
160 ret = mhi_queue_buf(mqtsdev->mhi_dev, DMA_TO_DEVICE, sync_msg, sizeof(*sync_msg), MHI_EOT);
174 static int qaic_timesync_probe(struct mhi_device *mhi_dev, const struct mhi_device_id *id)
176 struct qaic_device *qdev = pci_get_drvdata(to_pci_dev(mhi_dev->mhi_cntrl->cntrl_dev));
188 mqtsdev->mhi_dev = mhi_dev;
199 ret = mhi_prepare_for_transfer(mhi_dev);
208 dev_set_drvdata(&mhi_dev->dev, mqtsdev);
220 static void qaic_timesync_remove(struct mhi_device *mhi_dev)
222 struct mqts_dev *mqtsdev = dev_get_drvdata(&mhi_dev->dev);
225 mhi_unprepare_from_transfer(mqtsdev->mhi_dev);
254 struct mhi_device *mhi_dev;
258 mhi_dev = qdev->qts_ch;
260 ret = mhi_queue_buf(mhi_dev, DMA_FROM_DEVICE, &resp->data, sizeof(resp->data), MHI_EOT);
263 dev_warn(&mhi_dev->dev, "Failed to re-queue response buffer %d\n", ret);
279 ret = mhi_queue_buf(mhi_dev, DMA_TO_DEVICE, req, sizeof(*req), MHI_EOT);
282 dev_dbg(&mhi_dev->dev, "Failed to send request message. Error %d\n", ret);
286 dev_dbg(&mhi_dev->dev, "ACK received from device\n");
289 dev_err(&mhi_dev->dev, "Invalid message type %u.\n", data.hdr.msg_type);
293 static int qaic_boot_timesync_queue_resp(struct mhi_device *mhi_dev, struct qaic_device *qdev)
305 ret = mhi_queue_buf(mhi_dev, DMA_FROM_DEVICE, &resp->data, sizeof(resp->data), MHI_EOT);
308 dev_warn(&mhi_dev->dev, "Failed to queue response buffer %d\n", ret);
315 static void qaic_boot_timesync_remove(struct mhi_device *mhi_dev)
319 qdev = dev_get_drvdata(&mhi_dev->dev);
324 static int qaic_boot_timesync_probe(struct mhi_device *mhi_dev, const struct mhi_device_id *id)
326 struct qaic_device *qdev = pci_get_drvdata(to_pci_dev(mhi_dev->mhi_cntrl->cntrl_dev));
329 ret = mhi_prepare_for_transfer(mhi_dev);
333 qdev->qts_ch = mhi_dev;
334 dev_set_drvdata(&mhi_dev->dev, qdev);
336 ret = qaic_boot_timesync_queue_resp(mhi_dev, qdev);
338 dev_set_drvdata(&mhi_dev->dev, NULL);
340 mhi_unprepare_from_transfer(mhi_dev);
346 static void qaic_boot_timesync_ul_xfer_cb(struct mhi_device *mhi_dev, struct mhi_result *mhi_result)
351 static void qaic_boot_timesync_dl_xfer_cb(struct mhi_device *mhi_dev, struct mhi_result *mhi_result)