From owner-freebsd-hackers@FreeBSD.ORG Wed May 7 14:46:34 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DFD0E800 for ; Wed, 7 May 2014 14:46:33 +0000 (UTC) Received: from mailgate.gta.com (mailgate.gta.com [199.120.225.23]) by mx1.freebsd.org (Postfix) with ESMTP id 55CBE90 for ; Wed, 7 May 2014 14:46:33 +0000 (UTC) Received: (qmail 25323 invoked by uid 1000); 7 May 2014 14:46:31 -0000 Date: Wed, 7 May 2014 10:46:31 -0400 From: Larry Baird To: Ermal Lu??i Subject: Re: apu1c led driver Message-ID: <20140507144631.GA24565@gta.com> References: <20140422020109.GA57760@gta.com> <69BC3E8E-A5D1-4CAD-96A0-9139FFBD8AA3@netgate.com> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.18 Cc: Freebsd hackers list , Jim Thompson X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 14:46:34 -0000 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? 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