[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <160093423392.310579.10143738916599003618@swboyd.mtv.corp.google.com>
Date: Thu, 24 Sep 2020 00:57:13 -0700
From: Stephen Boyd <swboyd@...omium.org>
To: Jonathan Cameron <Jonathan.Cameron@...wei.com>
Cc: Jonathan Cameron <jic23@...nel.org>, linux-kernel@...r.kernel.org,
linux-iio@...r.kernel.org, Daniel Campello <campello@...omium.org>,
Lars-Peter Clausen <lars@...afoo.de>,
Peter Meerwald-Stadler <pmeerw@...erw.net>,
Rob Herring <robh+dt@...nel.org>, devicetree@...r.kernel.org,
Douglas Anderson <dianders@...omium.org>,
Gwendal Grignou <gwendal@...omium.org>,
Evan Green <evgreen@...omium.org>
Subject: Re: [PATCH] dt-bindings: iio: sx9310: Add various settings as DT properties
Quoting Stephen Boyd (2020-09-23 16:25:43)
> > > > > +
> > > > > + semtech,close-debounce-samples:
> > > > > + allOf:
> > > > > + - $ref: /schemas/types.yaml#definitions/uint32
> > > > > + - enum: [0, 2, 4, 8]
> > > > > + default: 0
> > > > > + description:
> > > > > + The number of close samples debounced for proximity/body thresholds.
> > > >
> > > > This feels like something that has more to do with the object motion than
> > > > the sensor setup, so perhaps should be controlled from userspace?
> > >
> > > Sure. Is there an IIO sample property? Or I should make a custom
> > > knob for this?
> >
> > It's kind of close to in_proximity0_thresh_period and that may be how they
> > have implemented it.
> >
> > That control specifies a number of samples for which a condition should be true
> > before it is reported.
>
> Sounds good. I can do that. It looks like the driver reports close/far
> via an event and these debounce values are the same for me so I can
> write both fields (close and far) with the same thresh_period value from
> userspace. If they need to be different between the two then this can be
> reevaluated?
>
Or I can assign thresh_period to falling and rising corresponding to
close/far debounce. Seems that the direction is the same, but that can
be split apart and each direction gets a different sysfs file?
Powered by blists - more mailing lists