Subject: Re: Private bus spaces
To: None <>
From: Manuel Bouyer <>
List: tech-kern
Date: 09/28/1998 14:44:11
On Sep 28, Ignatios Souvatzis wrote
> Uhm....
> 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
> methods.
> 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:
> sys/dev/ic/ds.h
> sys/arch/amiga/dev/drbbc.c
> [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.