#define pr_fmt(fmt) …
#include <linux/bits.h>
#include <linux/minmax.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/pm.h>
#include <linux/init.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <linux/jiffies.h>
#include <linux/platform_device.h>
#include <linux/hwmon.h>
#include <linux/err.h>
#include <linux/mutex.h>
#include "sch56xx-common.h"
#define DRVNAME …
#define DEVNAME …
#define SCH5627_HWMON_ID …
#define SCH5627_COMPANY_ID …
#define SCH5627_PRIMARY_ID …
#define SCH5627_REG_BUILD_CODE …
#define SCH5627_REG_BUILD_ID …
#define SCH5627_REG_HWMON_ID …
#define SCH5627_REG_HWMON_REV …
#define SCH5627_REG_COMPANY_ID …
#define SCH5627_REG_PRIMARY_ID …
#define SCH5627_REG_CTRL …
#define SCH5627_CTRL_START …
#define SCH5627_CTRL_LOCK …
#define SCH5627_CTRL_VBAT …
#define SCH5627_NO_TEMPS …
#define SCH5627_NO_FANS …
#define SCH5627_NO_IN …
static const u16 SCH5627_REG_TEMP_MSB[SCH5627_NO_TEMPS] = …;
static const u16 SCH5627_REG_TEMP_LSN[SCH5627_NO_TEMPS] = …;
static const u16 SCH5627_REG_TEMP_HIGH_NIBBLE[SCH5627_NO_TEMPS] = …;
static const u16 SCH5627_REG_TEMP_HIGH[SCH5627_NO_TEMPS] = …;
static const u16 SCH5627_REG_TEMP_ABS[SCH5627_NO_TEMPS] = …;
static const u16 SCH5627_REG_FAN[SCH5627_NO_FANS] = …;
static const u16 SCH5627_REG_FAN_MIN[SCH5627_NO_FANS] = …;
static const u16 SCH5627_REG_PWM_MAP[SCH5627_NO_FANS] = …;
static const u16 SCH5627_REG_IN_MSB[SCH5627_NO_IN] = …;
static const u16 SCH5627_REG_IN_LSN[SCH5627_NO_IN] = …;
static const u16 SCH5627_REG_IN_HIGH_NIBBLE[SCH5627_NO_IN] = …;
static const u16 SCH5627_REG_IN_FACTOR[SCH5627_NO_IN] = …;
static const char * const SCH5627_IN_LABELS[SCH5627_NO_IN] = …;
struct sch5627_data { … };
static const struct regmap_range sch5627_tunables_ranges[] = …;
static const struct regmap_access_table sch5627_tunables_table = …;
static const struct regmap_config sch5627_regmap_config = …;
static int sch5627_update_temp(struct sch5627_data *data)
{ … }
static int sch5627_update_fan(struct sch5627_data *data)
{ … }
static int sch5627_update_in(struct sch5627_data *data)
{ … }
static int reg_to_temp(u16 reg)
{ … }
static int reg_to_temp_limit(u8 reg)
{ … }
static int reg_to_rpm(u16 reg)
{ … }
static u8 sch5627_temp_limit_to_reg(long value)
{ … }
static u16 sch5627_rpm_to_reg(long value)
{ … }
static umode_t sch5627_is_visible(const void *drvdata, enum hwmon_sensor_types type, u32 attr,
int channel)
{ … }
static int sch5627_read(struct device *dev, enum hwmon_sensor_types type, u32 attr, int channel,
long *val)
{ … }
static int sch5627_read_string(struct device *dev, enum hwmon_sensor_types type, u32 attr,
int channel, const char **str)
{ … }
static int sch5627_write(struct device *dev, enum hwmon_sensor_types type, u32 attr, int channel,
long val)
{ … }
static const struct hwmon_ops sch5627_ops = …;
static const struct hwmon_channel_info * const sch5627_info[] = …;
static const struct hwmon_chip_info sch5627_chip_info = …;
static int sch5627_probe(struct platform_device *pdev)
{ … }
static int sch5627_suspend(struct device *dev)
{ … }
static int sch5627_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(sch5627_dev_pm_ops, sch5627_suspend, sch5627_resume);
static const struct platform_device_id sch5627_device_id[] = …;
MODULE_DEVICE_TABLE(platform, sch5627_device_id);
static struct platform_driver sch5627_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;