From aaba7c564ff8f4e9f650433b2bc59e3e209702e6 Mon Sep 17 00:00:00 2001 From: Srikar Srimath Tirumala Date: Thu, 25 May 2017 18:01:42 -0700 Subject: misc: nct1008: add nfactor support Add support to read a fuse value and program the nfactor and offset for TMP451. Also provide support to parse compensation alpha and beta from the DT. Bug 200294481 Reviewed-on: https://git-master.nvidia.com/r/1515505 Reviewed-by: Jon Mayo (cherry picked from commit fc11d649ae4f2480672f925a742640cf05a14b7c) Edits: * Moved fuse.h to a seperate change as it is in a different repo. * add error checking. * write to nfactor_corr only for platforms that support fuse offsets. Change-Id: I7ec603d06415bc2189810a95f5d1bf1393eb0e46 Signed-off-by: Srikar Srimath Tirumala Reviewed-on: https://git-master.nvidia.com/r/1544333 Reviewed-by: svc-mobile-coverity GVS: Gerrit_Virtual_Submit Reviewed-by: Jon Mayo --- include/linux/nct1008.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/nct1008.h b/include/linux/nct1008.h index 6caa1c8fd..75e941502 100644 --- a/include/linux/nct1008.h +++ b/include/linux/nct1008.h @@ -3,7 +3,7 @@ * * NCT1008, temperature monitoring device from ON Semiconductors * - * Copyright (c) 2010-2016, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2010-2017, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -50,9 +50,12 @@ struct nct1008_platform_data { bool supported_hwrev; int conv_rate; int offset; + int alpha; + int beta; const char *loc_name; struct nct1008_sensor_platform_data sensors[SENSORS_COUNT]; int (*suspend_with_wakeup)(void); bool extended_range; + bool fuse_offset; }; #endif /* _LINUX_NCT1008_H */ -- cgit v1.2.2