linux/drivers/hwmon/adm1026.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * adm1026.c - Part of lm_sensors, Linux kernel modules for hardware
 *	       monitoring
 * Copyright (C) 2002, 2003  Philip Pokorny <[email protected]>
 * Copyright (C) 2004 Justin Thiessen <[email protected]>
 *
 * Chip details at:
 *
 * <https://www.onsemi.com/PowerSolutions/product.do?id=ADM1026>
 */

#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/jiffies.h>
#include <linux/i2c.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/hwmon-vid.h>
#include <linux/err.h>
#include <linux/mutex.h>

/* Addresses to scan */
static const unsigned short normal_i2c[] =;

static int gpio_input[17] =;
static int gpio_output[17] =;
static int gpio_inverted[17] =;
static int gpio_normal[17] =;
static int gpio_fan[8] =;
module_param_array();
MODULE_PARM_DESC();
module_param_array();
MODULE_PARM_DESC();
module_param_array();
MODULE_PARM_DESC();
module_param_array();
MODULE_PARM_DESC();
module_param_array();
MODULE_PARM_DESC();

/* Many ADM1026 constants specified below */

/* The ADM1026 registers */
#define ADM1026_REG_CONFIG1
#define CFG1_MONITOR
#define CFG1_INT_ENABLE
#define CFG1_INT_CLEAR
#define CFG1_AIN8_9
#define CFG1_THERM_HOT
#define CFG1_DAC_AFC
#define CFG1_PWM_AFC
#define CFG1_RESET

#define ADM1026_REG_CONFIG2
/* CONFIG2 controls FAN0/GPIO0 through FAN7/GPIO7 */

#define ADM1026_REG_CONFIG3
#define CFG3_GPIO16_ENABLE
#define CFG3_CI_CLEAR
#define CFG3_VREF_250
#define CFG3_GPIO16_DIR
#define CFG3_GPIO16_POL

#define ADM1026_REG_E2CONFIG
#define E2CFG_READ
#define E2CFG_WRITE
#define E2CFG_ERASE
#define E2CFG_ROM
#define E2CFG_CLK_EXT

/*
 * There are 10 general analog inputs and 7 dedicated inputs
 * They are:
 *    0 - 9  =  AIN0 - AIN9
 *       10  =  Vbat
 *       11  =  3.3V Standby
 *       12  =  3.3V Main
 *       13  =  +5V
 *       14  =  Vccp (CPU core voltage)
 *       15  =  +12V
 *       16  =  -12V
 */
static u16 ADM1026_REG_IN[] =;
static u16 ADM1026_REG_IN_MIN[] =;
static u16 ADM1026_REG_IN_MAX[] =;

/*
 * Temperatures are:
 *    0 - Internal
 *    1 - External 1
 *    2 - External 2
 */
static u16 ADM1026_REG_TEMP[] =;
static u16 ADM1026_REG_TEMP_MIN[] =;
static u16 ADM1026_REG_TEMP_MAX[] =;
static u16 ADM1026_REG_TEMP_TMIN[] =;
static u16 ADM1026_REG_TEMP_THERM[] =;
static u16 ADM1026_REG_TEMP_OFFSET[] =;

#define ADM1026_REG_FAN(nr)
#define ADM1026_REG_FAN_MIN(nr)
#define ADM1026_REG_FAN_DIV_0_3
#define ADM1026_REG_FAN_DIV_4_7

#define ADM1026_REG_DAC
#define ADM1026_REG_PWM

#define ADM1026_REG_GPIO_CFG_0_3
#define ADM1026_REG_GPIO_CFG_4_7
#define ADM1026_REG_GPIO_CFG_8_11
#define ADM1026_REG_GPIO_CFG_12_15
/* CFG_16 in REG_CFG3 */
#define ADM1026_REG_GPIO_STATUS_0_7
#define ADM1026_REG_GPIO_STATUS_8_15
/* STATUS_16 in REG_STATUS4 */
#define ADM1026_REG_GPIO_MASK_0_7
#define ADM1026_REG_GPIO_MASK_8_15
/* MASK_16 in REG_MASK4 */

