aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal/mtk_thermal.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-01-01thermal: mtk: Cleanup unused definesMatthias Brugger1-8/+1
The mtk_thermal has some defiens which are never used within the driver. This patch delets them. Signed-off-by: Matthias Brugger <mbrugger@suse.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2017-08-31thermal: mediatek: minor mtk_thermal.c cleanupsLouis Yu1-4/+4
Move independent thermal module reset in the beginning. Signed-off-by: Louis Yu <louis.yu@mediatek.com> Reviewed-by: Dawei Chien <dawei.chien@mediatek.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2017-08-31thermal: mediatek: extend calibration data for mt2712 chipLouis Yu1-5/+11
This patch adds support for mt2712 chip thermal calibration data and calculation, and is compatible with the existing chips. Signed-off-by: Louis Yu <louis.yu@mediatek.com> Reviewed-by: Dawei Chien <dawei.chien@mediatek.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2017-08-31thermal: mediatek: add Mediatek thermal driver for mt2712Louis Yu1-4/+66
This patch adds support for mt2712 chip to mtk_thermal, and integrate mt2712 into the same mediatek thermal driver. MT2712 has only 1 bank and 4 sensors. Signed-off-by: Louis Yu <louis.yu@mediatek.com> Reviewed-by: Dawei Chien <dawei.chien@mediatek.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2017-04-23thermal: mt8173: minor mtk_thermal.c cleanupsDawei Chien1-1/+1
If thermal bank with 4 sensors, thermal driver should read TEMP_MSR3. However, currently thermal driver would not read TEMP_MSR3 since mt8173 thermal driver only use 3 sensors on each thermal bank at the same time, so this patch would not effect temperature. Only if mt mt8173 thermal driver use 4 sensors on any thermal bank, would read third sensor two times, and lose fourth sensor of vale. cc: stable@vger.kernel.org Fixes: b7cf0053738c ("thermal: Add Mediatek thermal driver for mt2701.") Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Dawei Chien <dawei.chien@mediatek.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2017-02-18thermal: mtk_thermal: Staticise a number of data variablesVivek Gautam1-8/+8
Sparse throws following warnings: drivers/thermal/mtk_thermal.c:186:11: warning: symbol 'mt8173_bank_data' was not declared. Should it be static? drivers/thermal/mtk_thermal.c:193:11: warning: symbol 'mt8173_msr' was not declared. Should it be static? drivers/thermal/mtk_thermal.c:197:11: warning: symbol 'mt8173_adcpnp' was not declared. Should it be static? drivers/thermal/mtk_thermal.c:201:11: warning: symbol 'mt8173_mux_values' was not declared. Should it be static? drivers/thermal/mtk_thermal.c:204:11: warning: symbol 'mt2701_bank_data' was not declared. Should it be static? drivers/thermal/mtk_thermal.c:208:11: warning: symbol 'mt2701_msr' was not declared. Should it be static? drivers/thermal/mtk_thermal.c:212:11: warning: symbol 'mt2701_adcpnp' was not declared. Should it be static? drivers/thermal/mtk_thermal.c:216:11: warning: symbol 'mt2701_mux_values' was not declared. Should it be static? Make these variables as static to fix these warnings. Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2016-09-27thermal: mtk_thermal: Check return value of devm_thermal_zone_of_sensor_registerAxel Lin1-2/+9
devm_thermal_zone_of_sensor_register can fail, so check it's return value. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2016-09-27thermal: Add Mediatek thermal driver for mt2701.dawei.chien@mediatek.com1-63/+152
This patch adds support for mt2701 chip to mtk_thermal, and integrate both mt8173 and mt2701 on the same driver. MT8173 has four banks and five sensors, and MT2701 has only one bank and three sensors. Signed-off-by: Dawei Chien <dawei.chien@mediatek.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2016-05-17thermal: convert mtk_thermal to use devm_thermal_zone_of_sensor_registerEduardo Valentin1-10/+2
This changes the driver to use the devm_ version of thermal_zone_of_sensor_register and cleans up the local points and unregister calls. Cc: Zhang Rui <rui.zhang@intel.com> Cc: Matthias Brugger <matthias.bgg@gmail.com> Cc: linux-pm@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2016-04-20thermal: minor mtk_thermal.c cleanupsRandy Dunlap1-2/+1
Trivial cleanups: - delete one duplicate #include - end email address with closing '>' Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Hanyi Wu <hanyi.wu@mediatek.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2016-02-18thermal: small style cleanup in mtk_thermalEduardo Valentin1-27/+29
Remove all checkpatch.pl --strict errors, checks, and warnings. Cc: Zhang Rui <rui.zhang@intel.com> Cc: Matthias Brugger <matthias.bgg@gmail.com> Cc: linux-pm@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2016-02-18thermal: Add Mediatek thermal controller supportSascha Hauer1-0/+623
This adds support for the Mediatek thermal controller found on MT8173 and likely other SoCs. The controller is a bit special. It does not have its own ADC, instead it controls the on-SoC AUXADC via AHB bus accesses. For this reason we need the physical address of the AUXADC. Also it controls a mux using AHB bus accesses, so we need the APMIXEDSYS physical address aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>