[PATCH v3 6/7] staging: iio: ad5933: change attributes' ABI call

From: Marcelo Schmitt
Date: Sun Mar 10 2019 - 13:47:10 EST


Change device attributes to use more suitable ABI functions when setting
and displaying AC output excitation voltage. It better complies with
device hardware since these attributes are used to manage DDS
peak-to-peak output voltage.

Signed-off-by: Marcelo Schmitt <marcelo.schmitt1@xxxxxxxxx>
---
drivers/staging/iio/impedance-analyzer/ad5933.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/iio/impedance-analyzer/ad5933.c b/drivers/staging/iio/impedance-analyzer/ad5933.c
index d75bdfbf93de..314cb71b1b5a 100644
--- a/drivers/staging/iio/impedance-analyzer/ad5933.c
+++ b/drivers/staging/iio/impedance-analyzer/ad5933.c
@@ -443,12 +443,12 @@ static ssize_t ad5933_store(struct device *dev,
return ret ? ret : len;
}

-static IIO_DEVICE_ATTR(out_voltage0_scale, 0644,
+static IIO_DEVICE_ATTR(out_altvoltage0_raw, 0644,
ad5933_show,
ad5933_store,
AD5933_OUT_RANGE);

-static IIO_DEVICE_ATTR(out_voltage0_scale_available, 0444,
+static IIO_DEVICE_ATTR(out_altvoltage0_scale_available, 0444,
ad5933_show,
NULL,
AD5933_OUT_RANGE_AVAIL);
@@ -480,8 +480,8 @@ static IIO_DEVICE_ATTR(out_voltage0_settling_cycles, 0644,
* don't create dedicated sysfs channel attributes for out0 and in0.
*/
static struct attribute *ad5933_attributes[] = {
- &iio_dev_attr_out_voltage0_scale.dev_attr.attr,
- &iio_dev_attr_out_voltage0_scale_available.dev_attr.attr,
+ &iio_dev_attr_out_altvoltage0_raw.dev_attr.attr,
+ &iio_dev_attr_out_altvoltage0_scale_available.dev_attr.attr,
&iio_dev_attr_out_voltage0_freq_start.dev_attr.attr,
&iio_dev_attr_out_voltage0_freq_increment.dev_attr.attr,
&iio_dev_attr_out_voltage0_freq_points.dev_attr.attr,
--
2.20.1