diff options
| author | Srikar Srimath Tirumala <srikars@nvidia.com> | 2017-05-25 21:01:42 -0400 |
|---|---|---|
| committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-09-11 18:08:14 -0400 |
| commit | aaba7c564ff8f4e9f650433b2bc59e3e209702e6 (patch) | |
| tree | feef2926fc05bc82415ae987155bc1fd6a8c8235 /include/linux | |
| parent | c20fb12aebbefd13dd334a2b60b8e43b85e9eb48 (diff) | |
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 <jmayo@nvidia.com>
(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 <srikars@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1544333
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/nct1008.h | 5 |
1 files changed, 4 insertions, 1 deletions
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 @@ | |||
| 3 | * | 3 | * |
| 4 | * NCT1008, temperature monitoring device from ON Semiconductors | 4 | * NCT1008, temperature monitoring device from ON Semiconductors |
| 5 | * | 5 | * |
| 6 | * Copyright (c) 2010-2016, NVIDIA CORPORATION. All rights reserved. | 6 | * Copyright (c) 2010-2017, NVIDIA CORPORATION. All rights reserved. |
| 7 | * | 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
| @@ -50,9 +50,12 @@ struct nct1008_platform_data { | |||
| 50 | bool supported_hwrev; | 50 | bool supported_hwrev; |
| 51 | int conv_rate; | 51 | int conv_rate; |
| 52 | int offset; | 52 | int offset; |
| 53 | int alpha; | ||
| 54 | int beta; | ||
| 53 | const char *loc_name; | 55 | const char *loc_name; |
| 54 | struct nct1008_sensor_platform_data sensors[SENSORS_COUNT]; | 56 | struct nct1008_sensor_platform_data sensors[SENSORS_COUNT]; |
| 55 | int (*suspend_with_wakeup)(void); | 57 | int (*suspend_with_wakeup)(void); |
| 56 | bool extended_range; | 58 | bool extended_range; |
| 59 | bool fuse_offset; | ||
| 57 | }; | 60 | }; |
| 58 | #endif /* _LINUX_NCT1008_H */ | 61 | #endif /* _LINUX_NCT1008_H */ |
