#include <linux/bitops.h>
#include <linux/device.h>
#include <linux/hwmon.h>
#include <linux/module.h>
#include <linux/platform_data/mlxreg.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/thermal.h>
#define MLXREG_FAN_MAX_TACHO …
#define MLXREG_FAN_MAX_PWM …
#define MLXREG_FAN_PWM_NOT_CONNECTED …
#define MLXREG_FAN_MAX_STATE …
#define MLXREG_FAN_MIN_DUTY …
#define MLXREG_FAN_MAX_DUTY …
#define MLXREG_FAN_SPEED_MIN_LEVEL …
#define MLXREG_FAN_TACHO_SAMPLES_PER_PULSE_DEF …
#define MLXREG_FAN_TACHO_DIV_MIN …
#define MLXREG_FAN_TACHO_DIV_DEF …
#define MLXREG_FAN_TACHO_DIV_SCALE_MAX …
#define MLXREG_FAN_GET_RPM(rval, d, s) …
#define MLXREG_FAN_GET_FAULT(val, mask) …
#define MLXREG_FAN_PWM_DUTY2STATE(duty) …
#define MLXREG_FAN_PWM_STATE2DUTY(stat) …
struct mlxreg_fan;
struct mlxreg_fan_tacho { … };
struct mlxreg_fan_pwm { … };
struct mlxreg_fan { … };
static int mlxreg_fan_set_cur_state(struct thermal_cooling_device *cdev,
unsigned long state);
static int
mlxreg_fan_read(struct device *dev, enum hwmon_sensor_types type, u32 attr,
int channel, long *val)
{ … }
static int
mlxreg_fan_write(struct device *dev, enum hwmon_sensor_types type, u32 attr,
int channel, long val)
{ … }
static umode_t
mlxreg_fan_is_visible(const void *data, enum hwmon_sensor_types type, u32 attr,
int channel)
{ … }
static char *mlxreg_fan_name[] = …;
static const struct hwmon_channel_info * const mlxreg_fan_hwmon_info[] = …;
static const struct hwmon_ops mlxreg_fan_hwmon_hwmon_ops = …;
static const struct hwmon_chip_info mlxreg_fan_hwmon_chip_info = …;
static int mlxreg_fan_get_max_state(struct thermal_cooling_device *cdev,
unsigned long *state)
{ … }
static int mlxreg_fan_get_cur_state(struct thermal_cooling_device *cdev,
unsigned long *state)
{ … }
static int mlxreg_fan_set_cur_state(struct thermal_cooling_device *cdev,
unsigned long state)
{ … }
static const struct thermal_cooling_device_ops mlxreg_fan_cooling_ops = …;
static int mlxreg_fan_connect_verify(struct mlxreg_fan *fan,
struct mlxreg_core_data *data)
{ … }
static int mlxreg_pwm_connect_verify(struct mlxreg_fan *fan,
struct mlxreg_core_data *data)
{ … }
static int mlxreg_fan_speed_divider_get(struct mlxreg_fan *fan,
struct mlxreg_core_data *data)
{ … }
static int mlxreg_fan_config(struct mlxreg_fan *fan,
struct mlxreg_core_platform_data *pdata)
{ … }
static int mlxreg_fan_cooling_config(struct device *dev, struct mlxreg_fan *fan)
{ … }
static int mlxreg_fan_probe(struct platform_device *pdev)
{ … }
static struct platform_driver mlxreg_fan_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;