From 8cc3407beb21492334de9a0241b6f869816d6489 Mon Sep 17 00:00:00 2001 From: Ram Chandrasekar Date: Mon, 20 Apr 2020 13:48:02 -0700 Subject: [PATCH 1/2] dt-bindings: thermal: Add support for mmw ADC thermistors Add new devicetree macros for the mmw ADC thermistors. The support includes for the sensors mmw_pa1, mmw_pa2, mmw_pa3, and sdr_mmw_therm. Change-Id: I2e4e273bf438483f31700daf91defc6121439c52 Signed-off-by: Ram Chandrasekar --- include/dt-bindings/thermal/thermal_qti.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/dt-bindings/thermal/thermal_qti.h b/include/dt-bindings/thermal/thermal_qti.h index 9683fb645acc..f38bcd5f1e38 100644 --- a/include/dt-bindings/thermal/thermal_qti.h +++ b/include/dt-bindings/thermal/thermal_qti.h @@ -37,6 +37,10 @@ #define QMI_SYS_THERM_1 23 #define QMI_SYS_THERM_2 24 #define QMI_MODEM_TSENS_1 25 +#define QMI_MMW_PA1 26 +#define QMI_MMW_PA2 27 +#define QMI_MMW_PA3 28 +#define QMI_SDR_MMW 29 #define QMI_MODEM_INST_ID 0x0 #define QMI_ADSP_INST_ID 0x1 From 7908f9107541c5416ca7c685a81ce51ec4333726 Mon Sep 17 00:00:00 2001 From: Ram Chandrasekar Date: Mon, 20 Apr 2020 11:24:22 -0700 Subject: [PATCH 2/2] drivers: qmi_sensor: Add support for mmw ADC thermistors Add support for the new mmw related ADC thermistor support. The support includes for the qmi sensors mmw_pa1, mmw_pa2, mmw_pa3, and sdr_mmw_therm. Change-Id: I07267b84d4287ac04824697b14f8355cfae47dfd Signed-off-by: Ram Chandrasekar --- drivers/thermal/qcom/qmi_sensors.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/qcom/qmi_sensors.c b/drivers/thermal/qcom/qmi_sensors.c index 92e039a850af..cb9407cd153b 100644 --- a/drivers/thermal/qcom/qmi_sensors.c +++ b/drivers/thermal/qcom/qmi_sensors.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. */ #define pr_fmt(fmt) "%s:%s " fmt, KBUILD_MODNAME, __func__ @@ -56,6 +56,10 @@ enum qmi_ts_sensor { QMI_SYS_THERM1, QMI_SYS_THERM2, QMI_TS_TSENS_1, + QMI_TS_MMW_PA1, + QMI_TS_MMW_PA2, + QMI_TS_MMW_PA3, + QMI_TS_SDR_MMW, QMI_TS_MAX_NR }; @@ -113,6 +117,10 @@ static char sensor_clients[QMI_TS_MAX_NR][QMI_CLIENT_NAME_LENGTH] = { {"sys_therm1"}, {"sys_therm2"}, {"modem_tsens1"}, + {"mmw_pa1"}, + {"mmw_pa2"}, + {"mmw_pa3"}, + {"sdr_mmw_therm"}, }; static int32_t encode_qmi(int32_t val)