#define ADM1026_REG_COMPANY
#define ADM1026_REG_VERSTEP
/* These are the recognized values for the above regs */
#define ADM1026_COMPANY_ANALOG_DEV
#define ADM1026_VERSTEP_GENERIC
#define ADM1026_VERSTEP_ADM1026

#define ADM1026_REG_MASK1
#define ADM1026_REG_MASK2
#define ADM1026_REG_MASK3
#define ADM1026_REG_MASK4

#define ADM1026_REG_STATUS1
#define ADM1026_REG_STATUS2
#define ADM1026_REG_STATUS3
#define ADM1026_REG_STATUS4

#define ADM1026_FAN_ACTIVATION_TEMP_HYST
#define ADM1026_FAN_CONTROL_TEMP_RANGE
#define ADM1026_PWM_MAX

/*
 * Conversions. Rounding and limit checking is only done on the TO_REG
 * variants. Note that you should be a bit careful with which arguments
 * these macros are called: arguments may be evaluated more than once.
 */

/*
 * IN are scaled according to built-in resistors.  These are the
 *   voltages corresponding to 3/4 of full scale (192 or 0xc0)
 *   NOTE: The -12V input needs an additional factor to account
 *      for the Vref pullup resistor.
 *      NEG12_OFFSET = SCALE * Vref / V-192 - Vref
 *                   = 13875 * 2.50 / 1.875 - 2500
 *                   = 16000
 *
 * The values in this table are based on Table II, page 15 of the
 *    datasheet.
 */
static int adm1026_scaling[] =;
#define NEG12_OFFSET
#define SCALE(val, from, to)
#define INS_TO_REG(n, val)
#define INS_FROM_REG(n, val)

/*
 * FAN speed is measured using 22.5kHz clock and counts for 2 pulses
 *   and we assume a 2 pulse-per-rev fan tach signal
 *      22500 kHz * 60 (sec/min) * 2 (pulse) / 2 (pulse/rev) == 1350000
 */
#define FAN_TO_REG(val, div)
#define FAN_FROM_REG(val, div)
#define DIV_FROM_REG(val)
#define DIV_TO_REG(val)

/* Temperature is reported in 1 degC increments */
#define TEMP_TO_REG(val)
#define TEMP_FROM_REG(val)
#define OFFSET_TO_REG(val)
#define OFFSET_FROM_REG(val)

#define PWM_TO_REG(val)
#define PWM_FROM_REG(val)

#define PWM_MIN_TO_REG(val)
#define PWM_MIN_FROM_REG(val)

/*
 * Analog output is a voltage, and scaled to millivolts.  The datasheet
 *   indicates that the DAC could be used to drive the fans, but in our
 *   example board (Arima HDAMA) it isn't connected to the fans at all.
 */
#define DAC_TO_REG(val)
#define DAC_FROM_REG(val)

/*
 * Chip sampling rates
 *
 * Some sensors are not updated more frequently than once per second
 *    so it doesn't make sense to read them more often than that.
 *    We cache the results and return the saved data if the driver
 *    is called again before a second has elapsed.
 *
 * Also, there is significant configuration data for this chip
 *    So, we keep the config data up to date in the cache
 *    when it is written and only sample it once every 5 *minutes*
 */
#define ADM1026_DATA_INTERVAL
#define ADM1026_CONFIG_INTERVAL

/*
 * We allow for multiple chips in a single system.
 *
 * For each registered ADM1026, we need to keep state information
 * at client->data. The adm1026_data structure is dynamically
 * allocated, when a new client structure is allocated.
 */

struct pwm_data {};

struct adm1026_data {};

static int adm1026_read_value(struct i2c_client *client, u8 reg)
{}

static int adm1026_write_value(struct i2c_client *client, u8 reg, int value)
{}

static struct adm1026_data *adm1026_update_device(struct device *dev)
{}

static ssize_t in_show(struct device *dev, struct device_attribute *attr,
		       char *buf)
{}
static ssize_t in_min_show(struct device *dev, struct device_attribute *attr,
			   char *buf)
{}
static ssize_t in_min_store(struct device *dev, struct device_attribute *attr,
			    const char *buf, size_t count)
{}
static ssize_t in_max_show(struct device *dev, struct device_attribute *attr,
			   char *buf)
{}
static ssize_t in_max_store(struct device *dev, struct device_attribute *attr,
			    const char *buf, size_t count)
{}

