Loading Documentation/devicetree/bindings/thermal/tsens.txt +1 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ Required properties: should be "qcom,msmtitanium-tsens" for titanium TSENS driver. should be "qcom,msm8937-tsens" for 8937 TSENS driver. should be "qcom,msmgold-tsens" for gold TSENS driver. should be "qcom,msmcobalt-tsens" for cobalt TSENS driver. The compatible property is used to identify the respective fusemap to use for the corresponding SoC. - reg : offset and length of the TSENS registers. Loading drivers/thermal/msm-tsens.c +13 −5 Original line number Diff line number Diff line /* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2016, 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 @@ -929,6 +929,9 @@ static struct of_device_id tsens_match[] = { { .compatible = "qcom,msmgold-tsens", .data = (void *)TSENS_CALIB_FUSE_MAP_MSMGOLD, }, { .compatible = "qcom,msmcobalt-tsens", .data = (void *)TSENS_CALIB_FUSE_MAP_NONE, }, {} }; Loading Loading @@ -972,7 +975,8 @@ static int32_t get_tsens_sensor_for_client_id(struct tsens_tm_device *tmdev, return -ENODEV; } if (!strcmp(id->compatible, "qcom,msm8996-tsens")) { if (!strcmp(id->compatible, "qcom,msm8996-tsens") || (!strcmp(id->compatible, "qcom,msmcobalt-tsens"))) { while (i < tmdev->tsens_num_sensor && !id_found) { if (tmdev->sensor[i].sensor_client_id == sensor_client_id) { Loading Loading @@ -1091,7 +1095,8 @@ int tsens_get_hw_id_mapping(int sensor_sw_id, int *sensor_client_id) return -ENODEV; } if (!strcmp(id->compatible, "qcom,msm8996-tsens")) { if (!strcmp(id->compatible, "qcom,msm8996-tsens") || (!strcmp(id->compatible, "qcom,msmcobalt-tsens"))) { /* Assign a client id which will be used to get the * controller and hw_sensor details */ Loading Loading @@ -5459,7 +5464,8 @@ static int get_device_tree_data(struct platform_device *pdev, tmdev->tsens_type = TSENS_TYPE2; else if (!strcmp(id->compatible, "qcom,msm8996-tsens")) tmdev->tsens_type = TSENS_TYPE3; else if (!strcmp(id->compatible, "qcom,msmtitanium-tsens")) { else if (!strcmp(id->compatible, "qcom,msmtitanium-tsens") || (!strcmp(id->compatible, "qcom,msmcobalt-tsens"))) { tmdev->tsens_type = TSENS_TYPE3; tsens_poll_check = 0; } else if (!strcmp(id->compatible, "qcom,msm8952-tsens") || Loading @@ -5478,7 +5484,8 @@ static int get_device_tree_data(struct platform_device *pdev, (!strcmp(id->compatible, "qcom,msm8996-tsens")) || (!strcmp(id->compatible, "qcom,msm8952-tsens")) || (!strcmp(id->compatible, "qcom,msm8937-tsens")) || (!strcmp(id->compatible, "qcom,msmtitanium-tsens"))) (!strcmp(id->compatible, "qcom,msmtitanium-tsens")) || (!strcmp(id->compatible, "qcom,msmcobalt-tsens"))) tmdev->tsens_valid_status_check = true; } Loading @@ -5491,6 +5498,7 @@ static int get_device_tree_data(struct platform_device *pdev, } if (!strcmp(id->compatible, "qcom,msm8996-tsens") || (!strcmp(id->compatible, "qcom,msmcobalt-tsens")) || (!strcmp(id->compatible, "qcom,msmtitanium-tsens"))) { tmdev->tsens_critical_irq = platform_get_irq_byname(pdev, Loading Loading
Documentation/devicetree/bindings/thermal/tsens.txt +1 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ Required properties: should be "qcom,msmtitanium-tsens" for titanium TSENS driver. should be "qcom,msm8937-tsens" for 8937 TSENS driver. should be "qcom,msmgold-tsens" for gold TSENS driver. should be "qcom,msmcobalt-tsens" for cobalt TSENS driver. The compatible property is used to identify the respective fusemap to use for the corresponding SoC. - reg : offset and length of the TSENS registers. Loading
drivers/thermal/msm-tsens.c +13 −5 Original line number Diff line number Diff line /* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2016, 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 @@ -929,6 +929,9 @@ static struct of_device_id tsens_match[] = { { .compatible = "qcom,msmgold-tsens", .data = (void *)TSENS_CALIB_FUSE_MAP_MSMGOLD, }, { .compatible = "qcom,msmcobalt-tsens", .data = (void *)TSENS_CALIB_FUSE_MAP_NONE, }, {} }; Loading Loading @@ -972,7 +975,8 @@ static int32_t get_tsens_sensor_for_client_id(struct tsens_tm_device *tmdev, return -ENODEV; } if (!strcmp(id->compatible, "qcom,msm8996-tsens")) { if (!strcmp(id->compatible, "qcom,msm8996-tsens") || (!strcmp(id->compatible, "qcom,msmcobalt-tsens"))) { while (i < tmdev->tsens_num_sensor && !id_found) { if (tmdev->sensor[i].sensor_client_id == sensor_client_id) { Loading Loading @@ -1091,7 +1095,8 @@ int tsens_get_hw_id_mapping(int sensor_sw_id, int *sensor_client_id) return -ENODEV; } if (!strcmp(id->compatible, "qcom,msm8996-tsens")) { if (!strcmp(id->compatible, "qcom,msm8996-tsens") || (!strcmp(id->compatible, "qcom,msmcobalt-tsens"))) { /* Assign a client id which will be used to get the * controller and hw_sensor details */ Loading Loading @@ -5459,7 +5464,8 @@ static int get_device_tree_data(struct platform_device *pdev, tmdev->tsens_type = TSENS_TYPE2; else if (!strcmp(id->compatible, "qcom,msm8996-tsens")) tmdev->tsens_type = TSENS_TYPE3; else if (!strcmp(id->compatible, "qcom,msmtitanium-tsens")) { else if (!strcmp(id->compatible, "qcom,msmtitanium-tsens") || (!strcmp(id->compatible, "qcom,msmcobalt-tsens"))) { tmdev->tsens_type = TSENS_TYPE3; tsens_poll_check = 0; } else if (!strcmp(id->compatible, "qcom,msm8952-tsens") || Loading @@ -5478,7 +5484,8 @@ static int get_device_tree_data(struct platform_device *pdev, (!strcmp(id->compatible, "qcom,msm8996-tsens")) || (!strcmp(id->compatible, "qcom,msm8952-tsens")) || (!strcmp(id->compatible, "qcom,msm8937-tsens")) || (!strcmp(id->compatible, "qcom,msmtitanium-tsens"))) (!strcmp(id->compatible, "qcom,msmtitanium-tsens")) || (!strcmp(id->compatible, "qcom,msmcobalt-tsens"))) tmdev->tsens_valid_status_check = true; } Loading @@ -5491,6 +5498,7 @@ static int get_device_tree_data(struct platform_device *pdev, } if (!strcmp(id->compatible, "qcom,msm8996-tsens") || (!strcmp(id->compatible, "qcom,msmcobalt-tsens")) || (!strcmp(id->compatible, "qcom,msmtitanium-tsens"))) { tmdev->tsens_critical_irq = platform_get_irq_byname(pdev, Loading