1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * ntc_thermistor.h - NTC Thermistors
5 * Copyright (C) 2010 Samsung Electronics
6 * MyungJoo Ham <myungjoo.ham@samsung.com>
13 enum ntc_thermistor_type {
22 struct ntc_thermistor_platform_data {
24 * One (not both) of read_uV and read_ohm should be provided and only
25 * one of the two should be provided.
26 * Both functions should return negative value for an error case.
28 * pullup_uV, pullup_ohm, pulldown_ohm, and connect are required to use
31 * How to setup pullup_ohm, pulldown_ohm, and connect is
32 * described at Documentation/hwmon/ntc_thermistor.rst
34 * pullup/down_ohm: 0 for infinite / not-connected
36 * chan: iio_channel pointer to communicate with the ADC which the
37 * thermistor is using for conversion of the analog values.
39 int (*read_uv)(struct ntc_thermistor_platform_data *);
40 unsigned int pullup_uv;
42 unsigned int pullup_ohm;
43 unsigned int pulldown_ohm;
44 enum { NTC_CONNECTED_POSITIVE, NTC_CONNECTED_GROUND } connect;
45 struct iio_channel *chan;
47 int (*read_ohm)(void);
50 #endif /* _LINUX_NTC_H */