#include <linux/device.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/jiffies.h>
#include <linux/hwmon.h>
#include <linux/err.h>
#include <linux/mutex.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/regmap.h>
#include "adt7x10.h"
#define ADT7X10_STAT_T_LOW …
#define ADT7X10_STAT_T_HIGH …
#define ADT7X10_STAT_T_CRIT …
#define ADT7X10_STAT_NOT_RDY …
#define ADT7X10_FAULT_QUEUE_MASK …
#define ADT7X10_CT_POLARITY …
#define ADT7X10_INT_POLARITY …
#define ADT7X10_EVENT_MODE …
#define ADT7X10_MODE_MASK …
#define ADT7X10_FULL …
#define ADT7X10_PD …
#define ADT7X10_RESOLUTION …
#define ADT7X10_T13_VALUE_MASK …
#define ADT7X10_T_HYST_MASK …
#define ADT7X10_TEMP_MIN …
#define ADT7X10_TEMP_MAX …
struct adt7x10_data { … };
enum { … };
static const u8 ADT7X10_REG_TEMP[] = …;
static irqreturn_t adt7x10_irq_handler(int irq, void *private)
{ … }
static int adt7x10_temp_ready(struct regmap *regmap)
{ … }
static s16 ADT7X10_TEMP_TO_REG(long temp)
{ … }
static int ADT7X10_REG_TO_TEMP(struct adt7x10_data *data, s16 reg)
{ … }
static int adt7x10_temp_read(struct adt7x10_data *data, int index, long *val)
{ … }
static int adt7x10_temp_write(struct adt7x10_data *data, int index, long temp)
{ … }
static int adt7x10_hyst_read(struct adt7x10_data *data, int index, long *val)
{ … }
static int adt7x10_hyst_write(struct adt7x10_data *data, long hyst)
{ … }
static int adt7x10_alarm_read(struct adt7x10_data *data, int index, long *val)
{ … }
static umode_t adt7x10_is_visible(const void *data,
enum hwmon_sensor_types type,
u32 attr, int channel)
{ … }
static int adt7x10_read(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long *val)
{ … }
static int adt7x10_write(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long val)
{ … }
static const struct hwmon_channel_info * const adt7x10_info[] = …;
static const struct hwmon_ops adt7x10_hwmon_ops = …;
static const struct hwmon_chip_info adt7x10_chip_info = …;
static void adt7x10_restore_config(void *private)
{ … }
int adt7x10_probe(struct device *dev, const char *name, int irq,
struct regmap *regmap)
{ … }
EXPORT_SYMBOL_GPL(…);
static int adt7x10_suspend(struct device *dev)
{ … }
static int adt7x10_resume(struct device *dev)
{ … }
EXPORT_SIMPLE_DEV_PM_OPS(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;