All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
To: Jonathan Cameron <jic23@cam.ac.uk>
Cc: linux-iio@vger.kernel.org
Subject: Re: [RFC PATCH 0/4] staging:iio:adis16350 various updates and fixes
Date: Mon, 06 Sep 2010 11:00:45 +0200	[thread overview]
Message-ID: <4C84ADBD.1080000@iis.fraunhofer.de> (raw)
In-Reply-To: <1283725218-15157-1-git-send-email-jic23@cam.ac.uk>


[-- Attachment #1.1: Type: text/plain, Size: 1846 bytes --]

Am 06.09.2010 00:20, schrieb Jonathan Cameron:
>
> Patch 3 puts in event support.  It's complex, but then what the
> device has some complex abilities. Still if anyone can see any
> simplifications without breaking the interface I would definitely
> like to hear them!

> @@ -36,3 +36,9 @@
>
>  #define IIO_EVENT_CODE_IN_HIGH_THRESH(a) (IIO_EVENT_CODE_ADC_BASE  + a)
>  #define IIO_EVENT_CODE_IN_LOW_THRESH(a) (IIO_EVENT_CODE_ADC_BASE  + a + 32)
> +#define IIO_EVENT_CODE_IN_HIGH_ROC(a) (IIO_EVENT_CODE_ADC_BASE  + a + 64)
> +#define IIO_EVENT_CODE_IN_LOW_ROC(a) (IIO_EVENT_CODE_ADC_BASE  + a + 96)
> +#define IIO_EVENT_CODE_IN_SUPPLY_HIGH (IIO_EVENT_CODE_ADC_BASE + 97)
> +#define IIO_EVENT_CODE_IN_SUPPLY_LOW (IIO_EVENT_CODE_ADC_BASE + 98)
> +#define IIO_EVENT_CODE_IN_SUPPLY_ROC_HIGH (IIO_EVENT_CODE_ADC_BASE + 99)
> +#define IIO_EVENT_CODE_IN_SUPPLY_ROC_LOW (IIO_EVENT_CODE_ADC_BASE + 100)

What about putting some more structure in the event codes.
Maybe <type_id> <channel> <event_id> each in it's own byte, where
<type_id> is one of accel, gyro, ...
<channel> is one of x, y, z
<event_id> is one of high_thresh, low_thresh, ...
maybe even a defined bit for high or low, one for thresh or roc, ...

Then we don't need a big event table, but can figure out all parts 
independently.

Could we generate some of the event attributes in sysfs on the fly? Like 
have an attribute alarm0_input, where we can write in a list of channels 
and then only generate the limit attributes for these channels.

Regards,
-- 
Dipl.-Inf. Manuel Stahl
Fraunhofer-Institut für Integrierte Schaltungen IIS
- Leistungsoptimierte Systeme -
Nordostpark 93                Telefon  +49 (0)911/58061-6419
90411 Nürnberg                Fax      +49 (0)911/58061-6398
http://www.iis.fraunhofer.de  manuel.stahl@iis.fraunhofer.de

[-- Attachment #1.2: manuel_stahl.vcf --]
[-- Type: text/x-vcard, Size: 170 bytes --]

begin:vcard
fn:Manuel Stahl
n:Stahl;Manuel
email;internet:manuel.stahl@iis.fraunhofer.de
tel;work:+49 911 58061-6419
x-mozilla-html:FALSE
version:2.1
end:vcard


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 6148 bytes --]

  parent reply	other threads:[~2010-09-06  9:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-05 22:20 [RFC PATCH 0/4] staging:iio:adis16350 various updates and fixes Jonathan Cameron
2010-09-05 22:20 ` [PATCH 1/4] staging:iio:adis16350 add non burst buffer fill and fix burst logic Jonathan Cameron
2010-09-05 22:20 ` [PATCH 2/4] staging:iio:adis16350 move datardy trigger to straight interrupt Jonathan Cameron
2010-09-06  8:13   ` Manuel Stahl
2010-09-06 11:50     ` Jonathan Cameron
2010-09-05 22:20 ` [PATCH 3/4] staging:iio:adis16350 Add optional event support Jonathan Cameron
2010-09-09 23:11   ` Jonathan Cameron
2010-09-05 22:20 ` [PATCH 4/4] staging:iio:adis16350 add missing registration of temp_offset attr Jonathan Cameron
2010-09-06  9:00 ` Manuel Stahl [this message]
2010-09-06 11:49   ` [RFC PATCH 0/4] staging:iio:adis16350 various updates and fixes Jonathan Cameron

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=4C84ADBD.1080000@iis.fraunhofer.de \
    --to=manuel.stahl@iis.fraunhofer.de \
    --cc=jic23@cam.ac.uk \
    --cc=linux-iio@vger.kernel.org \
    /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.