Subject: Re: i2c
To: None <tech-embed@netbsd.org>
From: Christopher Beck <coffeinkonsumierer@arcor.de>
List: tech-embed
Date: 06/06/2006 14:27:02
Matt Thomas wrote:
> Jachym Holecek wrote:
>> Hello,
>>
>> # 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.
Thanks, I try this i2c_io.h. I didn't want to export devices to 
userland, I only want to access the i2c bus in my own program(s).
Sincerly Yours