Subject: Re: Private bus spaces
To: None <firstname.lastname@example.org>
From: Manuel Bouyer <email@example.com>
Date: 09/28/1998 14:44:11
On Sep 28, Ignatios Souvatzis wrote
> not really.
> Of course, you could change all architectures bus_space_xxx() installation to
> use a function pointer array, but this is not necessarily wise, as some
> architectures currently can get away with in-line macros for the bus_space
> I'd propose to define an abstract "i2c" bus, which is provided by your bt
> device port driver, or by something else, and provides two access function
> pointers. The chip drivers would then attach to it.
> I did something similar for Dallas Semiconductors chip bus:
> [Here, actually drbbc.c contains the master device defining the ds bus
> as well as the slave device code attached to it, but in a perfect world,
> this would be seperate.]
Actually, NetBSD has a sys/dev/i2c with is used by the thunderlan driver
(if_tl). Maybe you could have a look here too ?
When I wrote this I tried to do something as portable as possible, but
I didn't have much docs on the i2c bus.
Manuel Bouyer, LIP6, Universite Paris VI. Manuel.Bouyer@lip6.fr