Lines Matching refs:rpm_msg
81 struct rpmh_request *rpm_msg = container_of(msg, struct rpmh_request, in rpmh_tx_done() local
83 struct completion *compl = rpm_msg->completion; in rpmh_tx_done()
84 bool free = rpm_msg->needs_free; in rpmh_tx_done()
86 rpm_msg->err = r; in rpmh_tx_done()
89 dev_err(rpm_msg->dev, "RPMH TX fail in msg addr=%#x, err=%d\n", in rpmh_tx_done()
90 rpm_msg->msg.cmds[0].addr, r); in rpmh_tx_done()
100 kfree(rpm_msg); in rpmh_tx_done()
177 struct rpmh_request *rpm_msg) in __rpmh_write() argument
184 rpm_msg->msg.state = state; in __rpmh_write()
187 for (i = 0; i < rpm_msg->msg.num_cmds; i++) { in __rpmh_write()
188 req = cache_rpm_request(ctrlr, state, &rpm_msg->msg.cmds[i]); in __rpmh_write()
193 rpm_msg->msg.state = state; in __rpmh_write()
197 ret = rpmh_rsc_send_data(ctrlr_to_drv(ctrlr), &rpm_msg->msg); in __rpmh_write()
201 rpmh_tx_done(&rpm_msg->msg, ret); in __rpmh_write()
236 struct rpmh_request *rpm_msg; in rpmh_write_async() local
239 rpm_msg = kzalloc(sizeof(*rpm_msg), GFP_ATOMIC); in rpmh_write_async()
240 if (!rpm_msg) in rpmh_write_async()
242 rpm_msg->needs_free = true; in rpmh_write_async()
244 ret = __fill_rpmh_msg(rpm_msg, state, cmd, n); in rpmh_write_async()
246 kfree(rpm_msg); in rpmh_write_async()
250 return __rpmh_write(dev, state, rpm_msg); in rpmh_write_async()
268 DEFINE_RPMH_MSG_ONSTACK(dev, state, &compl, rpm_msg); in rpmh_write()
274 memcpy(rpm_msg.cmd, cmd, n * sizeof(*cmd)); in rpmh_write()
275 rpm_msg.msg.num_cmds = n; in rpmh_write()
277 ret = __rpmh_write(dev, state, &rpm_msg); in rpmh_write()
300 const struct rpmh_request *rpm_msg; in flush_batch() local
307 rpm_msg = req->rpm_msgs + i; in flush_batch()
309 &rpm_msg->msg); in flush_batch()
422 DEFINE_RPMH_MSG_ONSTACK(NULL, state, NULL, rpm_msg); in send_single()
425 rpm_msg.msg.wait_for_compl = (state == RPMH_WAKE_ONLY_STATE); in send_single()
426 rpm_msg.cmd[0].addr = addr; in send_single()
427 rpm_msg.cmd[0].data = data; in send_single()
428 rpm_msg.msg.num_cmds = 1; in send_single()
430 return rpmh_rsc_write_ctrl_data(ctrlr_to_drv(ctrlr), &rpm_msg.msg); in send_single()