From owner-freebsd-hackers Tue Oct 3 5:23:47 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 116FF37B502 for ; Tue, 3 Oct 2000 05:23:42 -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 CB24A15A06 for ; Tue, 3 Oct 2000 14:23:39 +0200 (CEST) Received: from stack.nl (dhcp6.stack.nl [::ffff:131.155.141.126]) by toad.stack.nl (Postfix) with ESMTP id B27D09717 for ; Tue, 3 Oct 2000 14:23:39 +0200 (CEST) Message-ID: <39D9CFC8.9C53434D@stack.nl> Date: Tue, 03 Oct 2000 14:23:36 +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: Re: FreeBSD 4.x/3.x kld device driver References: <200010031141.e93Bfph06288@mass.osd.bsdi.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG  > > Have a look at the simple device driver I wrote for the Linksys > Gigadrive's front panel LEDs, etc. > > http://people.freebsd.org/~msmith/gigadrive Thanks! I think I'll be able to make a working driver with your code. I'd also like to use it on FreeBSD 3.x. When compiling gigadrive there, the file device_if.h can't be found. Any ideas to solve this? > > This approach should suit you well. I would use a single device node and > a small set of ioctls for your control interface, as this will keep > things simple. You could also use a couple of sysctl nodes (this would > make it possible to talk to it without needing a device node). What would you suggest? I have no idea what's best. > > Let me know if you want more comments on your code... > > > 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 > > > > -- > ... every activity meets with opposition, everyone who acts has his > rivals and unfortunately opponents also. But not because people want > to be opponents, rather because the tasks and relationships force > people to take different points of view. [Dr. Fritz Todt] > V I C T O R Y N O T V E N G E A N C E > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message