[v2,08/11] thermal: sun8i: Add A100's THS controller support
diff mbox series

Message ID 20200622025907.32574-9-frank@allwinnertech.com
State New
Headers show
Series
  • Allwinner A100 Initial support
Related show

Commit Message

Frank Lee June 22, 2020, 2:59 a.m. UTC
This patch add thermal sensor controller support for A100,
which is similar to the previous ones.

Signed-off-by: Frank Lee <frank@allwinnertech.com>
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/thermal/sun8i_thermal.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Maxime Ripard June 29, 2020, 3:10 p.m. UTC | #1
On Mon, Jun 22, 2020 at 10:59:04AM +0800, Frank Lee wrote:
> This patch add thermal sensor controller support for A100,
> which is similar to the previous ones.
> 
> Signed-off-by: Frank Lee <frank@allwinnertech.com>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>

This SoB is weird. If Yangtao Li is the author, then they should be
credited, and if they're not then their SoB shouldn't be here
(especially in the latest position which is usually the person that
committed / sent the patch).

Either way, something is off here.

Maxime

Patch
diff mbox series

diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c
index 74d73be..7a69442 100644
--- a/drivers/thermal/sun8i_thermal.c
+++ b/drivers/thermal/sun8i_thermal.c
@@ -590,6 +590,19 @@  static int sun8i_ths_remove(struct platform_device *pdev)
 	.calc_temp = sun8i_ths_calc_temp,
 };
 
+static const struct ths_thermal_chip sun50i_a100_ths = {
+	.sensor_num = 3,
+	.has_bus_clk_reset = true,
+	.ft_deviation = 8000,
+	.offset = 187744,
+	.scale = 672,
+	.temp_data_base = SUN50I_H6_THS_TEMP_DATA,
+	.calibrate = sun50i_h6_ths_calibrate,
+	.init = sun50i_h6_thermal_init,
+	.irq_ack = sun50i_h6_irq_ack,
+	.calc_temp = sun8i_ths_calc_temp,
+};
+
 static const struct ths_thermal_chip sun50i_h5_ths = {
 	.sensor_num = 2,
 	.has_mod_clk = true,
@@ -619,6 +632,7 @@  static int sun8i_ths_remove(struct platform_device *pdev)
 	{ .compatible = "allwinner,sun8i-h3-ths", .data = &sun8i_h3_ths },
 	{ .compatible = "allwinner,sun8i-r40-ths", .data = &sun8i_r40_ths },
 	{ .compatible = "allwinner,sun50i-a64-ths", .data = &sun50i_a64_ths },
+	{ .compatible = "allwinner,sun50i-a100-ths", .data = &sun50i_a100_ths },
 	{ .compatible = "allwinner,sun50i-h5-ths", .data = &sun50i_h5_ths },
 	{ .compatible = "allwinner,sun50i-h6-ths", .data = &sun50i_h6_ths },
 	{ /* sentinel */ },