[lkml]   [2011]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectIIO (+ more general?) Error condition handling (e.g. wire fell out errors)
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

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...)



 \ /
  Last update: 2011-09-30 11:37    [W:0.027 / U:0.296 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site