static SENSOR_DEVICE_ATTR_RO(in0_input, in, 0);
static SENSOR_DEVICE_ATTR_RW(in0_min, in_min, 0);
static SENSOR_DEVICE_ATTR_RW(in0_max, in_max, 0);
static SENSOR_DEVICE_ATTR_RO(in1_input, in, 1);
static SENSOR_DEVICE_ATTR_RW(in1_min, in_min, 1);
static SENSOR_DEVICE_ATTR_RW(in1_max, in_max, 1);
static SENSOR_DEVICE_ATTR_RO(in2_input, in, 2);
static SENSOR_DEVICE_ATTR_RW(in2_min, in_min, 2);
static SENSOR_DEVICE_ATTR_RW(in2_max, in_max, 2);
static SENSOR_DEVICE_ATTR_RO(in3_input, in, 3);
static SENSOR_DEVICE_ATTR_RW(in3_min, in_min, 3);
static SENSOR_DEVICE_ATTR_RW(in3_max, in_max, 3);
static SENSOR_DEVICE_ATTR_RO(in4_input, in, 4);
static SENSOR_DEVICE_ATTR_RW(in4_min, in_min, 4);
static SENSOR_DEVICE_ATTR_RW(in4_max, in_max, 4);
static SENSOR_DEVICE_ATTR_RO(in5_input, in, 5);
static SENSOR_DEVICE_ATTR_RW(in5_min, in_min, 5);
static SENSOR_DEVICE_ATTR_RW(in5_max, in_max, 5);
static SENSOR_DEVICE_ATTR_RO(in6_input, in, 6);
static SENSOR_DEVICE_ATTR_RW(in6_min, in_min, 6);
static SENSOR_DEVICE_ATTR_RW(in6_max, in_max, 6);
static SENSOR_DEVICE_ATTR_RO(in7_input, in, 7);
static SENSOR_DEVICE_ATTR_RW(in7_min, in_min, 7);
static SENSOR_DEVICE_ATTR_RW(in7_max, in_max, 7);
static SENSOR_DEVICE_ATTR_RO(in8_input, in, 8);
static SENSOR_DEVICE_ATTR_RW(in8_min, in_min, 8);
static SENSOR_DEVICE_ATTR_RW(in8_max, in_max, 8);
static SENSOR_DEVICE_ATTR_RO(in9_input, in, 9);
static SENSOR_DEVICE_ATTR_RW(in9_min, in_min, 9);
static SENSOR_DEVICE_ATTR_RW(in9_max, in_max, 9);
static SENSOR_DEVICE_ATTR_RO(in10_input, in, 10);
static SENSOR_DEVICE_ATTR_RW(in10_min, in_min, 10);
static SENSOR_DEVICE_ATTR_RW(in10_max, in_max, 10);
static SENSOR_DEVICE_ATTR_RO(in11_input, in, 11);
static SENSOR_DEVICE_ATTR_RW(in11_min, in_min, 11);
static SENSOR_DEVICE_ATTR_RW(in11_max, in_max, 11);
static SENSOR_DEVICE_ATTR_RO(in12_input, in, 12);
static SENSOR_DEVICE_ATTR_RW(in12_min, in_min, 12);
static SENSOR_DEVICE_ATTR_RW(in12_max, in_max, 12);
static SENSOR_DEVICE_ATTR_RO(in13_input, in, 13);
static SENSOR_DEVICE_ATTR_RW(in13_min, in_min, 13);
static SENSOR_DEVICE_ATTR_RW(in13_max, in_max, 13);
static SENSOR_DEVICE_ATTR_RO(in14_input, in, 14);
static SENSOR_DEVICE_ATTR_RW(in14_min, in_min, 14);
static SENSOR_DEVICE_ATTR_RW(in14_max, in_max, 14);
static SENSOR_DEVICE_ATTR_RO(in15_input, in, 15);
static SENSOR_DEVICE_ATTR_RW(in15_min, in_min, 15);
static SENSOR_DEVICE_ATTR_RW(in15_max, in_max, 15);

