staging:iio:accel drop sysfs interface for resetting devices.

There is no reason why userspace should want to do this manually.
Hence, lets drop this abi.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
This commit is contained in:
Jonathan Cameron 2012-05-05 09:16:08 +01:00
parent 314be14bb8
commit 13d947db1c
6 changed files with 0 additions and 148 deletions

View file

@ -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;
@ -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,

View file

@ -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;
@ -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,

View file

@ -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;
@ -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,
@ -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,

View file

@ -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;
@ -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,

View file

@ -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)
@ -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)
@ -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

View file

@ -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;
@ -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 {
@ -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
};