linux/drivers/hwmon/ntc_thermistor.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * ntc_thermistor.c - NTC Thermistors
 *
 *  Copyright (C) 2010 Samsung Electronics
 *  MyungJoo Ham <[email protected]>
 */

#include <linux/slab.h>
#include <linux/module.h>
#include <linux/math64.h>
#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/err.h>
#include <linux/fixp-arith.h>
#include <linux/iio/consumer.h>
#include <linux/hwmon.h>

enum ntc_thermistor_type {};

struct ntc_compensation {};

/*
 * Used as index in a zero-terminated array, holes not allowed so
 * that NTC_LAST is the first empty array entry.
 */
enum {};

static const struct platform_device_id ntc_thermistor_id[] =;

/*
 * A compensation table should be sorted by the values of .ohm
 * in descending order.
 * The following compensation tables are from the specification of Murata NTC
 * Thermistors Datasheet
 */
static const struct ntc_compensation ncpXXwb473[] =;
static const struct ntc_compensation ncpXXwl333[] =;

static const struct ntc_compensation ncpXXwf104[] =;

static const struct ntc_compensation ncpXXxh103[] =;

/*
 * The following compensation tables are from the specifications in EPCOS NTC
 * Thermistors Datasheets
 */
static const struct ntc_compensation b57330v2103[] =;

static const struct ntc_compensation b57891s0103[] =;

struct ntc_type {};

#define NTC_TYPE(ntc, compensation)

static const struct ntc_type ntc_type[] =;

/*
 * pullup_uV, pullup_ohm, pulldown_ohm, and connect are required.
 *
 * How to setup pullup_ohm, pulldown_ohm, and connect is
 * described at Documentation/hwmon/ntc_thermistor.rst
 *
 * pullup/down_ohm: 0 for infinite / not-connected
 *
 * chan: iio_channel pointer to communicate with the ADC which the
 * thermistor is using for conversion of the analog values.
 */
struct ntc_data {};

static int ntc_adc_iio_read(struct ntc_data *data)
{}

static inline u64 div64_u64_safe(u64 dividend, u64 divisor)
{}

static int get_ohm_of_thermistor(struct ntc_data *data, unsigned int uv)
{}

static void lookup_comp(struct ntc_data *data, unsigned int ohm,
			int *i_low, int *i_high)
{}

static int get_temp_mc(struct ntc_data *data, unsigned int ohm)
{}

static int ntc_thermistor_get_ohm(struct ntc_data *data)
{}

static int ntc_read(struct device *dev, enum hwmon_sensor_types type,
		    u32 attr, int channel, long *val)
{}

static umode_t ntc_is_visible(const void *data, enum hwmon_sensor_types type,
			      u32 attr, int channel)
{}

static const struct hwmon_channel_info * const ntc_info[] =;

static const struct hwmon_ops ntc_hwmon_ops =;

static const struct hwmon_chip_info ntc_chip_info =;

static int ntc_thermistor_parse_props(struct device *dev,
				      struct ntc_data *data)
{}

static int ntc_thermistor_probe(struct platform_device *pdev)
{}

static const struct of_device_id ntc_match[] =;
MODULE_DEVICE_TABLE(of, ntc_match);

static struct platform_driver ntc_thermistor_driver =;

module_platform_driver();

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();
MODULE_ALIAS();