#include <linux/err.h>
#include <linux/hwmon.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/regmap.h>
#include <linux/slab.h>
static const unsigned short normal_i2c[] = …;
#define LM92_REG_CONFIG …
#define LM92_REG_TEMP …
#define LM92_REG_TEMP_HYST …
#define LM92_REG_TEMP_CRIT …
#define LM92_REG_TEMP_LOW …
#define LM92_REG_TEMP_HIGH …
#define LM92_REG_MAN_ID …
static inline int TEMP_FROM_REG(s16 reg)
{ … }
static inline s16 TEMP_TO_REG(long val, int resolution)
{ … }
static inline u8 ALARMS_FROM_REG(s16 reg)
{ … }
struct lm92_data { … };
static int lm92_temp_read(struct lm92_data *data, u32 attr, int channel, long *val)
{ … }
static int lm92_chip_read(struct lm92_data *data, u32 attr, long *val)
{ … }
static int lm92_read(struct device *dev, enum hwmon_sensor_types type, u32 attr,
int channel, long *val)
{ … }
static int lm92_temp_write(struct lm92_data *data, u32 attr, long val)
{ … }
static int lm92_write(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long val)
{ … }
static umode_t lm92_is_visible(const void *_data, enum hwmon_sensor_types type,
u32 attr, int channel)
{ … }
static const struct hwmon_channel_info * const lm92_info[] = …;
static const struct hwmon_ops lm92_hwmon_ops = …;
static const struct hwmon_chip_info lm92_chip_info = …;
static int lm92_init_client(struct regmap *regmap)
{ … }
static int lm92_detect(struct i2c_client *new_client,
struct i2c_board_info *info)
{ … }
static int lm92_reg_read(void *context, unsigned int reg, unsigned int *val)
{ … }
static int lm92_reg_write(void *context, unsigned int reg, unsigned int val)
{ … }
static bool lm92_regmap_is_volatile(struct device *dev, unsigned int reg)
{ … }
static bool lm92_regmap_is_writeable(struct device *dev, unsigned int reg)
{ … }
static const struct regmap_config lm92_regmap_config = …;
static const struct regmap_bus lm92_regmap_bus = …;
static int lm92_probe(struct i2c_client *client)
{ … }
static const struct i2c_device_id lm92_id[] = …;
MODULE_DEVICE_TABLE(i2c, lm92_id);
static struct i2c_driver lm92_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;