Re: [PATCH] iio: event_monitor: Enable events before monitoring

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 6 Mar 2021 22:29:41 +0100
Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:

> On Sat, Mar 6, 2021 at 4:39 PM Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
> 
> > Sadly this doesn't work for many devices.
> > It is a common thing for hardware to only support a much smaller
> > set of event monitoring registers / threshold detectors than the
> > number of channels.  In many cases we handle that by working on
> > a fifo basis.  So what this will do is enable a bunch of events
> > which will then be replaced by later events - end result some
> > random event will be enabled (or maybe 2 of them across N channels)  
> 
> I understand.
> 
> What about augmenting the heuristics like this:
> 
> 1. Count the available events.
> 2. If they are just one, then enable that event and disable after use.
> 
> This will make all proximity sensors and other things that just
> provide a single event work out of the box.

Rather unintuitive interface.  I think we are better off just
adding a -a parameter like we have for the buffer example.

If people get used to it enabling sensible events for a simple device
then move on to a more complex one where the heuristic breaks down
then they will be very confused.

J

> 
> Yours,
> Linus Walleij




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux