Loading Documentation/devicetree/bindings/thermal/qti-qmi-sensor.txt +6 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,12 @@ Subsystem properties: 24. sys_therm1 25. sys_therm2 26. modem_tsens1 27. qfe_ret_pa0_fr1 28. qfe_wtr_pa0_fr1 29. qfe_wtr_pa1_fr1 30. qfe_wtr_pa2_fr1 31. qfe_wtr_pa3_fr1 Example: Loading arch/arm64/boot/dts/qcom/sdxprairie-thermal-common.dtsi +167 −2 Original line number Diff line number Diff line /* Copyright (c) 2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -128,7 +128,12 @@ "qfe_wtr_pa3", "sys_therm1", "sys_therm2", "modem_tsens1"; "modem_tsens1", "qfe_ret_pa0_fr1", "qfe_wtr_pa0_fr1", "qfe_wtr_pa1_fr1", "qfe_wtr_pa2_fr1", "qfe_wtr_pa3_fr1"; }; }; }; Loading Loading @@ -389,4 +394,164 @@ }; }; }; modem-ret-0-usr { polling-delay-passive = <0>; polling-delay = <0>; thermal-governor = "user_space"; thermal-sensors = <&qmi_sensor (QMI_MODEM_NR_INST_ID+QMI_QFE_RET_PA_0)>; wake-capable-sensor; trips { active-config0 { temperature = <125000>; hysteresis = <1000>; type = "passive"; }; }; }; modem-wtr-0-usr { polling-delay-passive = <0>; polling-delay = <0>; thermal-governor = "user_space"; thermal-sensors = <&qmi_sensor (QMI_MODEM_NR_INST_ID+QMI_QFE_WTR_PA_0)>; wake-capable-sensor; trips { active-config0 { temperature = <125000>; hysteresis = <1000>; type = "passive"; }; }; }; modem-wtr-1-usr { polling-delay-passive = <0>; polling-delay = <0>; thermal-governor = "user_space"; thermal-sensors = <&qmi_sensor (QMI_MODEM_NR_INST_ID+QMI_QFE_WTR_PA_1)>; wake-capable-sensor; trips { active-config0 { temperature = <125000>; hysteresis = <1000>; type = "passive"; }; }; }; modem-wtr-2-usr { polling-delay-passive = <0>; polling-delay = <0>; thermal-governor = "user_space"; thermal-sensors = <&qmi_sensor (QMI_MODEM_NR_INST_ID+QMI_QFE_WTR_PA_2)>; wake-capable-sensor; trips { active-config0 { temperature = <125000>; hysteresis = <1000>; type = "passive"; }; }; }; modem-wtr-3-usr { polling-delay-passive = <0>; polling-delay = <0>; thermal-governor = "user_space"; thermal-sensors = <&qmi_sensor (QMI_MODEM_NR_INST_ID+QMI_QFE_WTR_PA_3)>; wake-capable-sensor; trips { active-config0 { temperature = <125000>; hysteresis = <1000>; type = "passive"; }; }; }; modem-ret-0-fr1-usr { polling-delay-passive = <0>; polling-delay = <0>; thermal-governor = "user_space"; thermal-sensors = <&qmi_sensor (QMI_MODEM_NR_INST_ID+QMI_QFE_RET_PA_0_FR1)>; wake-capable-sensor; trips { active-config0 { temperature = <125000>; hysteresis = <1000>; type = "passive"; }; }; }; modem-wtr-0-fr1-usr { polling-delay-passive = <0>; polling-delay = <0>; thermal-governor = "user_space"; thermal-sensors = <&qmi_sensor (QMI_MODEM_NR_INST_ID+QMI_QFE_WTR_PA_0_FR1)>; wake-capable-sensor; trips { active-config0 { temperature = <125000>; hysteresis = <1000>; type = "passive"; }; }; }; modem-wtr-1-fr1-usr { polling-delay-passive = <0>; polling-delay = <0>; thermal-governor = "user_space"; thermal-sensors = <&qmi_sensor (QMI_MODEM_NR_INST_ID+QMI_QFE_WTR_PA_1_FR1)>; wake-capable-sensor; trips { active-config0 { temperature = <125000>; hysteresis = <1000>; type = "passive"; }; }; }; modem-wtr-2-fr1-usr { polling-delay-passive = <0>; polling-delay = <0>; thermal-governor = "user_space"; thermal-sensors = <&qmi_sensor (QMI_MODEM_NR_INST_ID+QMI_QFE_WTR_PA_2_FR1)>; wake-capable-sensor; trips { active-config0 { temperature = <125000>; hysteresis = <1000>; type = "passive"; }; }; }; modem-wtr-3-fr1-usr { polling-delay-passive = <0>; polling-delay = <0>; thermal-governor = "user_space"; thermal-sensors = <&qmi_sensor (QMI_MODEM_NR_INST_ID+QMI_QFE_WTR_PA_3_FR1)>; wake-capable-sensor; trips { active-config0 { temperature = <125000>; hysteresis = <1000>; type = "passive"; }; }; }; }; drivers/thermal/qcom/qmi_sensors.c +11 −1 Original line number Diff line number Diff line /* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -64,6 +64,11 @@ enum qmi_ts_sensor { QMI_SYS_THERM1, QMI_SYS_THERM2, QMI_TS_TSENS_1, QMI_TS_RET_PA_0_FR1, QMI_TS_WTR_PA_0_FR1, QMI_TS_WTR_PA_1_FR1, QMI_TS_WTR_PA_2_FR1, QMI_TS_WTR_PA_3_FR1, QMI_TS_MAX_NR }; Loading Loading @@ -121,6 +126,11 @@ static char sensor_clients[QMI_TS_MAX_NR][QMI_CLIENT_NAME_LENGTH] = { {"sys_therm1"}, {"sys_therm2"}, {"modem_tsens1"}, {"qfe_ret_pa0_fr1"}, {"qfe_wtr_pa0_fr1"}, {"qfe_wtr_pa1_fr1"}, {"qfe_wtr_pa2_fr1"}, {"qfe_wtr_pa3_fr1"}, }; static int32_t encode_qmi(int32_t val) Loading include/dt-bindings/thermal/qmi_thermal.h +7 −1 Original line number Diff line number Diff line /* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -39,6 +39,12 @@ #define QMI_SYS_THERM_1 23 #define QMI_SYS_THERM_2 24 #define QMI_MODEM_TSENS_1 25 #define QMI_QFE_RET_PA_0_FR1 26 #define QMI_QFE_WTR_PA_0_FR1 27 #define QMI_QFE_WTR_PA_1_FR1 28 #define QMI_QFE_WTR_PA_2_FR1 29 #define QMI_QFE_WTR_PA_3_FR1 30 #define QMI_MODEM_INST_ID 0x0 #define QMI_ADSP_INST_ID 0x1 Loading Loading
Documentation/devicetree/bindings/thermal/qti-qmi-sensor.txt +6 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,12 @@ Subsystem properties: 24. sys_therm1 25. sys_therm2 26. modem_tsens1 27. qfe_ret_pa0_fr1 28. qfe_wtr_pa0_fr1 29. qfe_wtr_pa1_fr1 30. qfe_wtr_pa2_fr1 31. qfe_wtr_pa3_fr1 Example: Loading
arch/arm64/boot/dts/qcom/sdxprairie-thermal-common.dtsi +167 −2 Original line number Diff line number Diff line /* Copyright (c) 2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -128,7 +128,12 @@ "qfe_wtr_pa3", "sys_therm1", "sys_therm2", "modem_tsens1"; "modem_tsens1", "qfe_ret_pa0_fr1", "qfe_wtr_pa0_fr1", "qfe_wtr_pa1_fr1", "qfe_wtr_pa2_fr1", "qfe_wtr_pa3_fr1"; }; }; }; Loading Loading @@ -389,4 +394,164 @@ }; }; }; modem-ret-0-usr { polling-delay-passive = <0>; polling-delay = <0>; thermal-governor = "user_space"; thermal-sensors = <&qmi_sensor (QMI_MODEM_NR_INST_ID+QMI_QFE_RET_PA_0)>; wake-capable-sensor; trips { active-config0 { temperature = <125000>; hysteresis = <1000>; type = "passive"; }; }; }; modem-wtr-0-usr { polling-delay-passive = <0>; polling-delay = <0>; thermal-governor = "user_space"; thermal-sensors = <&qmi_sensor (QMI_MODEM_NR_INST_ID+QMI_QFE_WTR_PA_0)>; wake-capable-sensor; trips { active-config0 { temperature = <125000>; hysteresis = <1000>; type = "passive"; }; }; }; modem-wtr-1-usr { polling-delay-passive = <0>; polling-delay = <0>; thermal-governor = "user_space"; thermal-sensors = <&qmi_sensor (QMI_MODEM_NR_INST_ID+QMI_QFE_WTR_PA_1)>; wake-capable-sensor; trips { active-config0 { temperature = <125000>; hysteresis = <1000>; type = "passive"; }; }; }; modem-wtr-2-usr { polling-delay-passive = <0>; polling-delay = <0>; thermal-governor = "user_space"; thermal-sensors = <&qmi_sensor (QMI_MODEM_NR_INST_ID+QMI_QFE_WTR_PA_2)>; wake-capable-sensor; trips { active-config0 { temperature = <125000>; hysteresis = <1000>; type = "passive"; }; }; }; modem-wtr-3-usr { polling-delay-passive = <0>; polling-delay = <0>; thermal-governor = "user_space"; thermal-sensors = <&qmi_sensor (QMI_MODEM_NR_INST_ID+QMI_QFE_WTR_PA_3)>; wake-capable-sensor; trips { active-config0 { temperature = <125000>; hysteresis = <1000>; type = "passive"; }; }; }; modem-ret-0-fr1-usr { polling-delay-passive = <0>; polling-delay = <0>; thermal-governor = "user_space"; thermal-sensors = <&qmi_sensor (QMI_MODEM_NR_INST_ID+QMI_QFE_RET_PA_0_FR1)>; wake-capable-sensor; trips { active-config0 { temperature = <125000>; hysteresis = <1000>; type = "passive"; }; }; }; modem-wtr-0-fr1-usr { polling-delay-passive = <0>; polling-delay = <0>; thermal-governor = "user_space"; thermal-sensors = <&qmi_sensor (QMI_MODEM_NR_INST_ID+QMI_QFE_WTR_PA_0_FR1)>; wake-capable-sensor; trips { active-config0 { temperature = <125000>; hysteresis = <1000>; type = "passive"; }; }; }; modem-wtr-1-fr1-usr { polling-delay-passive = <0>; polling-delay = <0>; thermal-governor = "user_space"; thermal-sensors = <&qmi_sensor (QMI_MODEM_NR_INST_ID+QMI_QFE_WTR_PA_1_FR1)>; wake-capable-sensor; trips { active-config0 { temperature = <125000>; hysteresis = <1000>; type = "passive"; }; }; }; modem-wtr-2-fr1-usr { polling-delay-passive = <0>; polling-delay = <0>; thermal-governor = "user_space"; thermal-sensors = <&qmi_sensor (QMI_MODEM_NR_INST_ID+QMI_QFE_WTR_PA_2_FR1)>; wake-capable-sensor; trips { active-config0 { temperature = <125000>; hysteresis = <1000>; type = "passive"; }; }; }; modem-wtr-3-fr1-usr { polling-delay-passive = <0>; polling-delay = <0>; thermal-governor = "user_space"; thermal-sensors = <&qmi_sensor (QMI_MODEM_NR_INST_ID+QMI_QFE_WTR_PA_3_FR1)>; wake-capable-sensor; trips { active-config0 { temperature = <125000>; hysteresis = <1000>; type = "passive"; }; }; }; };
drivers/thermal/qcom/qmi_sensors.c +11 −1 Original line number Diff line number Diff line /* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -64,6 +64,11 @@ enum qmi_ts_sensor { QMI_SYS_THERM1, QMI_SYS_THERM2, QMI_TS_TSENS_1, QMI_TS_RET_PA_0_FR1, QMI_TS_WTR_PA_0_FR1, QMI_TS_WTR_PA_1_FR1, QMI_TS_WTR_PA_2_FR1, QMI_TS_WTR_PA_3_FR1, QMI_TS_MAX_NR }; Loading Loading @@ -121,6 +126,11 @@ static char sensor_clients[QMI_TS_MAX_NR][QMI_CLIENT_NAME_LENGTH] = { {"sys_therm1"}, {"sys_therm2"}, {"modem_tsens1"}, {"qfe_ret_pa0_fr1"}, {"qfe_wtr_pa0_fr1"}, {"qfe_wtr_pa1_fr1"}, {"qfe_wtr_pa2_fr1"}, {"qfe_wtr_pa3_fr1"}, }; static int32_t encode_qmi(int32_t val) Loading
include/dt-bindings/thermal/qmi_thermal.h +7 −1 Original line number Diff line number Diff line /* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -39,6 +39,12 @@ #define QMI_SYS_THERM_1 23 #define QMI_SYS_THERM_2 24 #define QMI_MODEM_TSENS_1 25 #define QMI_QFE_RET_PA_0_FR1 26 #define QMI_QFE_WTR_PA_0_FR1 27 #define QMI_QFE_WTR_PA_1_FR1 28 #define QMI_QFE_WTR_PA_2_FR1 29 #define QMI_QFE_WTR_PA_3_FR1 30 #define QMI_MODEM_INST_ID 0x0 #define QMI_ADSP_INST_ID 0x1 Loading