diff mbox series

[v3,2/3] iio: adc: ad4130: Add filter_type attributes

Message ID 77e5eb540e5d425016ea77a641e16cd31a2a761a.1738608986.git.marcelo.schmitt@analog.com (mailing list archive)
State New
Headers show
Series Re-add filter_type/filter_mode | expand

Commit Message

Marcelo Schmitt Feb. 3, 2025, 7:11 p.m. UTC
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(+)

Comments

David Lechner Feb. 3, 2025, 7:40 p.m. UTC | #1
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>
Marcelo Schmitt Feb. 4, 2025, 12:54 p.m. UTC | #2
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>
diff mbox series

Patch

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),
 	{ }
 };