Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 May 2014 16:57:22 +0200
From:      =?UTF-8?Q?Ermal_Lu=C3=A7i?= <eri@freebsd.org>
To:        Larry Baird <lab@gta.com>
Cc:        Freebsd hackers list <freebsd-hackers@freebsd.org>, Jim Thompson <jim@netgate.com>
Subject:   Re: apu1c led driver
Message-ID:  <CAPBZQG2XzJ5qcAMJ_3O7m_sL=KOrqdV1Ro=HSg7irKwqwN3j0w@mail.gmail.com>
In-Reply-To: <20140507144631.GA24565@gta.com>
References:  <20140422020109.GA57760@gta.com> <69BC3E8E-A5D1-4CAD-96A0-9139FFBD8AA3@netgate.com> <CAPBZQG3v4WTxnuW8xMpRJyK0HD9GcZe0dw_xi61AXnC6PygFtg@mail.gmail.com> <20140507144631.GA24565@gta.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, May 7, 2014 at 4:46 PM, Larry Baird <lab@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@gta.com                              | TEL 407-380-0220
>



-- 
Ermal



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPBZQG2XzJ5qcAMJ_3O7m_sL=KOrqdV1Ro=HSg7irKwqwN3j0w>