Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
[deliverable/linux.git] / include / linux / platform_data / ntc_thermistor.h
CommitLineData
f22aaaa7
DK
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
9e8269de
NKC
24struct iio_channel;
25
f22aaaa7
DK
26enum ntc_thermistor_type {
27 TYPE_NCPXXWB473,
28 TYPE_NCPXXWL333,
ed67f087 29 TYPE_B57330V2103,
f22aaaa7
DK
30};
31
32struct ntc_thermistor_platform_data {
33 /*
34 * One (not both) of read_uV and read_ohm should be provided and only
35 * one of the two should be provided.
36 * Both functions should return negative value for an error case.
37 *
38 * pullup_uV, pullup_ohm, pulldown_ohm, and connect are required to use
39 * read_uV()
40 *
41 * How to setup pullup_ohm, pulldown_ohm, and connect is
395cf969 42 * described at Documentation/hwmon/ntc_thermistor
f22aaaa7
DK
43 *
44 * pullup/down_ohm: 0 for infinite / not-connected
9e8269de
NKC
45 *
46 * chan: iio_channel pointer to communicate with the ADC which the
47 * thermistor is using for conversion of the analog values.
f22aaaa7 48 */
088ce2ac
GR
49 int (*read_uv)(struct ntc_thermistor_platform_data *);
50 unsigned int pullup_uv;
f22aaaa7
DK
51
52 unsigned int pullup_ohm;
53 unsigned int pulldown_ohm;
54 enum { NTC_CONNECTED_POSITIVE, NTC_CONNECTED_GROUND } connect;
9e8269de 55 struct iio_channel *chan;
f22aaaa7
DK
56
57 int (*read_ohm)(void);
58};
59
60#endif /* _LINUX_NTC_H */
This page took 1.446681 seconds and 5 git commands to generate.