diff options
| author | Tomasz Falkiewicz <tfalkiewicz@nvidia.com> | 2014-01-08 23:17:40 -0500 |
|---|---|---|
| committer | Nicolin Chen <nicolinc@nvidia.com> | 2017-08-11 15:14:15 -0400 |
| commit | 32b3ef9bb51b46c752296bfb2ecb4e69211145c0 (patch) | |
| tree | 6afaa90d1b7dbf4d56dc94c1505dc7b5e43a3dd4 /include/linux | |
| parent | 63a010d170c0552bcbb7bc5bf3101065be9b6afb (diff) | |
thermal: Nct1008 driver refactoring
In order to implement fix for the Bug 1415692, the NCT1008 driver
had to be cleaned up and refactored, to support not only External,
but also Local sensor. This improvement aims to introduce more
generic structures and functions, to be used by the fix in the next
commit.
Bug 1415692
Change-Id: Ifd0f46a2d939227325e1edc846c32b70e6cf409c
Signed-off-by: Tomasz Falkiewicz <tfalkiewicz@nvidia.com>
Reviewed-on: http://git-master/r/357281
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/nct1008.h | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/include/linux/nct1008.h b/include/linux/nct1008.h index eadbe2bd1..ae0ffa90b 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-2013, NVIDIA Corporation. | 6 | * Copyright (c) 2010-2014, 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 |
| @@ -32,21 +32,27 @@ struct nct1008_data; | |||
| 32 | 32 | ||
| 33 | enum nct1008_chip { NCT1008, NCT72 }; | 33 | enum nct1008_chip { NCT1008, NCT72 }; |
| 34 | 34 | ||
| 35 | struct nct1008_platform_data { | 35 | enum nct1008_sensors { LOC, EXT, SENSORS_COUNT }; |
| 36 | bool supported_hwrev; | 36 | |
| 37 | bool ext_range; | 37 | struct nct1008_sensor_platform_data { |
| 38 | u8 conv_rate; | 38 | int shutdown_limit; |
| 39 | u8 offset; | 39 | long suspend_limit_hi; |
| 40 | s16 shutdown_ext_limit; | 40 | long suspend_limit_lo; |
| 41 | s16 shutdown_local_limit; | ||
| 42 | int passive_delay; | 41 | int passive_delay; |
| 43 | int polling_delay; | 42 | int polling_delay; |
| 44 | int num_trips; | 43 | |
| 45 | struct thermal_trip_info trips[THERMAL_MAX_TRIPS]; | 44 | struct thermal_trip_info trips[THERMAL_MAX_TRIPS]; |
| 46 | struct thermal_zone_params *tzp; | 45 | struct thermal_zone_params *tzp; |
| 46 | int num_trips; | ||
| 47 | }; | ||
| 48 | |||
| 49 | struct nct1008_platform_data { | ||
| 50 | bool supported_hwrev; | ||
| 51 | int conv_rate; | ||
| 52 | int offset; | ||
| 47 | const char *loc_name; | 53 | const char *loc_name; |
| 48 | long suspend_ext_limit_hi; | 54 | struct nct1008_sensor_platform_data sensors[SENSORS_COUNT]; |
| 49 | long suspend_ext_limit_lo; | ||
| 50 | int (*suspend_with_wakeup)(void); | 55 | int (*suspend_with_wakeup)(void); |
| 56 | bool extended_range; | ||
| 51 | }; | 57 | }; |
| 52 | #endif /* _LINUX_NCT1008_H */ | 58 | #endif /* _LINUX_NCT1008_H */ |
