#include <linux/bitops.h>
#include <linux/bits.h>
#include <linux/err.h>
#include <linux/hwmon.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include <linux/slab.h>
static const unsigned short max1668_addr_list[] = …;
#define MAX1668_REG_TEMP(nr) …
#define MAX1668_REG_STAT1 …
#define MAX1668_REG_STAT2 …
#define MAX1668_REG_MAN_ID …
#define MAX1668_REG_DEV_ID …
#define MAX1668_REG_LIMH(nr) …
#define MAX1668_REG_LIML(nr) …
#define MAN_ID_MAXIM …
#define DEV_ID_MAX1668 …
#define DEV_ID_MAX1805 …
#define DEV_ID_MAX1989 …
static bool read_only;
module_param(read_only, bool, 0);
MODULE_PARM_DESC(…) …;
struct max1668_data { … };
static int max1668_read(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long *val)
{ … }
static int max1668_write(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long val)
{ … }
static umode_t max1668_is_visible(const void *_data, enum hwmon_sensor_types type,
u32 attr, int channel)
{ … }
static const struct hwmon_channel_info * const max1668_info[] = …;
static const struct hwmon_ops max1668_hwmon_ops = …;
static const struct hwmon_chip_info max1668_chip_info = …;
static int max1668_detect(struct i2c_client *client,
struct i2c_board_info *info)
{ … }
static int max1668_reg_read(void *context, unsigned int reg, unsigned int *val)
{ … }
static int max1668_reg_write(void *context, unsigned int reg, unsigned int val)
{ … }
static bool max1668_regmap_is_volatile(struct device *dev, unsigned int reg)
{ … }
static bool max1668_regmap_is_writeable(struct device *dev, unsigned int reg)
{ … }
static const struct regmap_config max1668_regmap_config = …;
static const struct regmap_bus max1668_regmap_bus = …;
static int max1668_probe(struct i2c_client *client)
{ … }
static const struct i2c_device_id max1668_id[] = …;
MODULE_DEVICE_TABLE(i2c, max1668_id);
static struct i2c_driver max1668_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;