diff options
author | dissent1 <be.dissent+github@gmail.com> | 2016-11-05 16:15:33 +0300 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2016-12-01 15:47:43 +0100 |
commit | fef6a96d9e9e001a28b6a673c56ed79029457b5d (patch) | |
tree | 808f89926a7a7a2b3b29564e2070592ef983d948 /target/linux/ipq806x/patches-4.4/309-clk-gcc-add-tsens-child-node.patch | |
parent | 2b71f958b1d2022bd0c4dcaa458f5ba1b955f934 (diff) | |
download | mtk-20170518-fef6a96d9e9e001a28b6a673c56ed79029457b5d.zip mtk-20170518-fef6a96d9e9e001a28b6a673c56ed79029457b5d.tar.gz mtk-20170518-fef6a96d9e9e001a28b6a673c56ed79029457b5d.tar.bz2 |
ipq806x: add thermal sensor driver
Allows to check cpu temperature.
Huge thanks to @hnyman for valuable assistance!
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
Diffstat (limited to 'target/linux/ipq806x/patches-4.4/309-clk-gcc-add-tsens-child-node.patch')
-rw-r--r-- | target/linux/ipq806x/patches-4.4/309-clk-gcc-add-tsens-child-node.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/target/linux/ipq806x/patches-4.4/309-clk-gcc-add-tsens-child-node.patch b/target/linux/ipq806x/patches-4.4/309-clk-gcc-add-tsens-child-node.patch new file mode 100644 index 0000000..0eae3e7 --- /dev/null +++ b/target/linux/ipq806x/patches-4.4/309-clk-gcc-add-tsens-child-node.patch @@ -0,0 +1,38 @@ +From 856371ca1561ca9b3280cc323ff296c7c5e1fa93 Mon Sep 17 00:00:00 2001 +From: Pavel Kubelun <be.dissent@gmail.com> +Date: Tue, 22 Nov 2016 17:37:56 +0300 +Subject: [PATCH] ipq806x: clk: gcc: add tsens child node + +Thermal sensors in ipq806x are inside a Global clock controller. +Add a child node into it to be used by the TSENS driver. + +Signed-off-by: Pavel Kubelun <be.dissent@gmail.com> + +--- + drivers/clk/qcom/gcc-ipq806x.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/drivers/clk/qcom/gcc-ipq806x.c ++++ b/drivers/clk/qcom/gcc-ipq806x.c +@@ -3109,6 +3109,7 @@ MODULE_DEVICE_TABLE(of, gcc_ipq806x_matc + static int gcc_ipq806x_probe(struct platform_device *pdev) + { + struct device *dev = &pdev->dev; ++ struct platform_device *tsens; + struct regmap *regmap; + int ret; + +@@ -3138,6 +3139,13 @@ static int gcc_ipq806x_probe(struct plat + regmap_write(regmap, 0x3cf8, 8); + regmap_write(regmap, 0x3d18, 8); + ++ tsens = platform_device_register_data(&pdev->dev, "qcom-tsens", -1, ++ NULL, 0); ++ if (IS_ERR(tsens)) ++ return PTR_ERR(tsens); ++ ++ platform_set_drvdata(pdev, tsens); ++ + return 0; + } + |