From owner-freebsd-hackers Tue Oct 3 4: 0:57 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mailhost.stack.nl (vaak.stack.nl [131.155.140.140]) by hub.freebsd.org (Postfix) with ESMTP id BBD3837B503 for ; Tue, 3 Oct 2000 04:00:55 -0700 (PDT) Received: from toad.stack.nl (toad.ipv6.stack.nl [3ffe:604:3:9:200:e8ff:fe55:346d]) by mailhost.stack.nl (Postfix) with ESMTP id C7E31159E0 for ; Tue, 3 Oct 2000 13:00:54 +0200 (CEST) Received: from stack.nl (dyn68-aud.nbw.tue.nl [::ffff:131.155.32.68]) by toad.stack.nl (Postfix) with ESMTP id 6914E9717 for ; Tue, 3 Oct 2000 13:00:54 +0200 (CEST) Message-ID: <39D9BC63.7C7EDD43@stack.nl> Date: Tue, 03 Oct 2000 13:00:51 +0200 From: Willem van Engen X-Mailer: Mozilla 4.08 [en] (X11; I; FreeBSD 4.1.1-RELEASE i386) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: FreeBSD 4.x kld device driver Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I'm writing a device driver for FreeBSD 3.x and 4.x for the application panel of the fujitsu lifebook c4110 notebook (a led, lcd and some buttons). It took me some time to get a working driver (compiles on both 3.x and 4.x), but it's not really clean code. I'd like to rewrite it, but I can't find how to do it properly (the kernel sources don't help me enough). How do I use uimove, DECLARE_MODULE, etc properly? How do I use more than one device in one module? Currently I use outb and inb to access the hardware resources. Should newbus be used in FreeBSD 4.x? Another question is the architecure of the device driver. How exactly should the interface to the device be? Currently, I'm thinking of three devices to control the three different parts /dev/led (led), /dev/lcd (lcd) and /dev/abtn (buttons). Ascii numbers should be written to/read from the character devices. Is this the way to do it, or should system calls be used (harder to use in shell scripts) or binary values? Thanks in advance. Willem van Engen See the application panel project at http://willem.n3.net/fujitsu/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message