Loading Documentation/devicetree/bindings/thermal/tsens.txt +2 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,8 @@ Required properties: should be "qcom,tsens24xx" for 2.4 TSENS controller. should be "qcom,msm8937-tsens" for 8937 TSENS driver. should be "qcom,qcs405-tsens" for QCS405 TSENS driver. should be "qcom,sdm640-tsens" for 640 TSENS driver. The compatible property is used to identify the respective controller to use for the corresponding SoC. - reg : offset and length of the TSENS registers with associated property in reg-names Loading drivers/thermal/msm-tsens.c +3 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,9 @@ static const struct of_device_id tsens_table[] = { { .compatible = "qcom,sdm630-tsens", .data = &data_tsens23xx, }, { .compatible = "qcom,sdm640-tsens", .data = &data_tsens23xx, }, { .compatible = "qcom,sdm845-tsens", .data = &data_tsens24xx, }, Loading drivers/thermal/tsens.h +2 −0 Original line number Diff line number Diff line Loading @@ -131,6 +131,8 @@ struct tsens_data { u32 wd_bark_mask; bool mtc; bool valid_status_check; u32 ver_major; u32 ver_minor; }; struct tsens_mtc_sysfs { Loading drivers/thermal/tsens2xxx.c +7 −1 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ #define TSENS_TM_SCALE_DECI_MILLIDEG 100 #define TSENS_DEBUG_WDOG_TRIGGER_COUNT 5 #define TSENS_TM_WATCHDOG_LOG(n) ((n) + 0x13c) #define TSENS_TM_WATCHDOG_LOG_v23(n) ((n) + 0x170) #define TSENS_EN BIT(0) #define TSENS_CTRL_SENSOR_EN_MASK(n) ((n >> 3) & 0xffff) #define TSENS_TM_TRDY(n) ((n) + 0xe4) Loading Loading @@ -321,6 +322,9 @@ static irqreturn_t tsens_tm_critical_irq_thread(int irq, void *data) TSENS_TM_SN_CRITICAL_THRESHOLD(tm->tsens_tm_addr); wd_critical_addr = TSENS_TM_CRITICAL_INT_STATUS(tm->tsens_tm_addr); if (tm->ctrl_data->ver_major == 2 && tm->ctrl_data->ver_minor == 3) wd_log_addr = TSENS_TM_WATCHDOG_LOG_v23(tm->tsens_tm_addr); else wd_log_addr = TSENS_TM_WATCHDOG_LOG(tm->tsens_tm_addr); if (tm->ctrl_data->wd_bark) { Loading Loading @@ -643,6 +647,8 @@ const struct tsens_data data_tsens23xx = { .wd_bark_mask = 1, .ops = &ops_tsens2xxx, .mtc = false, .ver_major = 2, .ver_minor = 3, }; const struct tsens_data data_tsens24xx = { Loading Loading
Documentation/devicetree/bindings/thermal/tsens.txt +2 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,8 @@ Required properties: should be "qcom,tsens24xx" for 2.4 TSENS controller. should be "qcom,msm8937-tsens" for 8937 TSENS driver. should be "qcom,qcs405-tsens" for QCS405 TSENS driver. should be "qcom,sdm640-tsens" for 640 TSENS driver. The compatible property is used to identify the respective controller to use for the corresponding SoC. - reg : offset and length of the TSENS registers with associated property in reg-names Loading
drivers/thermal/msm-tsens.c +3 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,9 @@ static const struct of_device_id tsens_table[] = { { .compatible = "qcom,sdm630-tsens", .data = &data_tsens23xx, }, { .compatible = "qcom,sdm640-tsens", .data = &data_tsens23xx, }, { .compatible = "qcom,sdm845-tsens", .data = &data_tsens24xx, }, Loading
drivers/thermal/tsens.h +2 −0 Original line number Diff line number Diff line Loading @@ -131,6 +131,8 @@ struct tsens_data { u32 wd_bark_mask; bool mtc; bool valid_status_check; u32 ver_major; u32 ver_minor; }; struct tsens_mtc_sysfs { Loading
drivers/thermal/tsens2xxx.c +7 −1 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ #define TSENS_TM_SCALE_DECI_MILLIDEG 100 #define TSENS_DEBUG_WDOG_TRIGGER_COUNT 5 #define TSENS_TM_WATCHDOG_LOG(n) ((n) + 0x13c) #define TSENS_TM_WATCHDOG_LOG_v23(n) ((n) + 0x170) #define TSENS_EN BIT(0) #define TSENS_CTRL_SENSOR_EN_MASK(n) ((n >> 3) & 0xffff) #define TSENS_TM_TRDY(n) ((n) + 0xe4) Loading Loading @@ -321,6 +322,9 @@ static irqreturn_t tsens_tm_critical_irq_thread(int irq, void *data) TSENS_TM_SN_CRITICAL_THRESHOLD(tm->tsens_tm_addr); wd_critical_addr = TSENS_TM_CRITICAL_INT_STATUS(tm->tsens_tm_addr); if (tm->ctrl_data->ver_major == 2 && tm->ctrl_data->ver_minor == 3) wd_log_addr = TSENS_TM_WATCHDOG_LOG_v23(tm->tsens_tm_addr); else wd_log_addr = TSENS_TM_WATCHDOG_LOG(tm->tsens_tm_addr); if (tm->ctrl_data->wd_bark) { Loading Loading @@ -643,6 +647,8 @@ const struct tsens_data data_tsens23xx = { .wd_bark_mask = 1, .ops = &ops_tsens2xxx, .mtc = false, .ver_major = 2, .ver_minor = 3, }; const struct tsens_data data_tsens24xx = { Loading