FreeBSD 4.x kld device driver

[ Available lists | Index of freebsd-hackers | Month of Oct 2000 | Week of 3 Oct 2000 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Willem van Engen <wvengen@stack.nl>
Date
3 Oct 2000 04:00:57
Subject
FreeBSD 4.x kld device driver
Message-ID
39D9BC63.7C7EDD43@stack.nl

Replies

[ Hide this part ]
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 <wvengen@stack.nl>

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



Elapsed time: 0.169 seconds