Skip to content

Commit 04b31cc

Browse files
Sricharan Ramabadhrandlezcano
authored andcommitted
thermal/drivers/qcom/tsens: Add support for IPQ5018 tsens
IPQ5018 has tsens IP V1.0, 5 sensors of which 4 are in use and 1 interrupt. The IP does not have a RPM, hence use init routine for tsens v1.0 without RPM which does not early enable. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com> Signed-off-by: George Moussalem <george.moussalem@outlook.com> Link: https://lore.kernel.org/r/DS7PR19MB8883BD0E36C08DD1D03CE1CB9DCC2@DS7PR19MB8883.namprd19.prod.outlook.com Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
1 parent 19f9b02 commit 04b31cc

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

drivers/thermal/qcom/tsens-v1.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,3 +242,17 @@ struct tsens_plat_data data_8976 = {
242242
.feat = &tsens_v1_feat,
243243
.fields = tsens_v1_regfields,
244244
};
245+
246+
const struct tsens_ops ops_ipq5018 = {
247+
.init = init_tsens_v1_no_rpm,
248+
.calibrate = tsens_calibrate_common,
249+
.get_temp = get_temp_tsens_valid,
250+
};
251+
252+
const struct tsens_plat_data data_ipq5018 = {
253+
.num_sensors = 5,
254+
.ops = &ops_ipq5018,
255+
.hw_ids = (unsigned int []){0, 1, 2, 3, 4},
256+
.feat = &tsens_v1_no_rpm_feat,
257+
.fields = tsens_v1_regfields,
258+
};

drivers/thermal/qcom/tsens.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,9 @@ static SIMPLE_DEV_PM_OPS(tsens_pm_ops, tsens_suspend, tsens_resume);
11081108

11091109
static const struct of_device_id tsens_table[] = {
11101110
{
1111+
.compatible = "qcom,ipq5018-tsens",
1112+
.data = &data_ipq5018,
1113+
}, {
11111114
.compatible = "qcom,ipq5332-tsens",
11121115
.data = &data_ipq5332,
11131116
}, {

drivers/thermal/qcom/tsens.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,9 @@ extern struct tsens_plat_data data_8226, data_8909, data_8916, data_8939, data_8
652652
/* TSENS v1 targets */
653653
extern struct tsens_plat_data data_tsens_v1, data_8937, data_8976, data_8956;
654654

655+
/* TSENS v1 with no RPM targets */
656+
extern const struct tsens_plat_data data_ipq5018;
657+
655658
/* TSENS v2 targets */
656659
extern struct tsens_plat_data data_8996, data_ipq8074, data_tsens_v2;
657660
extern const struct tsens_plat_data data_ipq5332, data_ipq5424;

0 commit comments

Comments
 (0)