Make filter control also available through filter_type attributes which are
now standardized in main IIO ABI documentation.
Suggested-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
---
Hi David, I forgot to ask if you wanted it, but I've added a suggested-by tag
for your advice on v2.
Thanks,
Marcelo
drivers/iio/adc/ad4130.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/iio/adc/ad4130.c b/drivers/iio/adc/ad4130.c
index de32cc9d18c5..66097ff65740 100644
--- a/drivers/iio/adc/ad4130.c
+++ b/drivers/iio/adc/ad4130.c
@@ -942,6 +942,9 @@ static const struct iio_chan_spec_ext_info ad4130_filter_mode_ext_info[] = {
IIO_ENUM("filter_mode", IIO_SEPARATE, &ad4130_filter_mode_enum),
IIO_ENUM_AVAILABLE("filter_mode", IIO_SHARED_BY_TYPE,
&ad4130_filter_mode_enum),
+ IIO_ENUM("filter_type", IIO_SEPARATE, &ad4130_filter_mode_enum),
+ IIO_ENUM_AVAILABLE("filter_type", IIO_SHARED_BY_TYPE,
+ &ad4130_filter_mode_enum),
{ }
};
--
2.47.2
On 2/3/25 1:11 PM, Marcelo Schmitt wrote:
> Make filter control also available through filter_type attributes which are
> now standardized in main IIO ABI documentation.
>
> Suggested-by: David Lechner <dlechner@baylibre.com>
> Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
> ---
> Hi David, I forgot to ask if you wanted it, but I've added a suggested-by tag
> for your advice on v2.
OK with me. :-)
>
> Thanks,
> Marcelo
>
> drivers/iio/adc/ad4130.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/iio/adc/ad4130.c b/drivers/iio/adc/ad4130.c
> index de32cc9d18c5..66097ff65740 100644
> --- a/drivers/iio/adc/ad4130.c
> +++ b/drivers/iio/adc/ad4130.c
> @@ -942,6 +942,9 @@ static const struct iio_chan_spec_ext_info ad4130_filter_mode_ext_info[] = {
I suggest to add a comment here to say that the duplication is intentional and
the filter_mode attributes are for backwards compatibility.
> IIO_ENUM("filter_mode", IIO_SEPARATE, &ad4130_filter_mode_enum),
> IIO_ENUM_AVAILABLE("filter_mode", IIO_SHARED_BY_TYPE,
> &ad4130_filter_mode_enum),
> + IIO_ENUM("filter_type", IIO_SEPARATE, &ad4130_filter_mode_enum),
> + IIO_ENUM_AVAILABLE("filter_type", IIO_SHARED_BY_TYPE,
> + &ad4130_filter_mode_enum),
> { }
> };
>
With that...
Reviewed-by: David Lechner <dlechner@baylibre.com>
On 02/03, David Lechner wrote:
> On 2/3/25 1:11 PM, Marcelo Schmitt wrote:
> > Make filter control also available through filter_type attributes which are
> > now standardized in main IIO ABI documentation.
> >
> > Suggested-by: David Lechner <dlechner@baylibre.com>
> > Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
> > ---
> > Hi David, I forgot to ask if you wanted it, but I've added a suggested-by tag
> > for your advice on v2.
>
> OK with me. :-)
>
> >
> > Thanks,
> > Marcelo
> >
> > drivers/iio/adc/ad4130.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/iio/adc/ad4130.c b/drivers/iio/adc/ad4130.c
> > index de32cc9d18c5..66097ff65740 100644
> > --- a/drivers/iio/adc/ad4130.c
> > +++ b/drivers/iio/adc/ad4130.c
> > @@ -942,6 +942,9 @@ static const struct iio_chan_spec_ext_info ad4130_filter_mode_ext_info[] = {
>
> I suggest to add a comment here to say that the duplication is intentional and
> the filter_mode attributes are for backwards compatibility.
>
Okay, will do.
> > IIO_ENUM("filter_mode", IIO_SEPARATE, &ad4130_filter_mode_enum),
> > IIO_ENUM_AVAILABLE("filter_mode", IIO_SHARED_BY_TYPE,
> > &ad4130_filter_mode_enum),
> > + IIO_ENUM("filter_type", IIO_SEPARATE, &ad4130_filter_mode_enum),
> > + IIO_ENUM_AVAILABLE("filter_type", IIO_SHARED_BY_TYPE,
> > + &ad4130_filter_mode_enum),
> > { }
> > };
> >
>
> With that...
>
> Reviewed-by: David Lechner <dlechner@baylibre.com>
© 2016 - 2026 Red Hat, Inc.