public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
* RE: LED driver (8260)
       [not found] <20050317125419.73A6367A79@ozlabs.org>
@ 2005-03-21 18:10 ` David Bruce
  0 siblings, 0 replies; only message in thread
From: David Bruce @ 2005-03-21 18:10 UTC (permalink / raw)
  To: linuxppc-embedded

I've taken Hans Schillstrom's version of rcb8270_led-0001.bin (which is 
based on DENX status_led.c) and "generalized" it for my purposes (I have 
LED's on more that one port and not all pins can be LED's) (This is used 
on a TQM8260). This also has only been tested briefly...

What was done:
1.) put back in DENX copyright; ;^)
2.) removed unknown include files;
3.) put in compile option to NOT initialize a port pin during module 
    install, see #define DO_NOT_INIT_PORT and #ifndef DO_NOT_INIT_PORT;
4.) added "used" field to control structure to specify if LED was ever 
used (set in statusled_open());
5.) put code in statusled_cleanup() that will only shut off a LED if the 
  LED was ever used (opened);

In the led_dev_t led_dev[] control structure, all of the port A & D pins 
are specified (for my needs) but not all are used. (The project that I 
am using this for is a "moving" target and not all of the port pins have 
been specified.) Therefore in the load script, only create devices that 
_ARE_ LED's. Device minor numbers for port A is the port pin number and 
for port D it is the port pin number times 2.

It can be found at:
http://www.geocities.com/dbruce_01721/status_led_8260.c

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-03-21 18:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20050317125419.73A6367A79@ozlabs.org>
2005-03-21 18:10 ` LED driver (8260) David Bruce

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox