Home
last modified time | relevance | path

Searched hist:e1d392dc (Results 1 – 2 of 2) sorted by relevance

/openbmc/linux/tools/iio/
H A Diio_utils.he1d392dc Fri Mar 19 08:53:01 CDT 2021 Linus Walleij <linus.walleij@linaro.org> iio: event_monitor: Enable events before monitoring

After some painful sessions with a driver that register an
enable/disable sysfs knob (gp2ap002) and manually going
in and enabling the event before monitoring it:

cd /sys/bus/iio/devices/iio\:device2/events
# ls
in_proximity_thresh_either_en
# echo 1 > in_proximity_thresh_either_en

I realized that it's better if the iio_event_monitor is
smart enough to enable all events by itself and disable them
after use, if passed the -a flag familiar from the
iio_generic_buffer tool.

Auto-enabling events depend on the hardware being able
to handle all events at the same time which isn't
necessarily the case, so a command line option is required
for this.

Cc: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20210319135301.542911-1-linus.walleij@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
H A Diio_event_monitor.ce1d392dc Fri Mar 19 08:53:01 CDT 2021 Linus Walleij <linus.walleij@linaro.org> iio: event_monitor: Enable events before monitoring

After some painful sessions with a driver that register an
enable/disable sysfs knob (gp2ap002) and manually going
in and enabling the event before monitoring it:

cd /sys/bus/iio/devices/iio\:device2/events
# ls
in_proximity_thresh_either_en
# echo 1 > in_proximity_thresh_either_en

I realized that it's better if the iio_event_monitor is
smart enough to enable all events by itself and disable them
after use, if passed the -a flag familiar from the
iio_generic_buffer tool.

Auto-enabling events depend on the hardware being able
to handle all events at the same time which isn't
necessarily the case, so a command line option is required
for this.

Cc: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20210319135301.542911-1-linus.walleij@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>