#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/of.h>
#include <linux/regmap.h>
#include <linux/slab.h>
static const unsigned short normal_i2c[] = …;
#define TMP464_NUM_CHANNELS …
#define TMP468_NUM_CHANNELS …
#define MAX_CHANNELS …
#define TMP464_TEMP_REG(channel) …
#define TMP464_TEMP_OFFSET_REG(channel) …
#define TMP464_N_FACTOR_REG(channel) …
static const u8 TMP464_THERM_LIMIT[MAX_CHANNELS] = …;
static const u8 TMP464_THERM2_LIMIT[MAX_CHANNELS] = …;
#define TMP464_THERM_STATUS_REG …
#define TMP464_THERM2_STATUS_REG …
#define TMP464_REMOTE_OPEN_REG …
#define TMP464_CONFIG_REG …
#define TMP464_TEMP_HYST_REG …
#define TMP464_LOCK_REG …
#define TMP464_MANUFACTURER_ID_REG …
#define TMP464_DEVICE_ID_REG …
#define TMP464_CONFIG_SHUTDOWN …
#define TMP464_CONFIG_RANGE …
#define TMP464_CONFIG_REG_REN(x) …
#define TMP464_CONFIG_REG_REN_MASK …
#define TMP464_CONFIG_CONVERSION_RATE_B0 …
#define TMP464_CONFIG_CONVERSION_RATE_B2 …
#define TMP464_CONFIG_CONVERSION_RATE_MASK …
#define TMP464_UNLOCK_VAL …
#define TMP464_LOCK_VAL …
#define TMP464_LOCKED …
#define TMP464_MANUFACTURER_ID …
#define TMP464_DEVICE_ID …
#define TMP468_DEVICE_ID …
static const struct i2c_device_id tmp464_id[] = …;
MODULE_DEVICE_TABLE(i2c, tmp464_id);
static const struct of_device_id __maybe_unused tmp464_of_match[] = …;
MODULE_DEVICE_TABLE(of, tmp464_of_match);
struct tmp464_channel { … };
struct tmp464_data { … };
static int temp_from_reg(s16 reg)
{ … }
static s16 temp_to_limit_reg(long temp)
{ … }
static s16 temp_to_offset_reg(long temp)
{ … }
static int tmp464_enable_channels(struct tmp464_data *data)
{ … }
static int tmp464_chip_read(struct device *dev, u32 attr, int channel, long *val)
{ … }
static int tmp464_temp_read(struct device *dev, u32 attr, int channel, long *val)
{ … }
static int tmp464_read(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long *val)
{ … }
static int tmp464_read_string(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, const char **str)
{ … }
static int tmp464_set_convrate(struct tmp464_data *data, long interval)
{ … }
static int tmp464_chip_write(struct tmp464_data *data, u32 attr, int channel, long val)
{ … }
static int tmp464_temp_write(struct tmp464_data *data, u32 attr, int channel, long val)
{ … }
static int tmp464_write(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long val)
{ … }
static umode_t tmp464_is_visible(const void *_data, enum hwmon_sensor_types type,
u32 attr, int channel)
{ … }
static void tmp464_restore_lock(void *regmap)
{ … }
static void tmp464_restore_config(void *_data)
{ … }
static int tmp464_init_client(struct device *dev, struct tmp464_data *data)
{ … }
static int tmp464_detect(struct i2c_client *client,
struct i2c_board_info *info)
{ … }
static int tmp464_probe_child_from_dt(struct device *dev,
struct device_node *child,
struct tmp464_data *data)
{ … }
static int tmp464_probe_from_dt(struct device *dev, struct tmp464_data *data)
{ … }
static const struct hwmon_ops tmp464_ops = …;
static const struct hwmon_channel_info * const tmp464_info[] = …;
static const struct hwmon_chip_info tmp464_chip_info = …;
static bool tmp464_is_volatile_reg(struct device *dev, unsigned int reg)
{ … }
static const struct regmap_config tmp464_regmap_config = …;
static int tmp464_probe(struct i2c_client *client)
{ … }
static struct i2c_driver tmp464_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;