#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 { … };
enum { … };
static const struct platform_device_id ntc_thermistor_id[] = …;
static const struct ntc_compensation ncpXXwb473[] = …;
static const struct ntc_compensation ncpXXwl333[] = …;
static const struct ntc_compensation ncpXXwf104[] = …;
static const struct ntc_compensation ncpXXxh103[] = …;
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[] = …;
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(…) …;