#include <linux/bitops.h>
#include <linux/bitfield.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/jiffies.h>
#include <linux/i2c.h>
#include <linux/hwmon.h>
#include <linux/err.h>
#include <linux/mutex.h>
#include <linux/of.h>
#include <linux/regmap.h>
static const unsigned short normal_i2c[] = …;
#define JC42_REG_CAP …
#define JC42_REG_CONFIG …
#define JC42_REG_TEMP_UPPER …
#define JC42_REG_TEMP_LOWER …
#define JC42_REG_TEMP_CRITICAL …
#define JC42_REG_TEMP …
#define JC42_REG_MANID …
#define JC42_REG_DEVICEID …
#define JC42_REG_SMBUS …
#define JC42_ALARM_CRIT …
#define JC42_ALARM_MAX …
#define JC42_ALARM_MIN …
#define JC42_CFG_CRIT_ONLY …
#define JC42_CFG_TCRIT_LOCK …
#define JC42_CFG_EVENT_LOCK …
#define JC42_CFG_SHUTDOWN …
#define JC42_CFG_HYST_MASK …
#define JC42_CAP_RANGE …
#define ADT_MANID …
#define ATMEL_MANID …
#define ATMEL_MANID2 …
#define MAX_MANID …
#define IDT_MANID …
#define MCP_MANID …
#define NXP_MANID …
#define ONS_MANID …
#define STM_MANID …
#define GT_MANID …
#define GT_MANID2 …
#define SI_MANID …
#define SMBUS_STMOUT …
#define ADT7408_DEVID …
#define ADT7408_DEVID_MASK …
#define AT30TS00_DEVID …
#define AT30TS00_DEVID_MASK …
#define GT34TS02_DEVID …
#define GT34TS02_DEVID_MASK …
#define TS3000_DEVID …
#define TS3000_DEVID_MASK …
#define TS3001_DEVID …
#define TS3001_DEVID_MASK …
#define MAX6604_DEVID …
#define MAX6604_DEVID_MASK …
#define MCP9804_DEVID …
#define MCP9804_DEVID_MASK …
#define MCP9808_DEVID …
#define MCP9808_DEVID_MASK …
#define MCP98242_DEVID …
#define MCP98242_DEVID_MASK …
#define MCP98243_DEVID …
#define MCP98243_DEVID_MASK …
#define MCP9843_DEVID …
#define MCP9843_DEVID_MASK …
#define SE97_DEVID …
#define SE97_DEVID_MASK …
#define SE98_DEVID …
#define SE98_DEVID_MASK …
#define CAT6095_DEVID …
#define CAT6095_DEVID_MASK …
#define CAT34TS02C_DEVID …
#define CAT34TS02C_DEVID_MASK …
#define STTS424_DEVID …
#define STTS424_DEVID_MASK …
#define STTS424E_DEVID …
#define STTS424E_DEVID_MASK …
#define STTS2002_DEVID …
#define STTS2002_DEVID_MASK …
#define STTS3000_DEVID …
#define STTS3000_DEVID_MASK …
#define TSE2004_DEVID …
#define TSE2004_DEVID_MASK …
static u16 jc42_hysteresis[] = …;
struct jc42_chips { … };
static struct jc42_chips jc42_chips[] = …;
struct jc42_data { … };
#define JC42_TEMP_MIN_EXTENDED …
#define JC42_TEMP_MIN …
#define JC42_TEMP_MAX …
static u16 jc42_temp_to_reg(long temp, bool extended)
{ … }
static int jc42_temp_from_reg(s16 reg)
{ … }
static int jc42_read(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long *val)
{ … }
static int jc42_write(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long val)
{ … }
static umode_t jc42_is_visible(const void *_data, enum hwmon_sensor_types type,
u32 attr, int channel)
{ … }
static int jc42_detect(struct i2c_client *client, struct i2c_board_info *info)
{ … }
static const struct hwmon_channel_info * const jc42_info[] = …;
static const struct hwmon_ops jc42_hwmon_ops = …;
static const struct hwmon_chip_info jc42_chip_info = …;
static bool jc42_readable_reg(struct device *dev, unsigned int reg)
{ … }
static bool jc42_writable_reg(struct device *dev, unsigned int reg)
{ … }
static bool jc42_volatile_reg(struct device *dev, unsigned int reg)
{ … }
static const struct regmap_config jc42_regmap_config = …;
static int jc42_probe(struct i2c_client *client)
{ … }
static void jc42_remove(struct i2c_client *client)
{ … }
#ifdef CONFIG_PM
static int jc42_suspend(struct device *dev)
{ … }
static int jc42_resume(struct device *dev)
{ … }
static const struct dev_pm_ops jc42_dev_pm_ops = …;
#define JC42_DEV_PM_OPS …
#else
#define JC42_DEV_PM_OPS …
#endif
static const struct i2c_device_id jc42_id[] = …;
MODULE_DEVICE_TABLE(i2c, jc42_id);
#ifdef CONFIG_OF
static const struct of_device_id jc42_of_ids[] = …;
MODULE_DEVICE_TABLE(of, jc42_of_ids);
#endif
static struct i2c_driver jc42_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;