static ssize_t in16_show(struct device *dev, struct device_attribute *attr,
			 char *buf)
{}
static ssize_t in16_min_show(struct device *dev,
			     struct device_attribute *attr, char *buf)
{}
static ssize_t in16_min_store(struct device *dev,
			      struct device_attribute *attr, const char *buf,
			      size_t count)
{}
static ssize_t in16_max_show(struct device *dev,
			     struct device_attribute *attr, char *buf)
{}
static ssize_t in16_max_store(struct device *dev,
			      struct device_attribute *attr, const char *buf,
			      size_t count)
{}

static SENSOR_DEVICE_ATTR_RO(in16_input, in16, 16);
static SENSOR_DEVICE_ATTR_RW(in16_min, in16_min, 16);
static SENSOR_DEVICE_ATTR_RW(in16_max, in16_max, 16);

/* Now add fan read/write functions */

static ssize_t fan_show(struct device *dev, struct device_attribute *attr,
			char *buf)
{}
static ssize_t fan_min_show(struct device *dev, struct device_attribute *attr,
			    char *buf)
{}
static ssize_t fan_min_store(struct device *dev,
			     struct device_attribute *attr, const char *buf,
			     size_t count)
{}

static SENSOR_DEVICE_ATTR_RO(fan1_input, fan, 0);
static SENSOR_DEVICE_ATTR_RW(fan1_min, fan_min, 0);
static SENSOR_DEVICE_ATTR_RO(fan2_input, fan, 1);
static SENSOR_DEVICE_ATTR_RW(fan2_min, fan_min, 1);
static SENSOR_DEVICE_ATTR_RO(fan3_input, fan, 2);
static SENSOR_DEVICE_ATTR_RW(fan3_min, fan_min, 2);
static SENSOR_DEVICE_ATTR_RO(fan4_input, fan, 3);
static SENSOR_DEVICE_ATTR_RW(fan4_min, fan_min, 3);
static SENSOR_DEVICE_ATTR_RO(fan5_input, fan, 4);
static SENSOR_DEVICE_ATTR_RW(fan5_min, fan_min, 4);
static SENSOR_DEVICE_ATTR_RO(fan6_input, fan, 5);
static SENSOR_DEVICE_ATTR_RW(fan6_min, fan_min, 5);
static SENSOR_DEVICE_ATTR_RO(fan7_input, fan, 6);
static SENSOR_DEVICE_ATTR_RW(fan7_min, fan_min, 6);
static SENSOR_DEVICE_ATTR_RO(fan8_input, fan, 7);
static SENSOR_DEVICE_ATTR_RW(fan8_min, fan_min, 7);

/* Adjust fan_min to account for new fan divisor */
static void fixup_fan_min(struct device *dev, int fan, int old_div)
{}

/* Now add fan_div read/write functions */
static ssize_t fan_div_show(struct device *dev, struct device_attribute *attr,
			    char *buf)
{}
static ssize_t fan_div_store(struct device *dev,
			     struct device_attribute *attr, const char *buf,
			     size_t count)
{}

static SENSOR_DEVICE_ATTR_RW(fan1_div, fan_div, 0);
static SENSOR_DEVICE_ATTR_RW(fan2_div, fan_div, 1);
static SENSOR_DEVICE_ATTR_RW(fan3_div, fan_div, 2);
static SENSOR_DEVICE_ATTR_RW(fan4_div, fan_div, 3);
static SENSOR_DEVICE_ATTR_RW(fan5_div, fan_div, 4);
static SENSOR_DEVICE_ATTR_RW(fan6_div, fan_div, 5);
static SENSOR_DEVICE_ATTR_RW(fan7_div, fan_div, 6);
static SENSOR_DEVICE_ATTR_RW(fan8_div, fan_div, 7);

