Lines Matching refs:cinfo
276 static void scmi_handle_notification(struct scmi_chan_info *cinfo, u32 msg_hdr) in scmi_handle_notification() argument
279 struct device *dev = cinfo->dev; in scmi_handle_notification()
280 struct scmi_info *info = handle_to_scmi_info(cinfo->handle); in scmi_handle_notification()
285 xfer = scmi_xfer_get(cinfo->handle, minfo); in scmi_handle_notification()
289 info->desc->ops->clear_channel(cinfo); in scmi_handle_notification()
295 info->desc->ops->fetch_notification(cinfo, info->desc->max_msg_size, in scmi_handle_notification()
297 scmi_notify(cinfo->handle, xfer->hdr.protocol_id, in scmi_handle_notification()
306 info->desc->ops->clear_channel(cinfo); in scmi_handle_notification()
309 static void scmi_handle_response(struct scmi_chan_info *cinfo, in scmi_handle_response() argument
313 struct device *dev = cinfo->dev; in scmi_handle_response()
314 struct scmi_info *info = handle_to_scmi_info(cinfo->handle); in scmi_handle_response()
320 info->desc->ops->clear_channel(cinfo); in scmi_handle_response()
335 info->desc->ops->clear_channel(cinfo); in scmi_handle_response()
347 info->desc->ops->fetch_response(cinfo, xfer); in scmi_handle_response()
354 info->desc->ops->clear_channel(cinfo); in scmi_handle_response()
373 void scmi_rx_callback(struct scmi_chan_info *cinfo, u32 msg_hdr) in scmi_rx_callback() argument
380 scmi_handle_notification(cinfo, msg_hdr); in scmi_rx_callback()
384 scmi_handle_response(cinfo, xfer_id, msg_type); in scmi_rx_callback()
409 static bool scmi_xfer_done_no_timeout(struct scmi_chan_info *cinfo, in scmi_xfer_done_no_timeout() argument
412 struct scmi_info *info = handle_to_scmi_info(cinfo->handle); in scmi_xfer_done_no_timeout()
414 return info->desc->ops->poll_done(cinfo, xfer) || in scmi_xfer_done_no_timeout()
436 struct scmi_chan_info *cinfo; in do_xfer() local
445 cinfo = idr_find(&info->tx_idr, xfer->hdr.protocol_id); in do_xfer()
446 if (unlikely(!cinfo)) in do_xfer()
453 ret = info->desc->ops->send_message(cinfo, xfer); in do_xfer()
462 spin_until_cond(scmi_xfer_done_no_timeout(cinfo, xfer, stop)); in do_xfer()
465 info->desc->ops->fetch_response(cinfo, xfer); in do_xfer()
483 info->desc->ops->mark_txdone(cinfo, ret); in do_xfer()
1084 struct scmi_chan_info *cinfo; in scmi_chan_setup() local
1092 cinfo = idr_find(idr, prot_id); in scmi_chan_setup()
1093 if (cinfo) in scmi_chan_setup()
1097 cinfo = idr_find(idr, SCMI_PROTOCOL_BASE); in scmi_chan_setup()
1098 if (unlikely(!cinfo)) /* Possible only if platform has no Rx */ in scmi_chan_setup()
1103 cinfo = devm_kzalloc(info->dev, sizeof(*cinfo), GFP_KERNEL); in scmi_chan_setup()
1104 if (!cinfo) in scmi_chan_setup()
1107 cinfo->dev = dev; in scmi_chan_setup()
1109 ret = info->desc->ops->chan_setup(cinfo, info->dev, tx); in scmi_chan_setup()
1114 ret = idr_alloc(idr, cinfo, prot_id, prot_id + 1, GFP_KERNEL); in scmi_chan_setup()
1120 cinfo->handle = &info->handle; in scmi_chan_setup()
1518 void scmi_free_channel(struct scmi_chan_info *cinfo, struct idr *idr, int id) in scmi_free_channel() argument