From: Jonathan Cameron <jic23@cam.ac.uk>
To: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: IIO (+ more general?) Error condition handling (e.g. wire fell out errors)
Date: Fri, 30 Sep 2011 10:43:54 +0100 [thread overview]
Message-ID: <4E858F5A.5000901@cam.ac.uk> (raw)
I'm not sure how general this is, hence sent to LKML and IIO.
Some of the devices we have can produce interrupts indicating
that everything has gone horribly wrong. Sometimes this is
also embedded in the main data stream.
The best examples are all the 'wonderful' ways the ad2s1210 resolver
can go wrong. None of these would be expected to be part of normal
operating conditions.
So, the question is - do we want these to go through our main
events stream? They are weird and wonderful and often don't
align well with our existing event codes. Loss of data error
for example (a wire came out). Others could possibly be made
to fit but that would loose some of the semantics. Loss of
tracking could be a rate of change threshold event, but it
really is meant to tell you the data could be garbage.
So three options come to mind:
1) Have a magic set of event codes for device class specific
fault events and push through our main event path. For reference of
non IIO types - that is an anon file descriptor obtained by an
ioctl on the devices chrdev. Events are a simple timestamp / eventcode
pair.
2) Add another anon file that you get via an ioctl as a separate
event reporting channel. We then define a big list of error codes
without aiming for any real structure. Drivers would then need to
document what they can throw out (preferably under sysfs?)
3) Consider these out of band (from the out of band event data)
and look at other options for reporting them.
Is there anything general out there for reporting hardware failures
that would be appropriate? Sometime these conditions are the sort
of thing that should cause a siren to go off.
They might be sensor failure.... or they might mean you have
a runaway train heading for a station...
(p.s. I hope no one is using the current driver for trains, though
that might explain British trains...)
Thanks,
Jonathan
next reply other threads:[~2011-09-30 9:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-30 9:43 Jonathan Cameron [this message]
2011-09-30 9:47 ` IIO (+ more general?) Error condition handling (e.g. wire fell out errors) Alan Cox
2011-10-05 8:52 ` 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=4E858F5A.5000901@cam.ac.uk \
--to=jic23@cam.ac.uk \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).