From owner-freebsd-hackers Sun Jun 21 03:56:00 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA03465 for freebsd-hackers-outgoing; Sun, 21 Jun 1998 03:56:00 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from hda.hda.com (hda-bicnet.bicnet.net [208.220.66.37]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA03452 for ; Sun, 21 Jun 1998 03:55:22 -0700 (PDT) (envelope-from dufault@hda.hda.com) Received: (from dufault@localhost) by hda.hda.com (8.8.5/8.8.5) id GAA27395; Sun, 21 Jun 1998 06:29:50 -0400 (EDT) From: Peter Dufault Message-Id: <199806211029.GAA27395@hda.hda.com> Subject: Re: I2C bus In-Reply-To: <19980620120606.44000@breizh.prism.uvsq.fr> from Nicolas Souchu at "Jun 20, 98 12:06:06 pm" To: Nicolas.Souchu@prism.uvsq.fr (Nicolas Souchu) Date: Sun, 21 Jun 1998 06:29:49 -0400 (EDT) Cc: dufault@hda.com, freebsd-hackers@FreeBSD.ORG, mbouget@club-internet.fr X-Mailer: ELM [version 2.4ME+ PL25 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > >If someone is interested in working toward a bit-banging (i.e., > >line printer port etc) implementation then they should look at the > >i2cslave code in that tar ball and consider what it would take to > >make a non-blocking state driven master similar to the non-blocking > >state driven slave that it now implements. > > What would be the purpose of such a driver in kernel? > Polling takes all the cpu. We'd like rather have the PCF8584 connected to > the parallel port. No - the support is state machine driven. You call the state machine at a given frequency and it does what it should without hogging the CPU. Using the terminology "polling" and "busy waiting" this software polls but never busy-waits. For the I2C slave you have to call the state machine pretty fast to detect a start condition at full I2C speeds, but a single master such as most people could use wouldn't have that restriction and you could run it at whatever rate you required. You don't have to have special hardware such as the PCF8584 bus controller. The multimedia group already use busy waiting I2C support for talking to tuner chips, EEPROM, etc. Obviously for talking IP over I2C you'll want the hardware support for detecting addressing and serialing the data, but for configuring a tuner or driving an LCD controller a well designed non-blocking master that needs no special hardware would be useful. Peter -- Peter Dufault (dufault@hda.com) Realtime development, Machine control, HD Associates, Inc. Safety critical systems, Agency approval To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message