Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268392
b: refs/heads/master
c: 322c956
h: refs/heads/master
v: v3
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Sep 16, 2011
1 parent effc4e3 commit da358d3
Show file tree
Hide file tree
Showing 22 changed files with 197 additions and 190 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8775316e1ae147d90b77ba683e7455e89a74364a
refs/heads/master: 322c95636739420631e51f3d3f24132dc220762a
12 changes: 6 additions & 6 deletions trunk/drivers/staging/iio/accel/adis16204_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,15 +301,15 @@ static int adis16204_initial_setup(struct iio_dev *indio_dev)

/* Unique to this driver currently */
#define IIO_DEV_ATTR_ACCEL_XY(_show, _addr) \
IIO_DEVICE_ATTR(accel_xy, S_IRUGO, _show, NULL, _addr)
IIO_DEVICE_ATTR(in_accel_xy, S_IRUGO, _show, NULL, _addr)
#define IIO_DEV_ATTR_ACCEL_XYPEAK(_show, _addr) \
IIO_DEVICE_ATTR(accel_xypeak, S_IRUGO, _show, NULL, _addr)
IIO_DEVICE_ATTR(in_accel_xypeak, S_IRUGO, _show, NULL, _addr)

static IIO_DEV_ATTR_ACCEL_XY(adis16204_read_14bit_signed,
ADIS16204_XY_RSS_OUT);
static IIO_DEV_ATTR_ACCEL_XYPEAK(adis16204_read_14bit_signed,
ADIS16204_XY_PEAK_OUT);
static IIO_CONST_ATTR(accel_xy_scale, "0.017125");
static IIO_CONST_ATTR(in_accel_xy_scale, "0.017125");

static IIO_DEVICE_ATTR(reset, S_IWUSR, NULL, adis16204_write_reset, 0);

Expand Down Expand Up @@ -475,9 +475,9 @@ static struct iio_chan_spec adis16204_channels[] = {

static struct attribute *adis16204_attributes[] = {
&iio_dev_attr_reset.dev_attr.attr,
&iio_dev_attr_accel_xy.dev_attr.attr,
&iio_dev_attr_accel_xypeak.dev_attr.attr,
&iio_const_attr_accel_xy_scale.dev_attr.attr,
&iio_dev_attr_in_accel_xy.dev_attr.attr,
&iio_dev_attr_in_accel_xypeak.dev_attr.attr,
&iio_const_attr_in_accel_xy_scale.dev_attr.attr,
NULL
};

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/staging/iio/accel/adis16240_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ static int adis16240_initial_setup(struct iio_dev *indio_dev)
return ret;
}

