From owner-freebsd-usb@FreeBSD.ORG Fri Aug 27 08:53:42 2010 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FF6C10656A8 for ; Fri, 27 Aug 2010 08:53:42 +0000 (UTC) (envelope-from kc5vdj.freebsd@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id C52738FC1D for ; Fri, 27 Aug 2010 08:53:41 +0000 (UTC) Received: by iwn36 with SMTP id 36so2740394iwn.13 for ; Fri, 27 Aug 2010 01:53:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=XqEY3yK0AKYXV4uTO3qjC2vxhH0+X3Nmzij+wxxJxA4=; b=Rdhon0KDBmp/bn6zNoaSA4+96YlFQqrOXUzOiIaxFBcHcXwEnQLqvLffBvZs9WxjcQ 19ukciSTxxemfogAumDAdtc3M1iGK1w9t5M9/ohLrp2lHr+vEaqpbOoXYElWbB6TCqJM J6+KE9vuI3Bl7Vrb5T7a8asrb/AEzwurr4HaE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=esHJ0uzScu67c6JQyfVpbcieDhhBv1bvmMNtXWwtTnGwLaWclLiNaj9gNiNpQd0x3N aVovTjJ8uADvS44kqwrWkwTrvyoFwGOSBEmQrB4xmBooqfSCp0G4wHukvWtq1/t0XKuU m0LYQo4XPoOlmOLB+1HwAMkUptd5Atz+6oNE8= Received: by 10.231.174.72 with SMTP id s8mr842994ibz.41.1282899221038; Fri, 27 Aug 2010 01:53:41 -0700 (PDT) Received: from orb.electron-tube.net (71-217-215-181.cdrr.qwest.net [71.217.215.181]) by mx.google.com with ESMTPS id e8sm3500757ibb.2.2010.08.27.01.53.40 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 27 Aug 2010 01:53:40 -0700 (PDT) Message-ID: <4C777D12.3040900@gmail.com> Date: Fri, 27 Aug 2010 03:53:38 -0500 From: Jim Bryant User-Agent: Thunderbird 2.0.0.24 (X11/20100731) MIME-Version: 1.0 To: Hans Petter Selasky References: <4C76AB76.4070806@gmail.com> <201008262232.44775.hselasky@c2i.net> <4C76DCBF.3080904@gmail.com> <201008270856.43512.hselasky@c2i.net> In-Reply-To: <201008270856.43512.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org Subject: Re: writing usb drivers under 8.x X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2010 08:53:42 -0000 it'll be a pair of character devices. the imon vfd is oem'ed to virtually EVERY high-end vfd-equipped htpc case on the market, all such tend to have the remote control interface as well built into the unit. the difference exists with the knob/button, some have it, others don't. the knob/button uses interrupt packets like the remote, but a totally different kind of packet, and i don't see support for it in lirc, so, i'll probably integrate it into the vfd device as the only read, and leave the remote as a seperate 100% lirc device. if people want to tie the knob/button to the volume/mute function exclusively, they can do so outside of the lirc framework. imho, the knob/button has better use as a function selector associated with menus on the vfd, although it can be used for volume/mute with little modification to existing lirc-related code. another possibility would be to use a function in the vfd driver to switch it between the vfd device for discrete use, or to switch it to the /dev/lirc device and have it link directly to the lirc codes for the remote for the volume up/down/mute buttons, with the capability to switch it back with another call to the /dev/vfd device. this is the direction i'm leaning. since the vfd panel, knob/button, and lirc-compat remote are all going to be in this driver, it's kind of a no-brainer. the option to use the knob/button for either should be left to the end-user/programmer. most people would rather use a remote control for volume/mute anyway. although there is very rudimentary support in linux under LCDd for the imon vfd, i'm thinking about not going that route. the end product may not end up being lcdproc /dev/lcd compat. it has limitations i don't like, and it wouldn't take advantage of the features the imon has. lirc compat is a goal of this project though. most of the work is done on that front, i just need to port that over from linux. the features of the imon remote control are well-supported in lirc. /dev/lirc will exist in my driver. Hans Petter Selasky wrote: > On Thursday 26 August 2010 23:29:35 Jim Bryant wrote: > >> Actually, all of my test programs (for testing my reverse engineering >> efforts) have been done in libusb-1.0. >> >> I would actually like to write kernel-level drivers though for these. >> >> > > Then you should look at existing drivers in /sys/dev/usb/xxx, which match your > device class. What kind of API do you want to userspace? tty-device, character > device? > > --HPS > >