From 5b1283984fa39933e094d237387ad8fd39527fc1 Mon Sep 17 00:00:00 2001 From: Amit Kucheria Date: Wed, 18 Jul 2018 12:13:09 +0530 Subject: thermal: tsens: Add support to split up register address space into two There are two banks of registers for v2 TSENS IPs: SROT and TM. On older SoCs these were contiguous, leading to DTs mapping them as one register address space of size 0x2000. In newer SoCs, these two banks are not contiguous anymore. Add logic to init_common() to differentiate between old and new DTs and adjust associated offsets for the TM register bank so that the old DTs will continue to function correctly. Signed-off-by: Amit Kucheria Reviewed-by: Bjorn Andersson Tested-by: Matthias Kaehlcke Reviewed-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Signed-off-by: Eduardo Valentin --- drivers/thermal/qcom/tsens.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/thermal/qcom/tsens.h') diff --git a/drivers/thermal/qcom/tsens.h b/drivers/thermal/qcom/tsens.h index dc56e1e2a19e..d785b37b47d2 100644 --- a/drivers/thermal/qcom/tsens.h +++ b/drivers/thermal/qcom/tsens.h @@ -77,6 +77,7 @@ struct tsens_device { struct device *dev; u32 num_sensors; struct regmap *map; + u32 tm_offset; struct tsens_context ctx; const struct tsens_ops *ops; struct tsens_sensor sensor[0]; -- cgit v1.2.3