device driver questions

m.ehinger at ltur.de m.ehinger at ltur.de
Wed Aug 10 13:50:21 GMT 2005


Hi,

i try to write an device driver for Accelerometer in the Thinkpad T series. There is an Linux driver already which i ported to
FreeBSD.

So far i got a working version which returns some useful information.

What i want to know is which is the correct way to allocate io ports? I saw some drivers using "bus_alloc_resource" and some use
"bus_space_map".

What is the safest way to read/write to an io port? Simply "inb/outb" or "bus_space_write_N/bus_space_read_N" ?

Any help would be appreciated

Thanks

Maik



More information about the freebsd-questions mailing list