device driver questions

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


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

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

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



More information about the freebsd-questions mailing list