From owner-freebsd-arch@FreeBSD.ORG Thu Nov 26 07:51:42 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35D841065672 for ; Thu, 26 Nov 2009 07:51:42 +0000 (UTC) (envelope-from gonzo@bluezbox.com) Received: from expo.ukrweb.net (mail.univua.net [91.202.128.78]) by mx1.freebsd.org (Postfix) with ESMTP id E588E8FC17 for ; Thu, 26 Nov 2009 07:51:41 +0000 (UTC) Received: from [24.87.52.209] (helo=lair.bluezbox.com) by expo.ukrweb.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69 (FreeBSD)) (envelope-from ) id 1NDYgn-000B2m-Qo; Thu, 26 Nov 2009 09:22:56 +0200 Message-ID: <4B0E2C8D.1090700@bluezbox.com> Date: Wed, 25 Nov 2009 23:21:49 -0800 From: Oleksandr Tymoshenko User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: Milan Obuch References: <20091126045736.GA25431@bluezbox.com> <200911260707.03168.freebsd-arch@dino.sk> In-Reply-To: <200911260707.03168.freebsd-arch@dino.sk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-arch@freebsd.org Subject: Re: [RFC] GPIO framework X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2009 07:51:42 -0000 Milan Obuch wrote: > On Thursday 26 November 2009 05:57:36 Oleksandr Tymoshenko wrote: > > Anyway, I will try to look at your work in next amount of my free time and > comment on the code side, if I will have anything, but now, some general > comments on your mail. I have some WRAP boards, where some GPIOs are used to > drive three status LEDs and attach a soft reset button, add-on board with LPC > SuperIO chip with some tens of GPIOs and some other SuperIOs where I can test > things, x86 based. Thanks, I'd appreciate it. > Also there are some PRs open for NSLU2 (ARM SoC based), where some GPIOs are > used for LEDs and button(s), too. You might consider them too, if you did not > already. I can test something for NSLU2, too, but I did not manage to master > it completely yet. > > And, one more general note, I found GPIOs are used internally in many various > add-on cards, like atheros based wireless adapters (ath driver), various TV > grabber cards - mostly for i2c setting of tuner parameters etc. Usefullness > of covering these with general GPIO framework should be considered, though. Yes, I'm aware of this kind of GPIO use. Not sure how it fit into device tree model though. May be some additional API calls will be required. > Did you think about ability to use interrupt abilities of GPIO? In my work I > added a hook to call a script via devd for pins selected (a special flag or > something). This way it is easy to execute a script on a button press. Yes, I thought about it but postponed for next stage. My idea was to have ioctl that would block waiting for interrupt but I like your devd approach better. Thanks! Looking forward to you review and feedback. -- gonzo