Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 26bf73e4 authored by Ram Chandrasekar's avatar Ram Chandrasekar
Browse files

drivers: thermal: qmi_cooling: Pass timeout in jiffies



QMI transaction timeout expectes timeout value in jiffies. So convert
the timeout value in milli-seconds to jiffies before passing it to the
QMI call.

Change-Id: I333d8f84624e8cedbee2f12c0120235ca03bd354
Signed-off-by: default avatarRam Chandrasekar <rkumbako@codeaurora.org>
parent 0bea22ac
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@
#include "thermal_mitigation_device_service_v01.h"

#define QMI_CDEV_DRIVER		"qmi-cooling-device"
#define QMI_TMD_RESP_TOUT_MSEC	50
#define QMI_TMD_RESP_TOUT	msecs_to_jiffies(100)
#define QMI_CLIENT_NAME_LENGTH	40

enum qmi_device_type {
@@ -166,7 +166,7 @@ static int qmi_tmd_send_state_request(struct qmi_cooling_device *qmi_cdev,
		goto qmi_send_exit;
	}

	ret = qmi_txn_wait(&txn, QMI_TMD_RESP_TOUT_MSEC);
	ret = qmi_txn_wait(&txn, QMI_TMD_RESP_TOUT);
	if (ret < 0) {
		pr_err("qmi set state:%d txn wait failed for %s ret:%d\n",
			state, qmi_cdev->cdev_name, ret);
@@ -324,7 +324,7 @@ static int verify_devices_and_register(struct qmi_tmd_instance *tmd)
		goto reg_exit;
	}

	ret = qmi_txn_wait(&txn, QMI_TMD_RESP_TOUT_MSEC);
	ret = qmi_txn_wait(&txn, QMI_TMD_RESP_TOUT);
	if (ret < 0) {
		pr_err("Transaction wait error for inst_id:0x%x ret:%d\n",
			tmd->inst_id, ret);