Lines Matching refs:rpm
96 int qcom_rpm_smd_write(struct qcom_smd_rpm *rpm, in qcom_rpm_smd_write() argument
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()