static IIO_DEVICE_ATTR(accel_xyz_squared_peak_raw, S_IRUGO,
static IIO_DEVICE_ATTR(in_accel_xyz_squared_peak_raw, S_IRUGO,
adis16240_read_12bit_signed, NULL,
ADIS16240_XYZPEAK_OUT);

Expand Down Expand Up @@ -500,7 +500,7 @@ static struct iio_chan_spec adis16240_channels[] = {
};

static struct attribute *adis16240_attributes[] = {
&iio_dev_attr_accel_xyz_squared_peak_raw.dev_attr.attr,
&iio_dev_attr_in_accel_xyz_squared_peak_raw.dev_attr.attr,
&iio_const_attr_sampling_frequency_available.dev_attr.attr,
&iio_dev_attr_reset.dev_attr.attr,
NULL
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/staging/iio/accel/sca3000_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,9 +771,9 @@ static struct attribute *sca3000_attributes_with_temp[] = {
&iio_dev_attr_sampling_frequency_available.dev_attr.attr,
&iio_dev_attr_sampling_frequency.dev_attr.attr,
/* Only present if temp sensor is */
&iio_dev_attr_temp_raw.dev_attr.attr,
&iio_const_attr_temp_offset.dev_attr.attr,
&iio_const_attr_temp_scale.dev_attr.attr,
&iio_dev_attr_in_temp_raw.dev_attr.attr,
&iio_const_attr_in_temp_offset.dev_attr.attr,
&iio_const_attr_in_temp_scale.dev_attr.attr,
NULL,
};

Expand Down Expand Up @@ -1018,14 +1018,14 @@ static int sca3000_write_event_config(struct iio_dev *indio_dev,

/* Free fall detector related event attribute */
static IIO_DEVICE_ATTR_NAMED(accel_xayaz_mag_falling_en,
accel_x&y&z_mag_falling_en,
in_accel_x&y&z_mag_falling_en,
S_IRUGO | S_IWUSR,
sca3000_query_free_fall_mode,
sca3000_set_free_fall_mode,
0);

static IIO_CONST_ATTR_NAMED(accel_xayaz_mag_falling_period,
accel_x&y&z_mag_falling_period,
in_accel_x&y&z_mag_falling_period,
"0.226");

static struct attribute *sca3000_event_attributes[] = {
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/staging/iio/accel/sca3000_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ static ssize_t sca3000_show_buffer_scale(struct device *dev,
return sprintf(buf, "0.%06d\n", 4*st->info->scale);
}

static IIO_DEVICE_ATTR(accel_scale,
static IIO_DEVICE_ATTR(in_accel_scale,
S_IRUGO,
sca3000_show_buffer_scale,
NULL,
Expand All @@ -247,7 +247,7 @@ static struct attribute *sca3000_ring_attributes[] = {
&dev_attr_enable.attr,
&iio_dev_attr_50_percent.dev_attr.attr,
&iio_dev_attr_75_percent.dev_attr.attr,
&iio_dev_attr_accel_scale.dev_attr.attr,
&iio_dev_attr_in_accel_scale.dev_attr.attr,
NULL,
};

Expand Down
9 changes: 5 additions & 4 deletions trunk/drivers/staging/iio/adc/ad7192.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,10 +747,11 @@ static ssize_t ad7192_show_scale_available(struct device *dev,
return len;
}

static IIO_DEVICE_ATTR_NAMED(in_m_in_scale_available, in-in_scale_available,
static IIO_DEVICE_ATTR_NAMED(in_v_m_v_scale_available,
in_voltage-voltage_scale_available,
S_IRUGO, ad7192_show_scale_available, NULL, 0);

static IIO_DEVICE_ATTR(in_scale_available, S_IRUGO,
static IIO_DEVICE_ATTR(in_voltage_scale_available, S_IRUGO,
ad7192_show_scale_available, NULL, 0);

static ssize_t ad7192_show_ac_excitation(struct device *dev,
Expand Down Expand Up @@ -830,8 +831,8 @@ static IIO_DEVICE_ATTR(ac_excitation_en, S_IRUGO | S_IWUSR,

static struct attribute *ad7192_attributes[] = {
&iio_dev_attr_sampling_frequency.dev_attr.attr,
&iio_dev_attr_in_m_in_scale_available.dev_attr.attr,
&iio_dev_attr_in_scale_available.dev_attr.attr,
&iio_dev_attr_in_v_m_v_scale_available.dev_attr.attr,
&iio_dev_attr_in_voltage_scale_available.dev_attr.attr,
&iio_dev_attr_bridge_switch_en.dev_attr.attr,
&iio_dev_attr_ac_excitation_en.dev_attr.attr,
NULL
Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/staging/iio/adc/ad7280a.c
Original file line number Diff line number Diff line change
Expand Up @@ -736,26 +736,26 @@ static irqreturn_t ad7280_event_handler(int irq, void *private)
}

static IIO_DEVICE_ATTR_NAMED(in_thresh_low_value,
in-in_thresh_low_value,
in_voltage-voltage_thresh_low_value,
S_IRUGO | S_IWUSR,
ad7280_read_channel_config,
ad7280_write_channel_config,
AD7280A_CELL_UNDERVOLTAGE);

static IIO_DEVICE_ATTR_NAMED(in_thresh_high_value,
in-in_thresh_high_value,
in_voltage-voltage_thresh_high_value,
S_IRUGO | S_IWUSR,
ad7280_read_channel_config,
ad7280_write_channel_config,
AD7280A_CELL_OVERVOLTAGE);

static IIO_DEVICE_ATTR(temp_thresh_low_value,
static IIO_DEVICE_ATTR(in_temp_thresh_low_value,
S_IRUGO | S_IWUSR,
ad7280_read_channel_config,
ad7280_write_channel_config,
AD7280A_AUX_ADC_UNDERVOLTAGE);

static IIO_DEVICE_ATTR(temp_thresh_high_value,
static IIO_DEVICE_ATTR(in_temp_thresh_high_value,
S_IRUGO | S_IWUSR,
ad7280_read_channel_config,
ad7280_write_channel_config,
Expand All @@ -765,8 +765,8 @@ static IIO_DEVICE_ATTR(temp_thresh_high_value,
static struct attribute *ad7280_event_attributes[] = {
&iio_dev_attr_in_thresh_low_value.dev_attr.attr,
&iio_dev_attr_in_thresh_high_value.dev_attr.attr,
&iio_dev_attr_temp_thresh_low_value.dev_attr.attr,
&iio_dev_attr_temp_thresh_high_value.dev_attr.attr,
&iio_dev_attr_in_temp_thresh_low_value.dev_attr.attr,
&iio_dev_attr_in_temp_thresh_high_value.dev_attr.attr,
NULL,
};

Expand Down
36 changes: 18 additions & 18 deletions trunk/drivers/staging/iio/adc/ad7745.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,21 +131,21 @@ static int ad774x_i2c_write(struct ad774x_chip_info *chip, u8 reg, u8 data)
#define IIO_DEV_ATTR_CONVERSION_MODE(_mode, _show, _store) \
IIO_DEVICE_ATTR(conversion_mode, _mode, _show, _store, 0)
#define IIO_DEV_ATTR_CAP_SETUP(_mode, _show, _store) \
IIO_DEVICE_ATTR(cap_setup, _mode, _show, _store, 0)
IIO_DEVICE_ATTR(in_capacitance_setup, _mode, _show, _store, 0)
#define IIO_DEV_ATTR_VT_SETUP(_mode, _show, _store) \
IIO_DEVICE_ATTR(in0_setup, _mode, _show, _store, 0)
IIO_DEVICE_ATTR(in_voltage0_setup, _mode, _show, _store, 0)
#define IIO_DEV_ATTR_EXEC_SETUP(_mode, _show, _store) \
IIO_DEVICE_ATTR(exec_setup, _mode, _show, _store, 0)
#define IIO_DEV_ATTR_VOLT_GAIN(_mode, _show, _store) \
IIO_DEVICE_ATTR(in0_gain, _mode, _show, _store, 0)
IIO_DEVICE_ATTR(in_voltage0_gain, _mode, _show, _store, 0)
#define IIO_DEV_ATTR_CAP_OFFS(_mode, _show, _store) \
IIO_DEVICE_ATTR(cap_offs, _mode, _show, _store, 0)
IIO_DEVICE_ATTR(in_capacitance_offs, _mode, _show, _store, 0)
#define IIO_DEV_ATTR_CAP_GAIN(_mode, _show, _store) \
IIO_DEVICE_ATTR(cap_gain, _mode, _show, _store, 0)
IIO_DEVICE_ATTR(in_capacitance_gain, _mode, _show, _store, 0)
#define IIO_DEV_ATTR_CAP_DATA(_show) \
IIO_DEVICE_ATTR(cap0_raw, S_IRUGO, _show, NULL, 0)
IIO_DEVICE_ATTR(in_capacitance0_raw, S_IRUGO, _show, NULL, 0)
#define IIO_DEV_ATTR_VT_DATA(_show) \
IIO_DEVICE_ATTR(in0_raw, S_IRUGO, _show, NULL, 0)
IIO_DEVICE_ATTR(in_voltage0_raw, S_IRUGO, _show, NULL, 0)

static ssize_t ad774x_show_conversion_modes(struct device *dev,
struct device_attribute *attr,
Expand Down Expand Up @@ -241,12 +241,12 @@ static ssize_t ad774x_store_dac_value(struct device *dev,
return -EINVAL;
}

static IIO_DEVICE_ATTR(capdac0_raw, S_IRUGO | S_IWUSR,
static IIO_DEVICE_ATTR(out_capacitance0_raw, S_IRUGO | S_IWUSR,
ad774x_show_dac_value,
ad774x_store_dac_value,
AD774X_CAPDACA);

static IIO_DEVICE_ATTR(capdac1_raw, S_IRUGO | S_IWUSR,
static IIO_DEVICE_ATTR(out_capacitance1_raw, S_IRUGO | S_IWUSR,
ad774x_show_dac_value,
ad774x_store_dac_value,
AD774X_CAPDACB);
Expand Down Expand Up @@ -501,16 +501,16 @@ static IIO_DEV_ATTR_CAP_GAIN(S_IRUGO | S_IWUSR,
static struct attribute *ad774x_attributes[] = {
&iio_dev_attr_available_conversion_modes.dev_attr.attr,
&iio_dev_attr_conversion_mode.dev_attr.attr,
&iio_dev_attr_cap_setup.dev_attr.attr,
&iio_dev_attr_in0_setup.dev_attr.attr,
&iio_dev_attr_in_capacitance_setup.dev_attr.attr,
&iio_dev_attr_in_voltage0_setup.dev_attr.attr,
&iio_dev_attr_exec_setup.dev_attr.attr,
&iio_dev_attr_cap_offs.dev_attr.attr,
&iio_dev_attr_cap_gain.dev_attr.attr,
&iio_dev_attr_in0_gain.dev_attr.attr,
&iio_dev_attr_in0_raw.dev_attr.attr,
&iio_dev_attr_cap0_raw.dev_attr.attr,
&iio_dev_attr_capdac0_raw.dev_attr.attr,
&iio_dev_attr_capdac1_raw.dev_attr.attr,
&iio_dev_attr_in_capacitance_offs.dev_attr.attr,
&iio_dev_attr_in_capacitance_gain.dev_attr.attr,
&iio_dev_attr_in_voltage0_gain.dev_attr.attr,
&iio_dev_attr_in_voltage0_raw.dev_attr.attr,
&iio_dev_attr_in_capacitance0_raw.dev_attr.attr,
&iio_dev_attr_out_capacitance0_raw.dev_attr.attr,
&iio_dev_attr_out_capacitance1_raw.dev_attr.attr,
NULL,
};

Expand Down
60 changes: 30 additions & 30 deletions trunk/drivers/staging/iio/adc/ad799x_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,73 +350,73 @@ static irqreturn_t ad799x_event_handler(int irq, void *private)
return IRQ_HANDLED;
}

static IIO_DEVICE_ATTR(in0_thresh_low_value,
static IIO_DEVICE_ATTR(in_voltage0_thresh_low_value,
S_IRUGO | S_IWUSR,
ad799x_read_channel_config,
ad799x_write_channel_config,
AD7998_DATALOW_CH1_REG);

static IIO_DEVICE_ATTR(in0_thresh_high_value,
static IIO_DEVICE_ATTR(in_voltage0_thresh_high_value,
S_IRUGO | S_IWUSR,
ad799x_read_channel_config,
ad799x_write_channel_config,
AD7998_DATAHIGH_CH1_REG);

static IIO_DEVICE_ATTR(in0_thresh_both_hyst_raw,
static IIO_DEVICE_ATTR(in_voltage0_thresh_both_hyst_raw,
S_IRUGO | S_IWUSR,
ad799x_read_channel_config,
ad799x_write_channel_config,
AD7998_HYST_CH1_REG);

static IIO_DEVICE_ATTR(in1_thresh_low_value,
static IIO_DEVICE_ATTR(in_voltage1_thresh_low_value,
S_IRUGO | S_IWUSR,
ad799x_read_channel_config,
ad799x_write_channel_config,
AD7998_DATALOW_CH2_REG);

static IIO_DEVICE_ATTR(in1_thresh_high_value,
static IIO_DEVICE_ATTR(in_voltage1_thresh_high_value,
S_IRUGO | S_IWUSR,
ad799x_read_channel_config,
ad799x_write_channel_config,
AD7998_DATAHIGH_CH2_REG);

static IIO_DEVICE_ATTR(in1_thresh_both_hyst_raw,
static IIO_DEVICE_ATTR(in_voltage1_thresh_both_hyst_raw,
S_IRUGO | S_IWUSR,
ad799x_read_channel_config,
ad799x_write_channel_config,
AD7998_HYST_CH2_REG);

static IIO_DEVICE_ATTR(in2_thresh_low_value,
static IIO_DEVICE_ATTR(in_voltage2_thresh_low_value,
S_IRUGO | S_IWUSR,
ad799x_read_channel_config,
ad799x_write_channel_config,
AD7998_DATALOW_CH3_REG);

static IIO_DEVICE_ATTR(in2_thresh_high_value,
static IIO_DEVICE_ATTR(in_voltage2_thresh_high_value,
S_IRUGO | S_IWUSR,
ad799x_read_channel_config,
ad799x_write_channel_config,
AD7998_DATAHIGH_CH3_REG);

static IIO_DEVICE_ATTR(in2_thresh_both_hyst_raw,
static IIO_DEVICE_ATTR(in_voltage2_thresh_both_hyst_raw,
S_IRUGO | S_IWUSR,
ad799x_read_channel_config,
ad799x_write_channel_config,
AD7998_HYST_CH3_REG);

static IIO_DEVICE_ATTR(in3_thresh_low_value,
static IIO_DEVICE_ATTR(in_voltage3_thresh_low_value,
S_IRUGO | S_IWUSR,
ad799x_read_channel_config,
ad799x_write_channel_config,
AD7998_DATALOW_CH4_REG);

static IIO_DEVICE_ATTR(in3_thresh_high_value,
static IIO_DEVICE_ATTR(in_voltage3_thresh_high_value,
S_IRUGO | S_IWUSR,
ad799x_read_channel_config,
ad799x_write_channel_config,
AD7998_DATAHIGH_CH4_REG);

static IIO_DEVICE_ATTR(in3_thresh_both_hyst_raw,
static IIO_DEVICE_ATTR(in_voltage3_thresh_both_hyst_raw,
S_IRUGO | S_IWUSR,
ad799x_read_channel_config,
ad799x_write_channel_config,
Expand All @@ -428,18 +428,18 @@ static IIO_DEV_ATTR_SAMP_FREQ(S_IWUSR | S_IRUGO,
static IIO_CONST_ATTR_SAMP_FREQ_AVAIL("15625 7812 3906 1953 976 488 244 0");

static struct attribute *ad7993_4_7_8_event_attributes[] = {
&iio_dev_attr_in0_thresh_low_value.dev_attr.attr,
&iio_dev_attr_in0_thresh_high_value.dev_attr.attr,
&iio_dev_attr_in0_thresh_both_hyst_raw.dev_attr.attr,
&iio_dev_attr_in1_thresh_low_value.dev_attr.attr,
&iio_dev_attr_in1_thresh_high_value.dev_attr.attr,
&iio_dev_attr_in1_thresh_both_hyst_raw.dev_attr.attr,
&iio_dev_attr_in2_thresh_low_value.dev_attr.attr,
&iio_dev_attr_in2_thresh_high_value.dev_attr.attr,
&iio_dev_attr_in2_thresh_both_hyst_raw.dev_attr.attr,
&iio_dev_attr_in3_thresh_low_value.dev_attr.attr,
&iio_dev_attr_in3_thresh_high_value.dev_attr.attr,
&iio_dev_attr_in3_thresh_both_hyst_raw.dev_attr.attr,
&iio_dev_attr_in_voltage0_thresh_low_value.dev_attr.attr,
&iio_dev_attr_in_voltage0_thresh_high_value.dev_attr.attr,
&iio_dev_attr_in_voltage0_thresh_both_hyst_raw.dev_attr.attr,
&iio_dev_attr_in_voltage1_thresh_low_value.dev_attr.attr,
&iio_dev_attr_in_voltage1_thresh_high_value.dev_attr.attr,
&iio_dev_attr_in_voltage1_thresh_both_hyst_raw.dev_attr.attr,
&iio_dev_attr_in_voltage2_thresh_low_value.dev_attr.attr,
&iio_dev_attr_in_voltage2_thresh_high_value.dev_attr.attr,
&iio_dev_attr_in_voltage2_thresh_both_hyst_raw.dev_attr.attr,
&iio_dev_attr_in_voltage3_thresh_low_value.dev_attr.attr,
&iio_dev_attr_in_voltage3_thresh_high_value.dev_attr.attr,
&iio_dev_attr_in_voltage3_thresh_both_hyst_raw.dev_attr.attr,
&iio_dev_attr_sampling_frequency.dev_attr.attr,
&iio_const_attr_sampling_frequency_available.dev_attr.attr,
NULL,
Expand All @@ -451,12 +451,12 @@ static struct attribute_group ad7993_4_7_8_event_attrs_group = {
};

static struct attribute *ad7992_event_attributes[] = {
&iio_dev_attr_in0_thresh_low_value.dev_attr.attr,
&iio_dev_attr_in0_thresh_high_value.dev_attr.attr,
&iio_dev_attr_in0_thresh_both_hyst_raw.dev_attr.attr,
&iio_dev_attr_in1_thresh_low_value.dev_attr.attr,
&iio_dev_attr_in1_thresh_high_value.dev_attr.attr,
&iio_dev_attr_in1_thresh_both_hyst_raw.dev_attr.attr,
&iio_dev_attr_in_voltage0_thresh_low_value.dev_attr.attr,
&iio_dev_attr_in_voltage0_thresh_high_value.dev_attr.attr,
&iio_dev_attr_in_voltage0_thresh_both_hyst_raw.dev_attr.attr,
&iio_dev_attr_in_voltage1_thresh_low_value.dev_attr.attr,
&iio_dev_attr_in_voltage1_thresh_high_value.dev_attr.attr,
&iio_dev_attr_in_voltage1_thresh_both_hyst_raw.dev_attr.attr,
&iio_dev_attr_sampling_frequency.dev_attr.attr,
&iio_const_attr_sampling_frequency_available.dev_attr.attr,
NULL,
Expand Down
Loading

0 comments on commit da358d3

Please sign in to comment.