Subject: Re: i2c
To: Garrett D'Amore <garrett_damore@tadpole.com>
From: Jachym Holecek <freza@dspfpga.com>
List: tech-embed
Date: 05/31/2006 14:23:51
# Garrett D'Amore 2006-05-31:
> Matt Thomas wrote:
> > Jachym Holecek wrote:
> >> # Christopher Beck 2006-06-05:
> >>> I've seen NetBSD supports i2c, but i don't know how to use it. Is
> >>> there a special Device and/or a lib with that I can acces it? I want
> >>> to connect my Atmels and other NetBSD PCs together (just to give
> >>> commands to other units). Has anyone an idea or a link to a HowTo
> >>> for me?
> >>
> >> Well, ${sys}/dev/i2c/i2c_io.h sketches an ioctl() interface to I2C bus,
> >> but it's not actually exported to userland anywhere (ie. I2C controllers
> >> are not attached to device files), AFAICS. This means that currently,
> >> the I2C API is kernel-only.
> >>
> >> Exposing it to userland shouldn't be hard, please file a PR so that it
> >> doesn't get forgotten (unless you want to implement it yourself ;-).
> >
> > Exporting i2c generically to userland is a bad idea. A suitable
> > abstraction
> > for the device(s) would be designed and implemented instead.

Sure -- I had 1. "rapid prototyping" 2. some more esoteric usage of
i2c in mind.

> Having recently looked at i2c, I agree completely with this.

Well, the i2c_io.h stuff should either be finished or removed, so that
it doesn't confuse people.

	-- Jachym