From dafcf4ed8392476099c9e95642d2daa6e61ee1b6 Mon Sep 17 00:00:00 2001 From: Gwendal Grignou Date: Thu, 25 Feb 2021 17:47:33 -0800 Subject: iio: hrtimer: Allow sub Hz granularity Allow setting frequency below 1Hz or sub 1Hz precision. Useful for slow sensors like ALS. Test frequency is set properly: modprobe iio-trig-hrtimer && \ mkdir /sys/kernel/config/iio/triggers/hrtimer/t1 && \ cd /sys/bus/iio/devices/triggerX ; for i in 1 .1 .01 .001 ; do echo $i > sampling_frequency cat sampling_frequency done Signed-off-by: Gwendal Grignou Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210226014733.2108544-1-gwendal@chromium.org Signed-off-by: Jonathan Cameron --- Documentation/iio/iio_configfs.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'Documentation/iio') diff --git a/Documentation/iio/iio_configfs.rst b/Documentation/iio/iio_configfs.rst index dbc61f35ea05..b276397af797 100644 --- a/Documentation/iio/iio_configfs.rst +++ b/Documentation/iio/iio_configfs.rst @@ -99,3 +99,4 @@ Each trigger can have one or more attributes specific to the trigger type. "hrtimer" trigger type doesn't have any configurable attribute from /config dir. It does introduce the sampling_frequency attribute to trigger directory. +That attribute sets the polling frequency in Hz, with mHz precision. -- cgit v1.2.3-70-g09d2