#include <linux/interrupt.h>
#include <linux/gpio/consumer.h>
#include <linux/irq.h>
#include <linux/workqueue.h>
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/sysfs.h>
#include <linux/list.h>
#include <linux/i2c.h>
#include <linux/rtc.h>
#include <linux/module.h>
#include <linux/iio/iio.h>
#include <linux/iio/events.h>
#include <linux/iio/sysfs.h>
#include "adt7316.h"
#define ADT7316_INT_STAT1 …
#define ADT7316_INT_STAT2 …
#define ADT7316_LSB_IN_TEMP_VDD …
#define ADT7316_LSB_IN_TEMP_MASK …
#define ADT7316_LSB_VDD_MASK …
#define ADT7316_LSB_VDD_OFFSET …
#define ADT7316_LSB_EX_TEMP_AIN …
#define ADT7316_LSB_EX_TEMP_MASK …
#define ADT7516_LSB_AIN_SHIFT …
#define ADT7316_AD_MSB_DATA_BASE …
#define ADT7316_AD_MSB_DATA_REGS …
#define ADT7516_AD_MSB_DATA_REGS …
#define ADT7316_MSB_VDD …
#define ADT7316_MSB_IN_TEMP …
#define ADT7316_MSB_EX_TEMP …
#define ADT7516_MSB_AIN1 …
#define ADT7516_MSB_AIN2 …
#define ADT7516_MSB_AIN3 …
#define ADT7516_MSB_AIN4 …
#define ADT7316_DA_DATA_BASE …
#define ADT7316_DA_10_BIT_LSB_SHIFT …
#define ADT7316_DA_12_BIT_LSB_SHIFT …
#define ADT7316_DA_MSB_DATA_REGS …
#define ADT7316_LSB_DAC_A …
#define ADT7316_MSB_DAC_A …
#define ADT7316_LSB_DAC_B …
#define ADT7316_MSB_DAC_B …
#define ADT7316_LSB_DAC_C …
#define ADT7316_MSB_DAC_C …
#define ADT7316_LSB_DAC_D …
#define ADT7316_MSB_DAC_D …
#define ADT7316_CONFIG1 …
#define ADT7316_CONFIG2 …
#define ADT7316_CONFIG3 …
#define ADT7316_DAC_CONFIG …
#define ADT7316_LDAC_CONFIG …
#define ADT7316_INT_MASK1 …
#define ADT7316_INT_MASK2 …
#define ADT7316_IN_TEMP_OFFSET …
#define ADT7316_EX_TEMP_OFFSET …
#define ADT7316_IN_ANALOG_TEMP_OFFSET …
#define ADT7316_EX_ANALOG_TEMP_OFFSET …
#define ADT7316_VDD_HIGH …
#define ADT7316_VDD_LOW …
#define ADT7316_IN_TEMP_HIGH …
#define ADT7316_IN_TEMP_LOW …
#define ADT7316_EX_TEMP_HIGH …
#define ADT7316_EX_TEMP_LOW …
#define ADT7516_AIN2_HIGH …
#define ADT7516_AIN2_LOW …
#define ADT7516_AIN3_HIGH …
#define ADT7516_AIN3_LOW …
#define ADT7516_AIN4_HIGH …
#define ADT7516_AIN4_LOW …
#define ADT7316_DEVICE_ID …
#define ADT7316_MANUFACTURE_ID …
#define ADT7316_DEVICE_REV …
#define ADT7316_SPI_LOCK_STAT …
#define ADT7316_EN …
#define ADT7516_SEL_EX_TEMP …
#define ADT7516_SEL_AIN1_2_EX_TEMP_MASK …
#define ADT7516_SEL_AIN3 …
#define ADT7316_INT_EN …
#define ADT7316_INT_POLARITY …
#define ADT7316_PD …
#define ADT7316_AD_SINGLE_CH_MASK …
#define ADT7516_AD_SINGLE_CH_MASK …
#define ADT7316_AD_SINGLE_CH_VDD …
#define ADT7316_AD_SINGLE_CH_IN …
#define ADT7316_AD_SINGLE_CH_EX …
#define ADT7516_AD_SINGLE_CH_AIN1 …
#define ADT7516_AD_SINGLE_CH_AIN2 …
#define ADT7516_AD_SINGLE_CH_AIN3 …
#define ADT7516_AD_SINGLE_CH_AIN4 …
#define ADT7316_AD_SINGLE_CH_MODE …
#define ADT7316_DISABLE_AVERAGING …
#define ADT7316_EN_SMBUS_TIMEOUT …
#define ADT7316_RESET …
#define ADT7316_ADCLK_22_5 …
#define ADT7316_DA_HIGH_RESOLUTION …
#define ADT7316_DA_EN_VIA_DAC_LDAC …
#define ADT7516_AIN_IN_VREF …
#define ADT7316_EN_IN_TEMP_PROP_DACA …
#define ADT7316_EN_EX_TEMP_PROP_DACB …
#define ADT7316_DA_2VREF_CH_MASK …
#define ADT7316_DA_EN_MODE_MASK …
#define ADT7316_DA_EN_MODE_SHIFT …
#define ADT7316_DA_EN_MODE_SINGLE …
#define ADT7316_DA_EN_MODE_AB_CD …
#define ADT7316_DA_EN_MODE_ABCD …
#define ADT7316_DA_EN_MODE_LDAC …
#define ADT7316_VREF_BYPASS_DAC_AB …
#define ADT7316_VREF_BYPASS_DAC_CD …
#define ADT7316_LDAC_EN_DA_MASK …
#define ADT7316_DAC_IN_VREF …
#define ADT7516_DAC_AB_IN_VREF …
#define ADT7516_DAC_CD_IN_VREF …
#define ADT7516_DAC_IN_VREF_OFFSET …
#define ADT7516_DAC_IN_VREF_MASK …
#define ADT7316_INT_MASK2_VDD …
#define ADT7316_VALUE_MASK …
#define ADT7316_T_VALUE_SIGN …
#define ADT7316_T_VALUE_FLOAT_OFFSET …
#define ADT7316_T_VALUE_FLOAT_MASK …
#define ID_ADT7316 …
#define ID_ADT7317 …
#define ID_ADT7318 …
#define ID_ADT7516 …
#define ID_ADT7517 …
#define ID_ADT7519 …
#define ID_FAMILY_MASK …
#define ID_ADT73XX …
#define ID_ADT75XX …
struct adt7316_chip_info { … };
#define ADT7316_IN_TEMP_HIGH_INT_MASK …
#define ADT7316_IN_TEMP_LOW_INT_MASK …
#define ADT7316_EX_TEMP_HIGH_INT_MASK …
#define ADT7316_EX_TEMP_LOW_INT_MASK …
#define ADT7316_EX_TEMP_FAULT_INT_MASK …
#define ADT7516_AIN1_INT_MASK …
#define ADT7516_AIN2_INT_MASK …
#define ADT7516_AIN3_INT_MASK …
#define ADT7516_AIN4_INT_MASK …
#define ADT7316_VDD_INT_MASK …
#define ADT7316_TEMP_INT_MASK …
#define ADT7516_AIN_INT_MASK …
#define ADT7316_TEMP_AIN_INT_MASK …
static ssize_t adt7316_show_enabled(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t _adt7316_store_enabled(struct adt7316_chip_info *chip,
int enable)
{ … }
static ssize_t adt7316_store_enabled(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static IIO_DEVICE_ATTR(enabled, 0644,
adt7316_show_enabled,
adt7316_store_enabled,
0);
static ssize_t adt7316_show_select_ex_temp(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t adt7316_store_select_ex_temp(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static IIO_DEVICE_ATTR(select_ex_temp, 0644,
adt7316_show_select_ex_temp,
adt7316_store_select_ex_temp,
0);
static ssize_t adt7316_show_mode(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t adt7316_store_mode(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static IIO_DEVICE_ATTR(mode, 0644,
adt7316_show_mode,
adt7316_store_mode,
0);
static ssize_t adt7316_show_all_modes(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static IIO_DEVICE_ATTR(all_modes, 0444, adt7316_show_all_modes, NULL, 0);
static ssize_t adt7316_show_ad_channel(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t adt7316_store_ad_channel(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static IIO_DEVICE_ATTR(ad_channel, 0644,
adt7316_show_ad_channel,
adt7316_store_ad_channel,
0);
static ssize_t adt7316_show_all_ad_channels(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static IIO_DEVICE_ATTR(all_ad_channels, 0444,
adt7316_show_all_ad_channels, NULL, 0);
static ssize_t adt7316_show_disable_averaging(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t adt7316_store_disable_averaging(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static IIO_DEVICE_ATTR(disable_averaging, 0644,
adt7316_show_disable_averaging,
adt7316_store_disable_averaging,
0);
static ssize_t adt7316_show_enable_smbus_timeout(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t adt7316_store_enable_smbus_timeout(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static IIO_DEVICE_ATTR(enable_smbus_timeout, 0644,
adt7316_show_enable_smbus_timeout,
adt7316_store_enable_smbus_timeout,
0);
static ssize_t adt7316_show_powerdown(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t adt7316_store_powerdown(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static IIO_DEVICE_ATTR(powerdown, 0644,
adt7316_show_powerdown,
adt7316_store_powerdown,
0);
static ssize_t adt7316_show_fast_ad_clock(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t adt7316_store_fast_ad_clock(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static IIO_DEVICE_ATTR(fast_ad_clock, 0644,
adt7316_show_fast_ad_clock,
adt7316_store_fast_ad_clock,
0);
static ssize_t adt7316_show_da_high_resolution(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t adt7316_store_da_high_resolution(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static IIO_DEVICE_ATTR(da_high_resolution, 0644,
adt7316_show_da_high_resolution,
adt7316_store_da_high_resolution,
0);
static ssize_t adt7316_show_AIN_internal_Vref(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t adt7316_store_AIN_internal_Vref(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static IIO_DEVICE_ATTR(AIN_internal_Vref, 0644,
adt7316_show_AIN_internal_Vref,
adt7316_store_AIN_internal_Vref,
0);
static ssize_t adt7316_show_enable_prop_DACA(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t adt7316_store_enable_prop_DACA(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static IIO_DEVICE_ATTR(enable_proportion_DACA, 0644,
adt7316_show_enable_prop_DACA,
adt7316_store_enable_prop_DACA,
0);
static ssize_t adt7316_show_enable_prop_DACB(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t adt7316_store_enable_prop_DACB(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static IIO_DEVICE_ATTR(enable_proportion_DACB, 0644,
adt7316_show_enable_prop_DACB,
adt7316_store_enable_prop_DACB,
0);
static ssize_t adt7316_show_DAC_2Vref_ch_mask(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t adt7316_store_DAC_2Vref_ch_mask(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static IIO_DEVICE_ATTR(DAC_2Vref_channels_mask, 0644,
adt7316_show_DAC_2Vref_ch_mask,
adt7316_store_DAC_2Vref_ch_mask,
0);
static ssize_t adt7316_show_DAC_update_mode(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t adt7316_store_DAC_update_mode(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static IIO_DEVICE_ATTR(DAC_update_mode, 0644,
adt7316_show_DAC_update_mode,
adt7316_store_DAC_update_mode,
0);
static ssize_t adt7316_show_all_DAC_update_modes(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static IIO_DEVICE_ATTR(all_DAC_update_modes, 0444,
adt7316_show_all_DAC_update_modes, NULL, 0);
static ssize_t adt7316_store_update_DAC(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static IIO_DEVICE_ATTR(update_DAC, 0644,
NULL,
adt7316_store_update_DAC,
0);
static ssize_t adt7316_show_DA_AB_Vref_bypass(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t adt7316_store_DA_AB_Vref_bypass(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static IIO_DEVICE_ATTR(DA_AB_Vref_bypass, 0644,
adt7316_show_DA_AB_Vref_bypass,
adt7316_store_DA_AB_Vref_bypass,
0);
static ssize_t adt7316_show_DA_CD_Vref_bypass(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t adt7316_store_DA_CD_Vref_bypass(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static IIO_DEVICE_ATTR(DA_CD_Vref_bypass, 0644,
adt7316_show_DA_CD_Vref_bypass,
adt7316_store_DA_CD_Vref_bypass,
0);
static ssize_t adt7316_show_DAC_internal_Vref(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t adt7316_store_DAC_internal_Vref(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static IIO_DEVICE_ATTR(DAC_internal_Vref, 0644,
adt7316_show_DAC_internal_Vref,
adt7316_store_DAC_internal_Vref,
0);
static ssize_t adt7316_show_ad(struct adt7316_chip_info *chip,
int channel, char *buf)
{ … }
static ssize_t adt7316_show_VDD(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static IIO_DEVICE_ATTR(VDD, 0444, adt7316_show_VDD, NULL, 0);
static ssize_t adt7316_show_in_temp(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static IIO_DEVICE_ATTR(in_temp, 0444, adt7316_show_in_temp, NULL, 0);
static ssize_t adt7316_show_ex_temp_AIN1(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static IIO_DEVICE_ATTR(ex_temp_AIN1, 0444, adt7316_show_ex_temp_AIN1,
NULL, 0);
static IIO_DEVICE_ATTR(ex_temp, 0444, adt7316_show_ex_temp_AIN1, NULL, 0);
static ssize_t adt7316_show_AIN2(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static IIO_DEVICE_ATTR(AIN2, 0444, adt7316_show_AIN2, NULL, 0);
static ssize_t adt7316_show_AIN3(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static IIO_DEVICE_ATTR(AIN3, 0444, adt7316_show_AIN3, NULL, 0);
static ssize_t adt7316_show_AIN4(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static IIO_DEVICE_ATTR(AIN4, 0444, adt7316_show_AIN4, NULL, 0);
static ssize_t adt7316_show_temp_offset(struct adt7316_chip_info *chip,
int offset_addr, char *buf)
{ … }
static ssize_t adt7316_store_temp_offset(struct adt7316_chip_info *chip,
int offset_addr,
const char *buf,
size_t len)
{ … }
static ssize_t adt7316_show_in_temp_offset(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t adt7316_store_in_temp_offset(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static IIO_DEVICE_ATTR(in_temp_offset, 0644,
adt7316_show_in_temp_offset,
adt7316_store_in_temp_offset, 0);
static ssize_t adt7316_show_ex_temp_offset(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t adt7316_store_ex_temp_offset(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static IIO_DEVICE_ATTR(ex_temp_offset, 0644,
adt7316_show_ex_temp_offset,
adt7316_store_ex_temp_offset, 0);
static ssize_t adt7316_show_in_analog_temp_offset(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t adt7316_store_in_analog_temp_offset(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static IIO_DEVICE_ATTR(in_analog_temp_offset, 0644,
adt7316_show_in_analog_temp_offset,
adt7316_store_in_analog_temp_offset, 0);
static ssize_t adt7316_show_ex_analog_temp_offset(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t adt7316_store_ex_analog_temp_offset(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static IIO_DEVICE_ATTR(ex_analog_temp_offset, 0644,
adt7316_show_ex_analog_temp_offset,
adt7316_store_ex_analog_temp_offset, 0);
static ssize_t adt7316_show_DAC(struct adt7316_chip_info *chip,
int channel, char *buf)
{ … }
static ssize_t adt7316_store_DAC(struct adt7316_chip_info *chip,
int channel, const char *buf, size_t len)
{ … }
static ssize_t adt7316_show_DAC_A(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t adt7316_store_DAC_A(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static IIO_DEVICE_ATTR(DAC_A, 0644, adt7316_show_DAC_A,
adt7316_store_DAC_A, 0);
static ssize_t adt7316_show_DAC_B(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t adt7316_store_DAC_B(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static IIO_DEVICE_ATTR(DAC_B, 0644, adt7316_show_DAC_B,
adt7316_store_DAC_B, 0);
static ssize_t adt7316_show_DAC_C(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t adt7316_store_DAC_C(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static IIO_DEVICE_ATTR(DAC_C, 0644, adt7316_show_DAC_C,
adt7316_store_DAC_C, 0);
static ssize_t adt7316_show_DAC_D(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t adt7316_store_DAC_D(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static IIO_DEVICE_ATTR(DAC_D, 0644, adt7316_show_DAC_D,
adt7316_store_DAC_D, 0);
static ssize_t adt7316_show_device_id(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static IIO_DEVICE_ATTR(device_id, 0444, adt7316_show_device_id, NULL, 0);
static ssize_t adt7316_show_manufactorer_id(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static IIO_DEVICE_ATTR(manufactorer_id, 0444,
adt7316_show_manufactorer_id, NULL, 0);
static ssize_t adt7316_show_device_rev(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static IIO_DEVICE_ATTR(device_rev, 0444, adt7316_show_device_rev, NULL, 0);
static ssize_t adt7316_show_bus_type(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static IIO_DEVICE_ATTR(bus_type, 0444, adt7316_show_bus_type, NULL, 0);
static struct attribute *adt7316_attributes[] = …;
static const struct attribute_group adt7316_attribute_group = …;
static struct attribute *adt7516_attributes[] = …;
static const struct attribute_group adt7516_attribute_group = …;
static irqreturn_t adt7316_event_handler(int irq, void *private)
{ … }
static int adt7316_setup_irq(struct iio_dev *indio_dev)
{ … }
static ssize_t adt7316_show_int_mask(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t adt7316_set_int_mask(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static inline ssize_t adt7316_show_ad_bound(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static inline ssize_t adt7316_set_ad_bound(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static ssize_t adt7316_show_int_enabled(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t adt7316_set_int_enabled(struct device *dev,
struct device_attribute *attr,
const char *buf,
size_t len)
{ … }
static IIO_DEVICE_ATTR(int_mask,
0644,
adt7316_show_int_mask, adt7316_set_int_mask,
0);
static IIO_DEVICE_ATTR(in_temp_high_value,
0644,
adt7316_show_ad_bound, adt7316_set_ad_bound,
ADT7316_IN_TEMP_HIGH);
static IIO_DEVICE_ATTR(in_temp_low_value,
0644,
adt7316_show_ad_bound, adt7316_set_ad_bound,
ADT7316_IN_TEMP_LOW);
static IIO_DEVICE_ATTR(ex_temp_high_value,
0644,
adt7316_show_ad_bound, adt7316_set_ad_bound,
ADT7316_EX_TEMP_HIGH);
static IIO_DEVICE_ATTR(ex_temp_low_value,
0644,
adt7316_show_ad_bound, adt7316_set_ad_bound,
ADT7316_EX_TEMP_LOW);
static IIO_DEVICE_ATTR(ex_temp_ain1_high_value,
0644,
adt7316_show_ad_bound, adt7316_set_ad_bound,
ADT7316_EX_TEMP_HIGH);
static IIO_DEVICE_ATTR(ex_temp_ain1_low_value,
0644,
adt7316_show_ad_bound, adt7316_set_ad_bound,
ADT7316_EX_TEMP_LOW);
static IIO_DEVICE_ATTR(ain2_high_value,
0644,
adt7316_show_ad_bound, adt7316_set_ad_bound,
ADT7516_AIN2_HIGH);
static IIO_DEVICE_ATTR(ain2_low_value,
0644,
adt7316_show_ad_bound, adt7316_set_ad_bound,
ADT7516_AIN2_LOW);
static IIO_DEVICE_ATTR(ain3_high_value,
0644,
adt7316_show_ad_bound, adt7316_set_ad_bound,
ADT7516_AIN3_HIGH);
static IIO_DEVICE_ATTR(ain3_low_value,
0644,
adt7316_show_ad_bound, adt7316_set_ad_bound,
ADT7516_AIN3_LOW);
static IIO_DEVICE_ATTR(ain4_high_value,
0644,
adt7316_show_ad_bound, adt7316_set_ad_bound,
ADT7516_AIN4_HIGH);
static IIO_DEVICE_ATTR(ain4_low_value,
0644,
adt7316_show_ad_bound, adt7316_set_ad_bound,
ADT7516_AIN4_LOW);
static IIO_DEVICE_ATTR(int_enabled,
0644,
adt7316_show_int_enabled,
adt7316_set_int_enabled, 0);
static struct attribute *adt7316_event_attributes[] = …;
static const struct attribute_group adt7316_event_attribute_group = …;
static struct attribute *adt7516_event_attributes[] = …;
static const struct attribute_group adt7516_event_attribute_group = …;
#ifdef CONFIG_PM_SLEEP
static int adt7316_disable(struct device *dev)
{ … }
static int adt7316_enable(struct device *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
SIMPLE_DEV_PM_OPS(adt7316_pm_ops, adt7316_disable, adt7316_enable);
#endif
static const struct iio_info adt7316_info = …;
static const struct iio_info adt7516_info = …;
int adt7316_probe(struct device *dev, struct adt7316_bus *bus,
const char *name)
{ … }
EXPORT_SYMBOL(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;