#include <linux/bitops.h>
#include <linux/err.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/i2c.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/property.h>
#define LTC2990_STATUS …
#define LTC2990_CONTROL …
#define LTC2990_TRIGGER …
#define LTC2990_TINT_MSB …
#define LTC2990_V1_MSB …
#define LTC2990_V2_MSB …
#define LTC2990_V3_MSB …
#define LTC2990_V4_MSB …
#define LTC2990_VCC_MSB …
#define LTC2990_IN0 …
#define LTC2990_IN1 …
#define LTC2990_IN2 …
#define LTC2990_IN3 …
#define LTC2990_IN4 …
#define LTC2990_CURR1 …
#define LTC2990_CURR2 …
#define LTC2990_TEMP1 …
#define LTC2990_TEMP2 …
#define LTC2990_TEMP3 …
#define LTC2990_NONE …
#define LTC2990_ALL …
#define LTC2990_MODE0_SHIFT …
#define LTC2990_MODE0_MASK …
#define LTC2990_MODE1_SHIFT …
#define LTC2990_MODE1_MASK …
static const int ltc2990_attrs_ena_0[] = …;
static const int ltc2990_attrs_ena_1[] = …;
struct ltc2990_data { … };
static int ltc2990_get_value(struct i2c_client *i2c, int index, int *result)
{ … }
static ssize_t ltc2990_value_show(struct device *dev,
struct device_attribute *da, char *buf)
{ … }
static umode_t ltc2990_attrs_visible(struct kobject *kobj,
struct attribute *a, int n)
{ … }
static SENSOR_DEVICE_ATTR_RO(temp1_input, ltc2990_value, LTC2990_TEMP1);
static SENSOR_DEVICE_ATTR_RO(temp2_input, ltc2990_value, LTC2990_TEMP2);
static SENSOR_DEVICE_ATTR_RO(temp3_input, ltc2990_value, LTC2990_TEMP3);
static SENSOR_DEVICE_ATTR_RO(curr1_input, ltc2990_value, LTC2990_CURR1);
static SENSOR_DEVICE_ATTR_RO(curr2_input, ltc2990_value, LTC2990_CURR2);
static SENSOR_DEVICE_ATTR_RO(in0_input, ltc2990_value, LTC2990_IN0);
static SENSOR_DEVICE_ATTR_RO(in1_input, ltc2990_value, LTC2990_IN1);
static SENSOR_DEVICE_ATTR_RO(in2_input, ltc2990_value, LTC2990_IN2);
static SENSOR_DEVICE_ATTR_RO(in3_input, ltc2990_value, LTC2990_IN3);
static SENSOR_DEVICE_ATTR_RO(in4_input, ltc2990_value, LTC2990_IN4);
static struct attribute *ltc2990_attrs[] = …;
static const struct attribute_group ltc2990_group = …;
__ATTRIBUTE_GROUPS(…);
static int ltc2990_i2c_probe(struct i2c_client *i2c)
{ … }
static const struct i2c_device_id ltc2990_i2c_id[] = …;
MODULE_DEVICE_TABLE(i2c, ltc2990_i2c_id);
static struct i2c_driver ltc2990_i2c_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;