Lines Matching full:rpm

15 #include <linux/soc/qcom/smd-rpm.h>
20 * struct qcom_smd_rpm - state of the rpm device driver
23 * @dev: rpm device
26 * @ack_status: result of the rpm request
39 * struct qcom_rpm_header - header for all rpm requests and responses
49 * struct qcom_rpm_request - request message to the rpm
65 * struct qcom_rpm_message - response message from the rpm
69 * @message: textual message from the rpm
71 * Multiple of these messages can be stacked in an rpm message.
89 * @rpm: rpm handle
96 int qcom_rpm_smd_write(struct qcom_smd_rpm *rpm, in qcom_rpm_smd_write() argument
112 /* SMD packets to the RPM may not exceed 256 bytes */ in qcom_rpm_smd_write()
120 mutex_lock(&rpm->lock); in qcom_rpm_smd_write()
132 ret = rpmsg_send(rpm->rpm_channel, pkt, size); in qcom_rpm_smd_write()
136 left = wait_for_completion_timeout(&rpm->ack, RPM_REQUEST_TIMEOUT); in qcom_rpm_smd_write()
140 ret = rpm->ack_status; in qcom_rpm_smd_write()
144 mutex_unlock(&rpm->lock); in qcom_rpm_smd_write()
158 struct qcom_smd_rpm *rpm = dev_get_drvdata(&rpdev->dev); in qcom_smd_rpm_callback() local
167 dev_err(rpm->dev, "invalid request\n"); in qcom_smd_rpm_callback()
192 rpm->ack_status = status; in qcom_smd_rpm_callback()
193 complete(&rpm->ack); in qcom_smd_rpm_callback()
199 struct qcom_smd_rpm *rpm; in qcom_smd_rpm_probe() local
202 rpm = devm_kzalloc(&rpdev->dev, sizeof(*rpm), GFP_KERNEL); in qcom_smd_rpm_probe()
203 if (!rpm) in qcom_smd_rpm_probe()
206 mutex_init(&rpm->lock); in qcom_smd_rpm_probe()
207 init_completion(&rpm->ack); in qcom_smd_rpm_probe()
209 rpm->dev = &rpdev->dev; in qcom_smd_rpm_probe()
210 rpm->rpm_channel = rpdev->ept; in qcom_smd_rpm_probe()
211 dev_set_drvdata(&rpdev->dev, rpm); in qcom_smd_rpm_probe()
213 rpm->icc = platform_device_register_data(&rpdev->dev, "icc_smd_rpm", -1, in qcom_smd_rpm_probe()
215 if (IS_ERR(rpm->icc)) in qcom_smd_rpm_probe()
216 return PTR_ERR(rpm->icc); in qcom_smd_rpm_probe()
220 platform_device_unregister(rpm->icc); in qcom_smd_rpm_probe()
227 struct qcom_smd_rpm *rpm = dev_get_drvdata(&rpdev->dev); in qcom_smd_rpm_remove() local
229 platform_device_unregister(rpm->icc); in qcom_smd_rpm_remove()
234 { .compatible = "qcom,rpm-apq8084" },
235 { .compatible = "qcom,rpm-ipq6018" },
236 { .compatible = "qcom,rpm-msm8916" },
237 { .compatible = "qcom,rpm-msm8936" },
238 { .compatible = "qcom,rpm-msm8974" },
239 { .compatible = "qcom,rpm-msm8976" },
240 { .compatible = "qcom,rpm-msm8994" },
241 { .compatible = "qcom,rpm-msm8996" },
242 { .compatible = "qcom,rpm-msm8998" },
243 { .compatible = "qcom,rpm-sdm660" },
244 { .compatible = "qcom,rpm-qcs404" },
272 MODULE_DESCRIPTION("Qualcomm SMD backed RPM driver");