#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/jiffies.h>
#include <linux/slab.h>
#include <linux/i2c.h>
#include <linux/err.h>
#define DRV_NAME …
#define BMC_VOLT_COUNT …
#define MENF21BMC_V33 …
#define MENF21BMC_V5 …
#define MENF21BMC_V12 …
#define MENF21BMC_V5_SB …
#define MENF21BMC_VBAT …
#define IDX_TO_VOLT_MIN_CMD(idx) …
#define IDX_TO_VOLT_MAX_CMD(idx) …
#define IDX_TO_VOLT_INP_CMD(idx) …
struct menf21bmc_hwmon { … };
static const char *const input_names[] = …;
static struct menf21bmc_hwmon *menf21bmc_hwmon_update(struct device *dev)
{ … }
static int menf21bmc_hwmon_get_volt_limits(struct menf21bmc_hwmon *drv_data)
{ … }
static ssize_t
label_show(struct device *dev, struct device_attribute *devattr, char *buf)
{ … }
static ssize_t
in_show(struct device *dev, struct device_attribute *devattr, char *buf)
{ … }
static ssize_t
min_show(struct device *dev, struct device_attribute *devattr, char *buf)
{ … }
static ssize_t
max_show(struct device *dev, struct device_attribute *devattr, char *buf)
{ … }
static SENSOR_DEVICE_ATTR_RO(in0_input, in, 0);
static SENSOR_DEVICE_ATTR_RO(in0_min, min, 0);
static SENSOR_DEVICE_ATTR_RO(in0_max, max, 0);
static SENSOR_DEVICE_ATTR_RO(in0_label, label, 0);
static SENSOR_DEVICE_ATTR_RO(in1_input, in, 1);
static SENSOR_DEVICE_ATTR_RO(in1_min, min, 1);
static SENSOR_DEVICE_ATTR_RO(in1_max, max, 1);
static SENSOR_DEVICE_ATTR_RO(in1_label, label, 1);
static SENSOR_DEVICE_ATTR_RO(in2_input, in, 2);
static SENSOR_DEVICE_ATTR_RO(in2_min, min, 2);
static SENSOR_DEVICE_ATTR_RO(in2_max, max, 2);
static SENSOR_DEVICE_ATTR_RO(in2_label, label, 2);
static SENSOR_DEVICE_ATTR_RO(in3_input, in, 3);
static SENSOR_DEVICE_ATTR_RO(in3_min, min, 3);
static SENSOR_DEVICE_ATTR_RO(in3_max, max, 3);
static SENSOR_DEVICE_ATTR_RO(in3_label, label, 3);
static SENSOR_DEVICE_ATTR_RO(in4_input, in, 4);
static SENSOR_DEVICE_ATTR_RO(in4_min, min, 4);
static SENSOR_DEVICE_ATTR_RO(in4_max, max, 4);
static SENSOR_DEVICE_ATTR_RO(in4_label, label, 4);
static struct attribute *menf21bmc_hwmon_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static int menf21bmc_hwmon_probe(struct platform_device *pdev)
{ … }
static struct platform_driver menf21bmc_hwmon = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;