/* Temps */
static ssize_t temp_show(struct device *dev, struct device_attribute *attr,
			 char *buf)
{}
static ssize_t temp_min_show(struct device *dev,
			     struct device_attribute *attr, char *buf)
{}
static ssize_t temp_min_store(struct device *dev,
			      struct device_attribute *attr, const char *buf,
			      size_t count)
{}
static ssize_t temp_max_show(struct device *dev,
			     struct device_attribute *attr, char *buf)
{}
static ssize_t temp_max_store(struct device *dev,
			      struct device_attribute *attr, const char *buf,
			      size_t count)
{}

static SENSOR_DEVICE_ATTR_RO(temp1_input, temp, 0);
static SENSOR_DEVICE_ATTR_RW(temp1_min, temp_min, 0);
static SENSOR_DEVICE_ATTR_RW(temp1_max, temp_max, 0);
static SENSOR_DEVICE_ATTR_RO(temp2_input, temp, 1);
static SENSOR_DEVICE_ATTR_RW(temp2_min, temp_min, 1);
static SENSOR_DEVICE_ATTR_RW(temp2_max, temp_max, 1);
static SENSOR_DEVICE_ATTR_RO(temp3_input, temp, 2);
static SENSOR_DEVICE_ATTR_RW(temp3_min, temp_min, 2);
static SENSOR_DEVICE_ATTR_RW(temp3_max, temp_max, 2);

static ssize_t temp_offset_show(struct device *dev,
				struct device_attribute *attr, char *buf)
{}
static ssize_t temp_offset_store(struct device *dev,
				 struct device_attribute *attr,
				 const char *buf, size_t count)
{}

static SENSOR_DEVICE_ATTR_RW(temp1_offset, temp_offset, 0);
static SENSOR_DEVICE_ATTR_RW(temp2_offset, temp_offset, 1);
static SENSOR_DEVICE_ATTR_RW(temp3_offset, temp_offset, 2);

static ssize_t temp_auto_point1_temp_hyst_show(struct device *dev,
					       struct device_attribute *attr,
					       char *buf)
{}
static ssize_t temp_auto_point2_temp_show(struct device *dev,
					  struct device_attribute *attr,
					  char *buf)
{}
static ssize_t temp_auto_point1_temp_show(struct device *dev,
					  struct device_attribute *attr,
					  char *buf)
{}
static ssize_t temp_auto_point1_temp_store(struct device *dev,
					   struct device_attribute *attr,
					   const char *buf, size_t count)
{}

static SENSOR_DEVICE_ATTR_RW(temp1_auto_point1_temp, temp_auto_point1_temp, 0);
static SENSOR_DEVICE_ATTR_RO(temp1_auto_point1_temp_hyst,
			     temp_auto_point1_temp_hyst, 0);
static SENSOR_DEVICE_ATTR_RO(temp1_auto_point2_temp, temp_auto_point2_temp, 0);
static SENSOR_DEVICE_ATTR_RW(temp2_auto_point1_temp, temp_auto_point1_temp, 1);
static SENSOR_DEVICE_ATTR_RO(temp2_auto_point1_temp_hyst,
			     temp_auto_point1_temp_hyst, 1);
static SENSOR_DEVICE_ATTR_RO(temp2_auto_point2_temp, temp_auto_point2_temp, 1);
static SENSOR_DEVICE_ATTR_RW(temp3_auto_point1_temp, temp_auto_point1_temp, 2);
static SENSOR_DEVICE_ATTR_RO(temp3_auto_point1_temp_hyst,
			     temp_auto_point1_temp_hyst, 2);
static SENSOR_DEVICE_ATTR_RO(temp3_auto_point2_temp, temp_auto_point2_temp, 2);

static ssize_t show_temp_crit_enable(struct device *dev,
		struct device_attribute *attr, char *buf)
{}
static ssize_t set_temp_crit_enable(struct device *dev,
		struct device_attribute *attr, const char *buf, size_t count)
{}

static DEVICE_ATTR(temp1_crit_enable, 0644, show_temp_crit_enable,
		   set_temp_crit_enable);
static DEVICE_ATTR(temp2_crit_enable, 0644, show_temp_crit_enable,
		   set_temp_crit_enable);
static DEVICE_ATTR(temp3_crit_enable, 0644, show_temp_crit_enable,
		   set_temp_crit_enable);

