Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 317722
b: refs/heads/master
c: 13d947d
h: refs/heads/master
v: v3
  • Loading branch information
Jonathan Cameron committed Jun 30, 2012
1 parent fac48f7 commit 6c7a8e7
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 149 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: 314be14bb89369b2164125b0ec3b24d85b407b62
refs/heads/master: 13d947db1c8e4e5c2114e809beef97ddf41b7006
27 changes: 0 additions & 27 deletions trunk/drivers/staging/iio/accel/adis16201_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,21 +159,6 @@ static int adis16201_reset(struct iio_dev *indio_dev)
return ret;
}

static ssize_t adis16201_write_reset(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t len)
{
int ret;
bool res;

if (len < 1)
return -EINVAL;
ret = strtobool(buf, &res);
if (ret || !res)
return ret;
return adis16201_reset(dev_to_iio_dev(dev));
}

int adis16201_set_irq(struct iio_dev *indio_dev, bool enable)
{
int ret = 0;
Expand Down Expand Up @@ -507,19 +492,7 @@ static struct iio_chan_spec adis16201_channels[] = {
IIO_CHAN_SOFT_TIMESTAMP(7)
};

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

static struct attribute *adis16201_attributes[] = {
&iio_dev_attr_reset.dev_attr.attr,
NULL
};

static const struct attribute_group adis16201_attribute_group = {
.attrs = adis16201_attributes,
};

static const struct iio_info adis16201_info = {
.attrs = &adis16201_attribute_group,
.read_raw = &adis16201_read_raw,
.write_raw = &adis16201_write_raw,
.driver_module = THIS_MODULE,
Expand Down
28 changes: 0 additions & 28 deletions trunk/drivers/staging/iio/accel/adis16203_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,22 +178,6 @@ static int adis16203_reset(struct iio_dev *indio_dev)
return ret;
}

static ssize_t adis16203_write_reset(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t len)
{
struct iio_dev *indio_dev = dev_to_iio_dev(dev);
if (len < 1)
return -EINVAL;
switch (buf[0]) {
case '1':
case 'y':
case 'Y':
return adis16203_reset(indio_dev);
}
return -EINVAL;
}

int adis16203_set_irq(struct iio_dev *indio_dev, bool enable)
{
int ret = 0;
Expand Down Expand Up @@ -444,19 +428,7 @@ static struct iio_chan_spec adis16203_channels[] = {
IIO_CHAN_SOFT_TIMESTAMP(5),
};

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

static struct attribute *adis16203_attributes[] = {
&iio_dev_attr_reset.dev_attr.attr,
NULL
};

static const struct attribute_group adis16203_attribute_group = {
.attrs = adis16203_attributes,
};

static const struct iio_info adis16203_info = {
.attrs = &adis16203_attribute_group,
.read_raw = &adis16203_read_raw,
.write_raw = &adis16203_write_raw,
.driver_module = THIS_MODULE,
Expand Down
20 changes: 0 additions & 20 deletions trunk/drivers/staging/iio/accel/adis16204_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,23 +207,6 @@ static int adis16204_reset(struct iio_dev *indio_dev)
return ret;
}

static ssize_t adis16204_write_reset(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t len)
{
struct iio_dev *indio_dev = dev_to_iio_dev(dev);

if (len < 1)
return -EINVAL;
switch (buf[0]) {
case '1':
case 'y':
case 'Y':
return adis16204_reset(indio_dev);
}
return -EINVAL;
}

int adis16204_set_irq(struct iio_dev *indio_dev, bool enable)
{
int ret = 0;
Expand Down Expand Up @@ -310,8 +293,6 @@ static IIO_DEV_ATTR_ACCEL_XYPEAK(adis16204_read_14bit_signed,
ADIS16204_XY_PEAK_OUT);
static IIO_CONST_ATTR(in_accel_xy_scale, "0.017125");

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

enum adis16204_channel {
in_supply,
in_aux,
Expand Down Expand Up @@ -520,7 +501,6 @@ static struct iio_chan_spec adis16204_channels[] = {
};

static struct attribute *adis16204_attributes[] = {
&iio_dev_attr_reset.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,
Expand Down
29 changes: 0 additions & 29 deletions trunk/drivers/staging/iio/accel/adis16209_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,23 +153,6 @@ static int adis16209_reset(struct iio_dev *indio_dev)
return ret;
}

static ssize_t adis16209_write_reset(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t len)
{
struct iio_dev *indio_dev = dev_to_iio_dev(dev);

if (len < 1)
return -EINVAL;
switch (buf[0]) {
case '1':
case 'y':
case 'Y':
return adis16209_reset(indio_dev);
}
return -EINVAL;
}

int adis16209_set_irq(struct iio_dev *indio_dev, bool enable)
{
int ret = 0;
Expand Down Expand Up @@ -519,19 +502,7 @@ static struct iio_chan_spec adis16209_channels[] = {
IIO_CHAN_SOFT_TIMESTAMP(8)
};

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

static struct attribute *adis16209_attributes[] = {
&iio_dev_attr_reset.dev_attr.attr,
NULL
};

static const struct attribute_group adis16209_attribute_group = {
.attrs = adis16209_attributes,
};

static const struct iio_info adis16209_info = {
.attrs = &adis16209_attribute_group,
.read_raw = &adis16209_read_raw,
.write_raw = &adis16209_write_raw,
.driver_module = THIS_MODULE,
Expand Down
24 changes: 0 additions & 24 deletions trunk/drivers/staging/iio/accel/adis16220_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,26 +204,6 @@ static int adis16220_reset(struct iio_dev *indio_dev)
return ret;
}

static ssize_t adis16220_write_reset(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t len)
{
struct iio_dev *indio_dev = dev_to_iio_dev(dev);
bool val;
int ret;

ret = strtobool(buf, &val);
if (ret)
return ret;
if (!val)
return -EINVAL;

ret = adis16220_reset(indio_dev);
if (ret)
return ret;
return len;
}

static ssize_t adis16220_write_capture(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t len)
Expand Down Expand Up @@ -454,9 +434,6 @@ static struct bin_attribute adc2_bin = {
.size = ADIS16220_CAPTURE_SIZE,
};

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

#define IIO_DEV_ATTR_CAPTURE(_store) \
IIO_DEVICE_ATTR(capture, S_IWUSR, NULL, _store, 0)

Expand Down Expand Up @@ -611,7 +588,6 @@ static const struct iio_chan_spec adis16220_channels[] = {
};

static struct attribute *adis16220_attributes[] = {
&iio_dev_attr_reset.dev_attr.attr,
&iio_dev_attr_capture.dev_attr.attr,
&iio_dev_attr_capture_count.dev_attr.attr,
NULL
Expand Down
20 changes: 0 additions & 20 deletions trunk/drivers/staging/iio/accel/adis16240_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,23 +199,6 @@ static int adis16240_reset(struct iio_dev *indio_dev)
return ret;
}

static ssize_t adis16240_write_reset(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t len)
{
struct iio_dev *indio_dev = dev_to_iio_dev(dev);

if (len < 1)
return -EINVAL;
switch (buf[0]) {
case '1':
case 'y':
case 'Y':
return adis16240_reset(indio_dev);
}
return -EINVAL;
}

int adis16240_set_irq(struct iio_dev *indio_dev, bool enable)
{
int ret = 0;
Expand Down Expand Up @@ -329,8 +312,6 @@ static IIO_DEVICE_ATTR(in_accel_xyz_squared_peak_raw, S_IRUGO,
adis16240_read_12bit_signed, NULL,
ADIS16240_XYZPEAK_OUT);

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

static IIO_CONST_ATTR_SAMP_FREQ_AVAIL("4096");

enum adis16240_chan {
Expand Down Expand Up @@ -559,7 +540,6 @@ static struct iio_chan_spec adis16240_channels[] = {
static struct attribute *adis16240_attributes[] = {
&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

0 comments on commit 6c7a8e7

Please sign in to comment.