diff options
author | Donggeun Kim <dg77.kim@samsung.com> | 2011-06-20 03:48:19 -0400 |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2011-07-28 03:17:33 -0400 |
commit | f22aaaa70d8c24e5dc7d23a219c4beace8354b65 (patch) | |
tree | 855158946f04f4d4846b7cab573d55652163ec18 /include/linux/platform_data | |
parent | dabaa0d2b4085a2037d80a40b86ba215f00b601e (diff) |
hwmon: Driver for NTC Thermistors
Add support for NTC Thermistor series. In this release, the
following thermistors are supported: NCP15WB473, NCP18WB473, NCP03WB473,
and NCP15WL333. This driver is based on the datasheet of MURATA.
The driver in the patch does conversion from the raw ADC value
(either voltage or resistence) to temperature. In order to use
voltage values as input, the circuit schematics should be provided
with the platform data. A compensation table for each type of thermistor
is provided for the conversion.
Signed-off-by: Donggeun Kim <dg77.kim@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: KyungMin Park <kyungmin.park@samsung.com>
Reviewed-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Diffstat (limited to 'include/linux/platform_data')
-rw-r--r-- | include/linux/platform_data/ntc_thermistor.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/include/linux/platform_data/ntc_thermistor.h b/include/linux/platform_data/ntc_thermistor.h new file mode 100644 index 000000000000..abd286215279 --- /dev/null +++ b/include/linux/platform_data/ntc_thermistor.h | |||
@@ -0,0 +1,53 @@ | |||
1 | /* | ||
2 | * ntc_thermistor.h - NTC Thermistors | ||
3 | * | ||
4 | * Copyright (C) 2010 Samsung Electronics | ||
5 | * MyungJoo Ham <myungjoo.ham@samsung.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | #ifndef _LINUX_NTC_H | ||
22 | #define _LINUX_NTC_H | ||
23 | |||
24 | enum ntc_thermistor_type { | ||
25 | TYPE_NCPXXWB473, | ||
26 | TYPE_NCPXXWL333, | ||
27 | }; | ||
28 | |||
29 | struct ntc_thermistor_platform_data { | ||
30 | /* | ||
31 | * One (not both) of read_uV and read_ohm should be provided and only | ||
32 | * one of the two should be provided. | ||
33 | * Both functions should return negative value for an error case. | ||
34 | * | ||
35 | * pullup_uV, pullup_ohm, pulldown_ohm, and connect are required to use | ||
36 | * read_uV() | ||
37 | * | ||
38 | * How to setup pullup_ohm, pulldown_ohm, and connect is | ||
39 | * described at Documentation/hwmon/ntc | ||
40 | * | ||
41 | * pullup/down_ohm: 0 for infinite / not-connected | ||
42 | */ | ||
43 | int (*read_uV)(void); | ||
44 | unsigned int pullup_uV; | ||
45 | |||
46 | unsigned int pullup_ohm; | ||
47 | unsigned int pulldown_ohm; | ||
48 | enum { NTC_CONNECTED_POSITIVE, NTC_CONNECTED_GROUND } connect; | ||
49 | |||
50 | int (*read_ohm)(void); | ||
51 | }; | ||
52 | |||
53 | #endif /* _LINUX_NTC_H */ | ||