All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: sathyanarayanan.kuppuswamy@linux.intel.com,
	Daniel Baluta <daniel.baluta@gmail.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
	Peter Meerwald <pmeerw@pmeerw.net>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Subject: Re: [PATCH v1 2/3] iio: ltr501: Add interrupt rate control support
Date: Wed, 01 Apr 2015 19:48:19 +0200	[thread overview]
Message-ID: <551C2F63.50609@metafoo.de> (raw)
In-Reply-To: <551C2EC4.1050208@linux.intel.com>

On 04/01/2015 07:45 PM, sathyanarayanan kuppuswamy wrote:
>
>
> On 04/01/2015 08:15 AM, Lars-Peter Clausen wrote:
>> On 04/01/2015 05:02 PM, Daniel Baluta wrote:
>>> On Wed, Apr 1, 2015 at 5:39 PM, Lars-Peter Clausen <lars@metafoo.de> wrote:
>>>> On 04/01/2015 04:04 PM, Daniel Baluta wrote:
>>>> [...]
>>>>>
>>>>>
>>>>>> +static const struct iio_chan_spec_ext_info ltr501_ext_info[] = {
>>>>>> +       {
>>>>>> +               .name = "intr_persist",
>>>>>> +               .read = ltr501_read_intr_prst,
>>>>>> +               .write = ltr501_write_intr_prst,
>>>>>> +               .shared = IIO_SHARED_BY_TYPE,
>>>>>> +       },
>>>>>> +       {},
>>>>>> +};
>>>>>> +
>>>>>
>>>>> Would be nice to standardize persistence attribute
>>>>> (IIO_CHAN_INFO_PERSISTENCE).
>>>>
>>>>
>>>> If I understand the behavior correctly it causes that the event needs to be
>>>> triggered at least n times before the event is reported by the chip. In my
>>>> opinion 'persistence' is not a good term for that. I'm not sure what a
>>>> better term is but I think it should go more in the direction of ratelimit
>>>> or something.
>>>
>>> I've seen this term used for many devices:
>>>
>>> *  TSL25911 ambient light sensor [1]
>>>
>>> [ One set of thresholds can be configured to trigger an interrupt only when
>>>   the ambient light exceeds them for a configurable amount of time
>>> (persistence)
>>> ]
>>>
>>> * TAOS TCS34725 ambient light sensor [2]
>>> [
>>> The interrupt persistence filter allows the user to define the number
>>> of consecutive
>>>   out-of-threshold events necessary before generating an interrupt.
>>> ]
>>>
>>> * Avago SAPDS-9950, Sensortek STK3310
>>>
>>> I think the TSL25911 datasheet best describes this parameter, as the
>>> amount of time
>>> that ambient light should exceed a threshold until an interrupt is
>>> generated.
>>
>> Ok, that makes more sense. I misunderstood the initial description as that
>> the signal would have to go first above the threshold then below the
>> threshold, and this for a number of times. Whereas it needs to exceed the
>> threshold for a certain amount of time before the event is triggered. If
>> it goes below the threshold before the persistence interval no event is
>> triggered and the counter is reset.
>
> Yes, it needs to cross the threshold n number of times before a event is
> generated.

Wait. It needs to cross the threshold or it needs to stay above the threshold?

  reply	other threads:[~2015-04-01 17:48 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-01  2:55 [PATCH v1 0/3] Added LTR501 Interrupt support Kuppuswamy Sathyanarayanan
2015-04-01  2:55 ` [PATCH v1 1/3] iio: ltr501: Add interrupt support Kuppuswamy Sathyanarayanan
2015-04-01  2:55 ` [PATCH v1 2/3] iio: ltr501: Add interrupt rate control support Kuppuswamy Sathyanarayanan
2015-04-01 14:04   ` Daniel Baluta
2015-04-01 14:39     ` Lars-Peter Clausen
2015-04-01 15:02       ` Daniel Baluta
2015-04-01 15:15         ` Lars-Peter Clausen
2015-04-01 17:45           ` sathyanarayanan kuppuswamy
2015-04-01 17:48             ` Lars-Peter Clausen [this message]
2015-04-01 19:06               ` sathyanarayanan kuppuswamy
2015-04-01 19:22                 ` sathyanarayanan kuppuswamy
2015-04-09 10:16                   ` Jonathan Cameron
2015-04-09 22:35                     ` sathyanarayanan kuppuswamy
2015-04-10  5:51                       ` Jonathan Cameron
2015-04-22 15:59                         ` Lars-Peter Clausen
2015-04-22 20:58                           ` Jonathan Cameron
2015-04-01 20:19           ` Jonathan Cameron
2015-04-01 17:33     ` sathyanarayanan kuppuswamy
2015-04-01  2:55 ` [PATCH v1 3/3] iio: ltr501: Add ACPI enumeration support Kuppuswamy Sathyanarayanan
2015-04-01 13:02 ` [PATCH v1 0/3] Added LTR501 Interrupt support Daniel Baluta
2015-04-01 17:29   ` sathyanarayanan kuppuswamy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=551C2F63.50609@metafoo.de \
    --to=lars@metafoo.de \
    --cc=daniel.baluta@gmail.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=srinivas.pandruvada@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.