static ssize_t temp_crit_show(struct device *dev,
			      struct device_attribute *attr, char *buf)
{}
static ssize_t temp_crit_store(struct device *dev,
			       struct device_attribute *attr, const char *buf,
			       size_t count)
{}

static SENSOR_DEVICE_ATTR_RW(temp1_crit, temp_crit, 0);
static SENSOR_DEVICE_ATTR_RW(temp2_crit, temp_crit, 1);
static SENSOR_DEVICE_ATTR_RW(temp3_crit, temp_crit, 2);

static ssize_t analog_out_show(struct device *dev,
			       struct device_attribute *attr, char *buf)
{}
static ssize_t analog_out_store(struct device *dev,
				struct device_attribute *attr,
				const char *buf, size_t count)
{}

static DEVICE_ATTR_RW(analog_out);

static ssize_t cpu0_vid_show(struct device *dev,
			     struct device_attribute *attr, char *buf)
{}

static DEVICE_ATTR_RO(cpu0_vid);

static ssize_t vrm_show(struct device *dev, struct device_attribute *attr,
			char *buf)
{}

static ssize_t vrm_store(struct device *dev, struct device_attribute *attr,
			 const char *buf, size_t count)
{}

static DEVICE_ATTR_RW(vrm);

static ssize_t alarms_show(struct device *dev, struct device_attribute *attr,
			   char *buf)
{}

static DEVICE_ATTR_RO(alarms);

static ssize_t alarm_show(struct device *dev, struct device_attribute *attr,
			  char *buf)
{}

static SENSOR_DEVICE_ATTR_RO(temp2_alarm, alarm, 0);
static SENSOR_DEVICE_ATTR_RO(temp3_alarm, alarm, 1);
static SENSOR_DEVICE_ATTR_RO(in9_alarm, alarm, 1);
static SENSOR_DEVICE_ATTR_RO(in11_alarm, alarm, 2);
static SENSOR_DEVICE_ATTR_RO(in12_alarm, alarm, 3);
static SENSOR_DEVICE_ATTR_RO(in13_alarm, alarm, 4);
static SENSOR_DEVICE_ATTR_RO(in14_alarm, alarm, 5);
static SENSOR_DEVICE_ATTR_RO(in15_alarm, alarm, 6);
static SENSOR_DEVICE_ATTR_RO(in16_alarm, alarm, 7);
static SENSOR_DEVICE_ATTR_RO(in0_alarm, alarm, 8);
static SENSOR_DEVICE_ATTR_RO(in1_alarm, alarm, 9);
static SENSOR_DEVICE_ATTR_RO(in2_alarm, alarm, 10);
static SENSOR_DEVICE_ATTR_RO(in3_alarm, alarm, 11);
static SENSOR_DEVICE_ATTR_RO(in4_alarm, alarm, 12);
static SENSOR_DEVICE_ATTR_RO(in5_alarm, alarm, 13);
static SENSOR_DEVICE_ATTR_RO(in6_alarm, alarm, 14);
static SENSOR_DEVICE_ATTR_RO(in7_alarm, alarm, 15);
static SENSOR_DEVICE_ATTR_RO(fan1_alarm, alarm, 16);
static SENSOR_DEVICE_ATTR_RO(fan2_alarm, alarm, 17);
static SENSOR_DEVICE_ATTR_RO(fan3_alarm, alarm, 18);
static SENSOR_DEVICE_ATTR_RO(fan4_alarm, alarm, 19);
static SENSOR_DEVICE_ATTR_RO(fan5_alarm, alarm, 20);
static SENSOR_DEVICE_ATTR_RO(fan6_alarm, alarm, 21);
static SENSOR_DEVICE_ATTR_RO(fan7_alarm, alarm, 22);
static SENSOR_DEVICE_ATTR_RO(fan8_alarm, alarm, 23);
static SENSOR_DEVICE_ATTR_RO(temp1_alarm, alarm, 24);
static SENSOR_DEVICE_ATTR_RO(in10_alarm, alarm, 25);
static SENSOR_DEVICE_ATTR_RO(in8_alarm, alarm, 26);

