Lines Matching defs:rpm
15 #include <linux/soc/qcom/smd-rpm.h>
20 * struct qcom_smd_rpm - state of the rpm device driver
22 * @dev: rpm device
25 * @ack_status: result of the rpm request
37 * struct qcom_rpm_header - header for all rpm requests and responses
47 * struct qcom_rpm_request - request message to the rpm
63 * struct qcom_rpm_message - response message from the rpm
67 * @message: textual message from the rpm
69 * Multiple of these messages can be stacked in an rpm message.
87 * @rpm: rpm handle
94 int qcom_rpm_smd_write(struct qcom_smd_rpm *rpm,
118 mutex_lock(&rpm->lock);
130 ret = rpmsg_send(rpm->rpm_channel, pkt, size);
134 left = wait_for_completion_timeout(&rpm->ack, RPM_REQUEST_TIMEOUT);
138 ret = rpm->ack_status;
142 mutex_unlock(&rpm->lock);
156 struct qcom_smd_rpm *rpm = dev_get_drvdata(&rpdev->dev);
165 dev_err(rpm->dev, "invalid request\n");
190 rpm->ack_status = status;
191 complete(&rpm->ack);
197 struct qcom_smd_rpm *rpm;
202 rpm = devm_kzalloc(&rpdev->dev, sizeof(*rpm), GFP_KERNEL);
203 if (!rpm)
206 mutex_init(&rpm->lock);
207 init_completion(&rpm->ack);
209 rpm->dev = &rpdev->dev;
210 rpm->rpm_channel = rpdev->ept;
211 dev_set_drvdata(&rpdev->dev, rpm);