diff mbox series

[v2,3/3] Documentation: ABI: IIO: Drop AD4130 specific filter_type_available options

Message ID 5b86acb56fd2aa337223a6467c1caf2a06682fcd.1736261048.git.marcelo.schmitt@analog.com (mailing list archive)
State Changes Requested
Headers show
Series Re-add filter_type/filter_mode | expand

Commit Message

Marcelo Schmitt Jan. 7, 2025, 3:13 p.m. UTC
The only driver exporting filter_type_available attribute is ad7779 and it
only supports sinc3 and sinc5 filters. Remove options that are not
presented through filter_type_available attribute.

Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
---
Maybe this is not worth it (or desirable?) since the options may come back in
the future if new drivers happen to need them.

 Documentation/ABI/testing/sysfs-bus-iio | 21 +++++----------------
 1 file changed, 5 insertions(+), 16 deletions(-)

Comments

David Lechner Jan. 7, 2025, 5:53 p.m. UTC | #1
On 1/7/25 9:13 AM, Marcelo Schmitt wrote:
> The only driver exporting filter_type_available attribute is ad7779 and it
> only supports sinc3 and sinc5 filters. Remove options that are not
> presented through filter_type_available attribute.
> 
> Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
> ---
> Maybe this is not worth it (or desirable?) since the options may come back in
> the future if new drivers happen to need them.

I would be tempted to add filter_type{,_available} attributes to the ad4130
driver that mirrors the existing filter_mode{,_available} attributes. We can't
remove filter_mode since that would break things, but having filter_type in
addition to that would mean than userspace tools could standardize on
filter_type and not have to make a special exception for the different naming
on ad4130.

Then we wouldn't need to delete the extra items here and we wouldn't have to
repeat the docs for sysfs-bus-iio-adc-ad4130. Those docs can just have the
deprecation paragraph and mention that it returns values identical to the
filter_type attributes for backwards compatibility.
Jonathan Cameron Jan. 12, 2025, 11:56 a.m. UTC | #2
On Tue, 7 Jan 2025 11:53:44 -0600
David Lechner <dlechner@baylibre.com> wrote:

> On 1/7/25 9:13 AM, Marcelo Schmitt wrote:
> > The only driver exporting filter_type_available attribute is ad7779 and it
> > only supports sinc3 and sinc5 filters. Remove options that are not
> > presented through filter_type_available attribute.
> > 
> > Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
> > ---
> > Maybe this is not worth it (or desirable?) since the options may come back in
> > the future if new drivers happen to need them.  
> 
> I would be tempted to add filter_type{,_available} attributes to the ad4130
> driver that mirrors the existing filter_mode{,_available} attributes. We can't
> remove filter_mode since that would break things, but having filter_type in
> addition to that would mean than userspace tools could standardize on
> filter_type and not have to make a special exception for the different naming
> on ad4130.
> 
> Then we wouldn't need to delete the extra items here and we wouldn't have to
> repeat the docs for sysfs-bus-iio-adc-ad4130. Those docs can just have the
> deprecation paragraph and mention that it returns values identical to the
> filter_type attributes for backwards compatibility.

Good idea.  Given we always allow any attribute to change any other, having
duplicates for ABI backwards compatibility is fine.

Thanks,

Jonathan
diff mbox series

Patch

diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
index 1ddf3d7dd2b3..946c519f8687 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio
+++ b/Documentation/ABI/testing/sysfs-bus-iio
@@ -2280,24 +2280,13 @@  What:		/sys/bus/iio/devices/iio:deviceX/filter_type_available
 KernelVersion:	6.1
 Contact:	linux-iio@vger.kernel.org
 Description:
-		Reading returns a list with the possible filter modes. Options
-		for the attribute:
+		Lists all available filter types. Possible options for the
+		attribute:
 
-		* "sinc3" - The digital sinc3 filter. Moderate 1st
-		  conversion time. Good noise performance.
-		* "sinc4" - Sinc 4. Excellent noise performance. Long
-		  1st conversion time.
+		* "sinc3" - The digital sinc3 filter. Moderate 1st conversion
+		  time. Good noise performance.
 		* "sinc5" - The digital sinc5 filter. Excellent noise
-		  performance
-		* "sinc4+sinc1" - Sinc4 + averaging by 8. Low 1st conversion
-		  time.
-		* "sinc3+rej60" - Sinc3 + 60Hz rejection.
-		* "sinc3+sinc1" - Sinc3 + averaging by 8. Low 1st conversion
-		  time.
-		* "sinc3+pf1" - Sinc3 + device specific Post Filter 1.
-		* "sinc3+pf2" - Sinc3 + device specific Post Filter 2.
-		* "sinc3+pf3" - Sinc3 + device specific Post Filter 3.
-		* "sinc3+pf4" - Sinc3 + device specific Post Filter 4.
+		  performance.
 
 What:		/sys/bus/iio/devices/iio:deviceX/filter_type
 KernelVersion:	6.1