static ssize_t alarm_mask_show(struct device *dev,
			       struct device_attribute *attr, char *buf)
{}
static ssize_t alarm_mask_store(struct device *dev,
				struct device_attribute *attr,
				const char *buf, size_t count)
{}

static DEVICE_ATTR_RW(alarm_mask);

static ssize_t gpio_show(struct device *dev, struct device_attribute *attr,
			 char *buf)
{}
static ssize_t gpio_store(struct device *dev, struct device_attribute *attr,
			  const char *buf, size_t count)
{}

static DEVICE_ATTR_RW(gpio);

static ssize_t gpio_mask_show(struct device *dev,
			      struct device_attribute *attr,
			      char *buf)
{}
static ssize_t gpio_mask_store(struct device *dev,
			       struct device_attribute *attr, const char *buf,
			       size_t count)
{}

static DEVICE_ATTR_RW(gpio_mask);

static ssize_t pwm1_show(struct device *dev, struct device_attribute *attr,
			 char *buf)
{}

static ssize_t pwm1_store(struct device *dev, struct device_attribute *attr,
			  const char *buf, size_t count)
{}

static ssize_t temp1_auto_point1_pwm_show(struct device *dev,
					  struct device_attribute *attr,
					  char *buf)
{}

static ssize_t temp1_auto_point1_pwm_store(struct device *dev,
					   struct device_attribute *attr,
					   const char *buf, size_t count)
{}

static ssize_t temp1_auto_point2_pwm_show(struct device *dev,
					  struct device_attribute *attr,
					  char *buf)
{}

static ssize_t pwm1_enable_show(struct device *dev,
				struct device_attribute *attr, char *buf)
{}

static ssize_t pwm1_enable_store(struct device *dev,
				 struct device_attribute *attr,
				 const char *buf, size_t count)
{}

/* enable PWM fan control */
static DEVICE_ATTR_RW(pwm1);
static DEVICE_ATTR(pwm2, 0644, pwm1_show, pwm1_store);
static DEVICE_ATTR(pwm3, 0644, pwm1_show, pwm1_store);
static DEVICE_ATTR_RW(pwm1_enable);
static DEVICE_ATTR(pwm2_enable, 0644, pwm1_enable_show,
		   pwm1_enable_store);
static DEVICE_ATTR(pwm3_enable, 0644, pwm1_enable_show,
		   pwm1_enable_store);
static DEVICE_ATTR_RW(temp1_auto_point1_pwm);
static DEVICE_ATTR(temp2_auto_point1_pwm, 0644,
		   temp1_auto_point1_pwm_show, temp1_auto_point1_pwm_store);
static DEVICE_ATTR(temp3_auto_point1_pwm, 0644,
		   temp1_auto_point1_pwm_show, temp1_auto_point1_pwm_store);

static DEVICE_ATTR_RO(temp1_auto_point2_pwm);
static DEVICE_ATTR(temp2_auto_point2_pwm, 0444, temp1_auto_point2_pwm_show,
		   NULL);
static DEVICE_ATTR(temp3_auto_point2_pwm, 0444, temp1_auto_point2_pwm_show,
		   NULL);

static struct attribute *adm1026_attributes[] =;

static const struct attribute_group adm1026_group =;

static struct attribute *adm1026_attributes_temp3[] =;

static const struct attribute_group adm1026_group_temp3 =;

static struct attribute *adm1026_attributes_in8_9[] =;

static const struct attribute_group adm1026_group_in8_9 =;

/* Return 0 if detection is successful, -ENODEV otherwise */
static int adm1026_detect(struct i2c_client *client,
			  struct i2c_board_info *info)
{}

static void adm1026_print_gpio(struct i2c_client *client)
{}

static void adm1026_fixup_gpio(struct i2c_client *client)
{}

static void adm1026_init_client(struct i2c_client *client)
{}

static int adm1026_probe(struct i2c_client *client)
{}

static const struct i2c_device_id adm1026_id[] =;
MODULE_DEVICE_TABLE(i2c, adm1026_id);

static struct i2c_driver adm1026_driver =;

module_i2c_driver();

MODULE_LICENSE();
MODULE_AUTHOR();
MODULE_DESCRIPTION();