Date: Wed, 10 Aug 2005 15:49:44 +0200 From: m.ehinger@ltur.de To: freebsd-questions@freebsd.org Subject: device driver questions Message-ID: <OF56E13744.E2FB5E2A-ONC1257059.004A3435-C1257059.004C02C2@gateway-inter.net>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?OF56E13744.E2FB5E2A-ONC1257059.004A3435-C1257059.004C02C2>