#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/hwmon.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
#include <linux/polynomial.h>
#include <linux/regmap.h>
static const struct polynomial poly_N_to_temp = …;
#define PVT_SENSOR_CTRL …
#define PVT_SENSOR_CFG …
#define SENSOR_CFG_CLK_CFG …
#define SENSOR_CFG_TRIM_VAL …
#define SENSOR_CFG_SAMPLE_ENA …
#define SENSOR_CFG_START_CAPTURE …
#define SENSOR_CFG_CONTINIOUS_MODE …
#define SENSOR_CFG_PSAMPLE_ENA …
#define PVT_SENSOR_STAT …
#define SENSOR_STAT_DATA_VALID …
#define SENSOR_STAT_DATA …
#define FAN_CFG …
#define FAN_CFG_DUTY_CYCLE …
#define INV_POL …
#define GATE_ENA …
#define PWM_OPEN_COL_ENA …
#define FAN_STAT_CFG …
#define FAN_PWM_FREQ …
#define FAN_PWM_CYC_10US …
#define FAN_PWM_FREQ_FREQ …
#define FAN_CNT …
#define FAN_CNT_DATA …
#define LAN966X_PVT_CLK …
struct lan966x_hwmon { … };
static int lan966x_hwmon_read_temp(struct device *dev, long *val)
{ … }
static int lan966x_hwmon_read_fan(struct device *dev, long *val)
{ … }
static int lan966x_hwmon_read_pwm(struct device *dev, long *val)
{ … }
static int lan966x_hwmon_read_pwm_freq(struct device *dev, long *val)
{ … }
static int lan966x_hwmon_read(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long *val)
{ … }
static int lan966x_hwmon_write_pwm(struct device *dev, long val)
{ … }
static int lan966x_hwmon_write_pwm_freq(struct device *dev, long val)
{ … }
static int lan966x_hwmon_write(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long val)
{ … }
static umode_t lan966x_hwmon_is_visible(const void *data,
enum hwmon_sensor_types type,
u32 attr, int channel)
{ … }
static const struct hwmon_channel_info * const lan966x_hwmon_info[] = …;
static const struct hwmon_ops lan966x_hwmon_ops = …;
static const struct hwmon_chip_info lan966x_hwmon_chip_info = …;
static void lan966x_hwmon_disable(void *data)
{ … }
static int lan966x_hwmon_enable(struct device *dev,
struct lan966x_hwmon *hwmon)
{ … }
static struct regmap *lan966x_init_regmap(struct platform_device *pdev,
const char *name)
{ … }
static int lan966x_hwmon_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id lan966x_hwmon_of_match[] = …;
MODULE_DEVICE_TABLE(of, lan966x_hwmon_of_match);
static struct platform_driver lan966x_hwmon_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;