From 32b3ef9bb51b46c752296bfb2ecb4e69211145c0 Mon Sep 17 00:00:00 2001 From: Tomasz Falkiewicz Date: Wed, 8 Jan 2014 20:17:40 -0800 Subject: 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 Reviewed-on: http://git-master/r/357281 --- include/linux/nct1008.h | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'include') 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 @@ * * NCT1008, temperature monitoring device from ON Semiconductors * - * Copyright (c) 2010-2013, NVIDIA Corporation. + * Copyright (c) 2010-2014, 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 @@ -32,21 +32,27 @@ struct nct1008_data; enum nct1008_chip { NCT1008, NCT72 }; -struct nct1008_platform_data { - bool supported_hwrev; - bool ext_range; - u8 conv_rate; - u8 offset; - s16 shutdown_ext_limit; - s16 shutdown_local_limit; +enum nct1008_sensors { LOC, EXT, SENSORS_COUNT }; + +struct nct1008_sensor_platform_data { + int shutdown_limit; + long suspend_limit_hi; + long suspend_limit_lo; int passive_delay; int polling_delay; - int num_trips; + struct thermal_trip_info trips[THERMAL_MAX_TRIPS]; struct thermal_zone_params *tzp; + int num_trips; +}; + +struct nct1008_platform_data { + bool supported_hwrev; + int conv_rate; + int offset; const char *loc_name; - long suspend_ext_limit_hi; - long suspend_ext_limit_lo; + struct nct1008_sensor_platform_data sensors[SENSORS_COUNT]; int (*suspend_with_wakeup)(void); + bool extended_range; }; #endif /* _LINUX_NCT1008_H */ -- cgit v1.2.2