Re: [PATCH v11 6/9] drivers: thermal: tsens: Replace custom 8960 apis with generic apis

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 3/18/21 8:52 PM, Ansuel Smith wrote:
Rework calibrate function to use common function. Derive the offset from
a missing hardcoded slope table and the data from the nvmem calib
efuses.
Drop custom get_temp function and use generic api.

Signed-off-by: Ansuel Smith <ansuelsmth@xxxxxxxxx>
Acked-by: Thara Gopinath <thara.gopinath@xxxxxxxxxx>
---
  drivers/thermal/qcom/tsens-8960.c | 56 +++++++++----------------------
  1 file changed, 15 insertions(+), 41 deletions(-)

diff --git a/drivers/thermal/qcom/tsens-8960.c b/drivers/thermal/qcom/tsens-8960.c
index bdc64d4188bf..8c523b764862 100644
--- a/drivers/thermal/qcom/tsens-8960.c
+++ b/drivers/thermal/qcom/tsens-8960.c
@@ -67,6 +67,13 @@
  #define S9_STATUS_OFF		0x3674
  #define S10_STATUS_OFF		0x3678
+/* Original slope - 200 to compensate mC to C inaccuracy */
+u32 tsens_msm8960_slope[] = {
+			976, 976, 954, 976,
+			911, 932, 932, 999,
+			932, 999, 932
+			};

make -C1 throws a warning for this. You have to make the table static. You can keep my Acked-by once it is fixed.

Warm Regards
Thara



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux