#include <linux/bits.h>
#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/hwmon.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include <linux/slab.h>
static const unsigned short normal_i2c[] = …;
enum chips { … };
#define LM83_REG_R_MAN_ID …
#define LM83_REG_R_CHIP_ID …
#define LM83_REG_R_CONFIG …
#define LM83_REG_W_CONFIG …
#define LM83_REG_R_STATUS1 …
#define LM83_REG_R_STATUS2 …
#define LM83_REG_R_LOCAL_TEMP …
#define LM83_REG_R_LOCAL_HIGH …
#define LM83_REG_W_LOCAL_HIGH …
#define LM83_REG_R_REMOTE1_TEMP …
#define LM83_REG_R_REMOTE1_HIGH …
#define LM83_REG_W_REMOTE1_HIGH …
#define LM83_REG_R_REMOTE2_TEMP …
#define LM83_REG_R_REMOTE2_HIGH …
#define LM83_REG_W_REMOTE2_HIGH …
#define LM83_REG_R_REMOTE3_TEMP …
#define LM83_REG_R_REMOTE3_HIGH …
#define LM83_REG_W_REMOTE3_HIGH …
#define LM83_REG_R_TCRIT …
#define LM83_REG_W_TCRIT …
static const u8 LM83_REG_TEMP[] = …;
static const u8 LM83_REG_MAX[] = …;
static const u8 LM83_ALARM_REG[] = …;
static const u8 LM83_MAX_ALARM_BIT[] = …;
static const u8 LM83_CRIT_ALARM_BIT[] = …;
static const u8 LM83_FAULT_BIT[] = …;
struct lm83_data { … };
static int lm83_regmap_reg_read(void *context, unsigned int reg, unsigned int *val)
{ … }
static int lm83_regmap_reg_write(void *context, unsigned int reg, unsigned int val)
{ … }
static bool lm83_regmap_is_volatile(struct device *dev, unsigned int reg)
{ … }
static const struct regmap_config lm83_regmap_config = …;
static int lm83_temp_read(struct device *dev, u32 attr, int channel, long *val)
{ … }
static int lm83_temp_write(struct device *dev, u32 attr, int channel, long val)
{ … }
static int lm83_chip_read(struct device *dev, u32 attr, int channel, long *val)
{ … }
static int lm83_read(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long *val)
{ … }
static int lm83_write(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long val)
{ … }
static umode_t lm83_is_visible(const void *_data, enum hwmon_sensor_types type,
u32 attr, int channel)
{ … }
static const struct hwmon_channel_info * const lm83_info[] = …;
static const struct hwmon_ops lm83_hwmon_ops = …;
static const struct hwmon_chip_info lm83_chip_info = …;
static int lm83_detect(struct i2c_client *client,
struct i2c_board_info *info)
{ … }
static int lm83_probe(struct i2c_client *client)
{ … }
static const struct i2c_device_id lm83_id[] = …;
MODULE_DEVICE_TABLE(i2c, lm83_id);
static struct i2c_driver lm83_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;