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

Commit 5784e732 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: thermal: Use thermal-core framework to get temp on post boot"

parents a4ff7275 63828977
Loading
Loading
Loading
Loading
+12 −10
Original line number Diff line number Diff line
@@ -1027,24 +1027,26 @@ static int therm_get_temp(uint32_t id, enum sensor_id_type type, long *temp)

	switch (type) {
	case THERM_ZONE_ID:
		tsens_dev.sensor_num = tsens_id_map[id];
		ret = sensor_get_temp(id, temp);
		if (ret) {
			pr_err("Unable to read thermal zone sensor:%d\n", id);
			goto get_temp_exit;
		}
		break;
	case THERM_TSENS_ID:
		tsens_dev.sensor_num = id;
		break;
	default:
		pr_err("Invalid type\n");
		ret = -EINVAL;
		goto get_temp_exit;
		break;
	}

		ret = tsens_get_temp(&tsens_dev, temp);
		if (ret) {
			pr_err("Unable to read TSENS sensor:%d\n",
				tsens_dev.sensor_num);
			goto get_temp_exit;
		}
		break;
	default:
		pr_err("Invalid type\n");
		ret = -EINVAL;
		goto get_temp_exit;
	}

get_temp_exit:
	return ret;
@@ -1056,7 +1058,7 @@ static int set_threshold(uint32_t zone_id,
	int i = 0, ret = 0;
	long temp;

	if ((!threshold) || (zone_id >= max_tsens_num)) {
	if (!threshold) {
		pr_err("Invalid input\n");
		ret = -EINVAL;
		goto set_threshold_exit;