Skip to contentSkip to conversation

tools: iio: lsiio: enumerate processed channels

PATCH Applied Matt Ranostay 2 participants 2 messages Aug 2, 2016 – Aug 15, 2016 IIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools: iio: lsiio: enumerate processed channels

Enumerate the processed channels (e.g. *_input) as well the raw channels.

---
 tools/iio/lsiio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/iio/lsiio.c +2 -1
index 3d650e668252..ab0f5cf16025 100644
@@ -51,7 +51,8 @@ static int dump_channels(const char *dev_dir_name)
 
 	while (ent = readdir(dp), ent)
 		if (check_prefix(ent->d_name, "in_") &&
-		    check_postfix(ent->d_name, "_raw"))
+		   (check_postfix(ent->d_name, "_raw") ||
+		    check_postfix(ent->d_name, "_input")))
 			printf("   %-10s\n", ent->d_name);
 
 	return (closedir(dp) == -1) ? -errno : 0;
Signature · 1 line
2.7.4
maintainer Applied
#1 lore raw
Quoted 3 lines · Matt Ranostay

Enumerate the processed channels (e.g. *_input) as well the raw channels.

Applied to the togreg branch of iio.git

Thanks,

Jonathan

Quoted 19 lines
---
 tools/iio/lsiio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/iio/lsiio.c +2 -1
index 3d650e668252..ab0f5cf16025 100644
@@ -51,7 +51,8 @@ static int dump_channels(const char *dev_dir_name)
 
 	while (ent = readdir(dp), ent)
 		if (check_prefix(ent->d_name, "in_") &&
-		    check_postfix(ent->d_name, "_raw"))
+		   (check_postfix(ent->d_name, "_raw") ||
+		    check_postfix(ent->d_name, "_input")))
 			printf("   %-10s\n", ent->d_name);
 
 	return (closedir(dp) == -1) ? -errno : 0;