linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] iio: Add support for max_sampling_frequency
@ 2016-12-30  9:23 Song Hongyan
  2016-12-30  9:23 ` [PATCH 2/4] iio: hid-sensors: API add max_sample_frequency Song Hongyan
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Song Hongyan @ 2016-12-30  9:23 UTC (permalink / raw)
  To: linux-iio; +Cc: jikos, jic23, srinivas.pandruvada, Song Hongyan

Add support for max_sampling_frequency, this will help user to
set sampling frequency to an acceptable range.

Signed-off-by: Song Hongyan <hongyan.song@intel.com>
---
 Documentation/ABI/testing/sysfs-bus-iio | 7 +++++++
 drivers/iio/industrialio-core.c         | 1 +
 include/linux/iio/iio.h                 | 1 +
 3 files changed, 9 insertions(+)

diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
index 60b7406..cbcd2b8 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio
+++ b/Documentation/ABI/testing/sysfs-bus-iio
@@ -54,6 +54,13 @@ Description:
 		relevant directories.  If it effects all of the above
 		then it is to be found in the base device directory.
 
+What:		/sys/bus/iio/devices/iio:deviceX/max_sampling_frequency
+KernelVersion:	4.11
+Contact:	linux-iio@vger.kernel.org
+Description:
+		This parameter shows the max sampling frequency, which can
+		help user to set sampling frequency to an acceptable range.
+
 What:		/sys/bus/iio/devices/iio:deviceX/sampling_frequency_available
 What:		/sys/.../iio:deviceX/buffer/sampling_frequency_available
 What:		/sys/bus/iio/devices/triggerX/sampling_frequency_available
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index 72fc96a..5203e75 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -140,6 +140,7 @@ struct bus_type iio_bus_type = {
 	[IIO_CHAN_INFO_HIGH_PASS_FILTER_3DB_FREQUENCY]
 	= "filter_high_pass_3db_frequency",
 	[IIO_CHAN_INFO_SAMP_FREQ] = "sampling_frequency",
+	[IIO_CHAN_INFO_MAX_SAMP_FREQ] = "max_sampling_frequency",
 	[IIO_CHAN_INFO_FREQUENCY] = "frequency",
 	[IIO_CHAN_INFO_PHASE] = "phase",
 	[IIO_CHAN_INFO_HARDWAREGAIN] = "hardwaregain",
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
index b4a0679..f9eba2e 100644
--- a/include/linux/iio/iio.h
+++ b/include/linux/iio/iio.h
@@ -34,6 +34,7 @@ enum iio_chan_info_enum {
 	IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY,
 	IIO_CHAN_INFO_HIGH_PASS_FILTER_3DB_FREQUENCY,
 	IIO_CHAN_INFO_SAMP_FREQ,
+	IIO_CHAN_INFO_MAX_SAMP_FREQ,
 	IIO_CHAN_INFO_FREQUENCY,
 	IIO_CHAN_INFO_PHASE,
 	IIO_CHAN_INFO_HARDWAREGAIN,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-12-30 20:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-30  9:23 [PATCH 1/4] iio: Add support for max_sampling_frequency Song Hongyan
2016-12-30  9:23 ` [PATCH 2/4] iio: hid-sensors: API add max_sample_frequency Song Hongyan
2016-12-30  9:23 ` [PATCH 3/4] iio: hid-sensor-attributes: Add input sample frequency check Song Hongyan
2016-12-30 20:32   ` Jonathan Cameron
2016-12-30  9:23 ` [PATCH 4/4] iio: hid: Expose sensors max_sample_frequency nodes Song Hongyan
2016-12-30 20:31 ` [PATCH 1/4] iio: Add support for max_sampling_frequency 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).