qcom,mx-restriction-temp and qcom,mx-restriction-temp-hysteresis
should also be present. Also, if this property is defined, will
have to define vdd-cx-supply = <&phandle_of_regulator>.
+- qcom,mx-restriction-sensor_id: sensor id, which needs to be monitored for requesting MX/CX
+ retention voltage. If this optional property is defined, msm_thermal
+ will monitor only this sensor, otherwise by default it will monitor
+ all TSENS for this feature. If this property exists, then the properties,
+ qcom,mx-restriction-temp, qcom,mx-restriction-temp-hysteresis and
+ qcom,mx-retention-min should also be defined to enable this feature.
- qcom,therm-reset-temp: Degree above which the KTM will initiate a secure watchdog reset.
When this property is defined, KTM will monitor all the tsens from
boot time and will initiate a secure watchdog reset if any of the
qcom,mx-restriction-temp = <5>;
qcom,mx-restriction-temp-hysteresis = <10>;
qcom,mx-retention-min = <710000>;
+ qcom,mx-restriction-sensor_id = <2>;
vdd-mx-supply = <&pma8084_s1>;
qcom,cx-retention-min = <RPM_SMD_REGULATOR_LEVEL_RETENTION_PLUS>;
vdd-cx-supply = <&pmd9635_s5_level>;
if (ret)
goto read_node_done;
+ /*
+ * Monitor only this sensor if defined, otherwise monitor all tsens
+ */
+ key = "qcom,mx-restriction-sensor_id";
+ if (of_property_read_u32(node, key, &data->vdd_mx_sensor_id))
+ data->vdd_mx_sensor_id = MONITOR_ALL_TSENS;
+
vdd_mx = devm_regulator_get(&pdev->dev, "vdd-mx");
if (IS_ERR_OR_NULL(vdd_mx)) {
ret = PTR_ERR(vdd_mx);
}
ret = sensor_mgr_init_threshold(&thresh[MSM_VDD_MX_RESTRICTION],
- MONITOR_ALL_TSENS,
+ data->vdd_mx_sensor_id,
data->vdd_mx_temp_degC + data->vdd_mx_temp_hyst_degC,
data->vdd_mx_temp_degC, vdd_mx_notify);
if (vdd_cx)
seq_printf(m, "cx retention value:%d\n",
msm_thermal_info.vdd_cx_min);
+ if (msm_thermal_info.vdd_mx_sensor_id != MONITOR_ALL_TSENS)
+ seq_printf(m, "tsens sensor:tsens_tz_sensor%d\n",
+ msm_thermal_info.vdd_mx_sensor_id);
}
}