* Killing off range with no channel attribute.
@ 2011-09-09 11:55 Jonathan Cameron
2011-09-09 12:00 ` Hennerich, Michael
0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Cameron @ 2011-09-09 11:55 UTC (permalink / raw)
To: Hennerich, Michael; +Cc: linux-iio@vger.kernel.org
Hi Michael,
Only has one user in this form. The ad7606 and I would rather
see that as in_voltage_range.
Any objections?
I'm busy culling dead stuff from the documentation.
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Killing off range with no channel attribute.
2011-09-09 11:55 Killing off range with no channel attribute Jonathan Cameron
@ 2011-09-09 12:00 ` Hennerich, Michael
2011-09-09 12:23 ` [PATCH] staging:iio:adc:ad7606 add channel type specification to range attributes Jonathan Cameron
0 siblings, 1 reply; 4+ messages in thread
From: Hennerich, Michael @ 2011-09-09 12:00 UTC (permalink / raw)
To: Jonathan Cameron
Cc: linux-iio@vger.kernel.org,
device-drivers-devel@blackfin.uclinux.org
Jonathan Cameron wrote on 2011-09-09:
> Hi Michael,
>
> Only has one user in this form. The ad7606 and I would rather
> see that as in_voltage_range.
>
> Any objections?
No objections
Greetings,
Michael
--
Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen
Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368;
Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin, Mar=
garet Seif
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] staging:iio:adc:ad7606 add channel type specification to range attributes.
2011-09-09 12:00 ` Hennerich, Michael
@ 2011-09-09 12:23 ` Jonathan Cameron
2011-09-09 12:29 ` Jonathan Cameron
0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Cameron @ 2011-09-09 12:23 UTC (permalink / raw)
To: linux-iio; +Cc: Jonathan Cameron
Cleaner and more consistent naming + makes one abi element we don't need
go away.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
---
drivers/staging/iio/adc/ad7606_core.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/iio/adc/ad7606_core.c b/drivers/staging/iio/adc/ad7606_core.c
index bea663d..36f0ffd 100644
--- a/drivers/staging/iio/adc/ad7606_core.c
+++ b/drivers/staging/iio/adc/ad7606_core.c
@@ -140,9 +140,9 @@ static ssize_t ad7606_store_range(struct device *dev,
return count;
}
-static IIO_DEVICE_ATTR(range, S_IRUGO | S_IWUSR, \
+static IIO_DEVICE_ATTR(in_voltage_range, S_IRUGO | S_IWUSR, \
ad7606_show_range, ad7606_store_range, 0);
-static IIO_CONST_ATTR(range_available, "5000 10000");
+static IIO_CONST_ATTR(in_voltage_range_available, "5000 10000");
static ssize_t ad7606_show_oversampling_ratio(struct device *dev,
struct device_attribute *attr, char *buf)
@@ -198,8 +198,8 @@ static IIO_DEVICE_ATTR(oversampling_ratio, S_IRUGO | S_IWUSR,
static IIO_CONST_ATTR(oversampling_ratio_available, "0 2 4 8 16 32 64");
static struct attribute *ad7606_attributes[] = {
- &iio_dev_attr_range.dev_attr.attr,
- &iio_const_attr_range_available.dev_attr.attr,
+ &iio_dev_attr_in_voltage_range.dev_attr.attr,
+ &iio_const_attr_in_voltage_range_available.dev_attr.attr,
&iio_dev_attr_oversampling_ratio.dev_attr.attr,
&iio_const_attr_oversampling_ratio_available.dev_attr.attr,
NULL,
@@ -220,8 +220,8 @@ static mode_t ad7606_attr_is_visible(struct kobject *kobj,
&iio_const_attr_oversampling_ratio_available.dev_attr.attr))
mode = 0;
else if (!st->have_range &&
- (attr == &iio_dev_attr_range.dev_attr.attr ||
- attr == &iio_const_attr_range_available.dev_attr.attr))
+ (attr == &iio_dev_attr_in_voltage_range.dev_attr.attr ||
+ attr == &iio_const_attr_in_voltage_range_available.dev_attr.attr))
mode = 0;
return mode;
--
1.7.3.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] staging:iio:adc:ad7606 add channel type specification to range attributes.
2011-09-09 12:23 ` [PATCH] staging:iio:adc:ad7606 add channel type specification to range attributes Jonathan Cameron
@ 2011-09-09 12:29 ` Jonathan Cameron
0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2011-09-09 12:29 UTC (permalink / raw)
To: Jonathan Cameron; +Cc: linux-iio
On 09/09/11 13:23, Jonathan Cameron wrote:
> Cleaner and more consistent naming + makes one abi element we don't need
> go away.
Oops. I missed the usage in isl29018. That one is fiddlier to remove
as it doesn't correspond directly to a particular channel type.
Oh well - this is still nicer for the ad7606!
>
> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
> ---
> drivers/staging/iio/adc/ad7606_core.c | 12 ++++++------
> 1 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/iio/adc/ad7606_core.c b/drivers/staging/iio/adc/ad7606_core.c
> index bea663d..36f0ffd 100644
> --- a/drivers/staging/iio/adc/ad7606_core.c
> +++ b/drivers/staging/iio/adc/ad7606_core.c
> @@ -140,9 +140,9 @@ static ssize_t ad7606_store_range(struct device *dev,
> return count;
> }
>
> -static IIO_DEVICE_ATTR(range, S_IRUGO | S_IWUSR, \
> +static IIO_DEVICE_ATTR(in_voltage_range, S_IRUGO | S_IWUSR, \
> ad7606_show_range, ad7606_store_range, 0);
> -static IIO_CONST_ATTR(range_available, "5000 10000");
> +static IIO_CONST_ATTR(in_voltage_range_available, "5000 10000");
>
> static ssize_t ad7606_show_oversampling_ratio(struct device *dev,
> struct device_attribute *attr, char *buf)
> @@ -198,8 +198,8 @@ static IIO_DEVICE_ATTR(oversampling_ratio, S_IRUGO | S_IWUSR,
> static IIO_CONST_ATTR(oversampling_ratio_available, "0 2 4 8 16 32 64");
>
> static struct attribute *ad7606_attributes[] = {
> - &iio_dev_attr_range.dev_attr.attr,
> - &iio_const_attr_range_available.dev_attr.attr,
> + &iio_dev_attr_in_voltage_range.dev_attr.attr,
> + &iio_const_attr_in_voltage_range_available.dev_attr.attr,
> &iio_dev_attr_oversampling_ratio.dev_attr.attr,
> &iio_const_attr_oversampling_ratio_available.dev_attr.attr,
> NULL,
> @@ -220,8 +220,8 @@ static mode_t ad7606_attr_is_visible(struct kobject *kobj,
> &iio_const_attr_oversampling_ratio_available.dev_attr.attr))
> mode = 0;
> else if (!st->have_range &&
> - (attr == &iio_dev_attr_range.dev_attr.attr ||
> - attr == &iio_const_attr_range_available.dev_attr.attr))
> + (attr == &iio_dev_attr_in_voltage_range.dev_attr.attr ||
> + attr == &iio_const_attr_in_voltage_range_available.dev_attr.attr))
> mode = 0;
>
> return mode;
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-09-09 12:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-09 11:55 Killing off range with no channel attribute Jonathan Cameron
2011-09-09 12:00 ` Hennerich, Michael
2011-09-09 12:23 ` [PATCH] staging:iio:adc:ad7606 add channel type specification to range attributes Jonathan Cameron
2011-09-09 12:29 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).