apu1c led driver

Ermal Luçi eri at freebsd.org
Wed May 7 14:57:23 UTC 2014


On Wed, May 7, 2014 at 4:46 PM, Larry Baird <lab at gta.com> wrote:

> On Wed, May 07, 2014 at 10:19:39AM +0200, Ermal Lu??i wrote:
> > Hello,
> >
> > find attached the driver as written today.
> > It needs some reshaping to be integrate with led(4) and gpio(4).
> >
> > I will see to have the reshaping done and submit it for inclusion.
> > The idea as it is today is that it expses an gpioapu device to which you
> > can write a string with 3 digits "101" for each led.
> > If you read from this device you just get the status of the switch on the
> > APU.
>
> I was about to submit a version of my own.  Instead I will take some
> code from my verison and add it to yours.  I attached a modified version
> that
> uses the led(4) framework to create:
>     /dev/led/led1, /dev/led/led2, and /dev/led/led3.
>
> I am curious about the gpioapu_close() function. what is it attempting
> to do?  My first thought was it was tring to put the leds back to a know
> state. But it is writing to the mode switch?
>
> Heh trying to restore leds to the original state :)
Have to fix that part.

Also you have a leak of led devs in your loop while attaching if something
goes wrong.
Need to fix that or i can fix that when i come to it!


> Larry
>
>
>
> --
> ------------------------------------------------------------------------
> Larry Baird
> Global Technology Associates, Inc. 1992-2012    | http://www.gta.com
> Celebrating Twenty Years of Software Innovation | Orlando, FL
> Email: lab at gta.com                              | TEL 407-380-0220
>



-- 
Ermal


More information about the freebsd-hackers mailing list