Subject: The user-controllable LEDs on an Intel ISP1100
To: NetBSD i386 port <port-i386@netbsd.org>
From: Al Snell <alaric@alaric-snell.com>
List: port-i386
Date: 11/06/2000 16:19:34
The technical manual specifies what ports to write to to:

Switch the power LEDs between off, on (green) or fault (orange)

Control the two user-controlled LEDs, U1 and U2

Now, it occurs to me that a NetBSD driver for these babies would come in
pretty handy. Does anyone have one in the pipeline, or ought I to dive
into kernel space myself?

If the latter, does anyone have anything to say about the following
API:

We design the front panel interface to be later extensible to handle all
sorts of things - LCDs, extra buttons, etc. This means we use /dev/panel
to talk to the front panel.

/dev/panel works on ioctls. There should be an ioctl to get the hardware
capabilities:

1) A list of buttons, with their names as text strings
2) A list of switches, with their names as text strings, and their
positions as text strings (eg, "Standard", "Turbo")
3) A list of LEDs, with their names as text strings, and a list of their
states (be they "On","Off" or "Off","Fault","On" or whatever)
4) Whether there is a dot matrix display available, and how many rows/cols
it does

...and ioctls to get the statuses of switches, set the statuses of LEDs,
do a normal write to /dev/panel to put text on the dot matrix... how to
set things up so that a userland process can be notified of buttons being
pressed? The obvious answer is to have them open /dev/panel for read and
block on reads, but is it possible to write a driver that will support
multiple "listeners" if different processes use different buttons?

There would need to be a "panelctl" utility to handle this. I propose that
it live in /sbin rather than /usr/sbin, since the fault light would be a
good way to signal an inability to mount /usr!

Of course, the i386/isp1100 driver wouldn't implement anything apart from
the LEDs - I just want to make sure I set a good solid base on which to
develop other front panel drivers :-)

ABS

-- 
                       Alaric B. Snell BEng ACGI
 http://www.alaric-snell.com/  http://RF.Cx/  http://www.warhead.org.uk/
   Any sufficiently advanced technology can be emulated in software