From owner-freebsd-hackers Thu Aug 13 01:05:40 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA23963 for freebsd-hackers-outgoing; Thu, 13 Aug 1998 01:05:40 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from caladan.tdx.co.uk (caladan.tdx.co.uk [195.188.177.4]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA23958 for ; Thu, 13 Aug 1998 01:05:37 -0700 (PDT) (envelope-from kpielorz@tdx.co.uk) Received: from tdx.co.uk (lorca-tx.tdx.co.uk [195.188.177.242]) by caladan.tdx.co.uk (8.9.1/8.9.1) with ESMTP id JAA02070 for ; Thu, 13 Aug 1998 09:05:06 +0100 (BST) Message-ID: <35D29E32.81A62F7D@tdx.co.uk> Date: Thu, 13 Aug 1998 09:05:06 +0100 From: Karl Pielorz Organization: TDX X-Mailer: Mozilla 4.5b1 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: hackers@FreeBSD.ORG Subject: Device / Driver presentation advice needed... Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi All, I'm now getting on quite well with the device driver I'm writing, but I'm stuck as to how best it is to present the 'device' to the outside world... If I reserve 3 bits of the minor number to indicate the actual card in the system, I can then use the remaining 5 bits to give different 'presentations' of the device (Is this good practice?) The device in question has 8 x 16 bit input registers. I can either let the application software select these via ioctl(), or I can use the minor bits to map out say, /dev/daqb0a /dev/daqb0b ... (With 1 /dev/daqb device for each channel). Latency when switching between channels is fairly high (though exactly how high I haven't measured yet - when you switch channels you have to wait for the hardware to become ready again) Which is the preferred method? - by using the minor bits to map out multiple devices (one per channel) or by making the application issue ioctl()'s to control it? - Or is it just a design decision? Regards, Karl Pielorz To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message