Subject: Re: SMBus implementation
To: Jason Thorpe <firstname.lastname@example.org>
From: Jared D. McNeill <email@example.com>
Date: 10/27/2005 11:28:29
On Thu, 27 Oct 2005, Jason Thorpe wrote:
> Neither. smbus operations are really just specific i2c sequences, so there
> really doesn't need to be an "smbus" instance at all (since every iic would
> logically have an smbus child -- seems rather pointless).
> So, iic uses indirect config. But, I believe that smbus can actually use
> direct config (isn't there some handshaking method to determine which devices
> are on an SMBus?) If that is the case, then maybe it makes sense to attach
> an smbus instance to an iic instance (iff specified in the kernel config
> file). In that case, then smbus devices would attach to the smbus. The
> iic_smbus_*_byte() helper functions could move into the smbus module, and
> just become smbus_*_byte().
Yeah, you can emumerate devices over SMBus.
> As for the controller interface, just glue an smbus controller in as a
> regular i2c controller, and error out with ENOTSUP if the arguments to the
> "exec" method don't match SMBus's constraints.
So for SMBus host implementations, I only want to implement ic_exec,
right? I can't think of another way to 'read word' :)
>>> There should not be /dev/smb* device nodes, IMO.
>> Agreed, but without support for attaching other devices (where the code
>> is today), not very useful :) It's at least helpful for debugging.
> Let's get the configuration and glue worked out first. Need to figure out
> how it would interact with a hypothetical /dev/i2c*.
> /dev/smb* is the wrong name anyway. If we were to have such devices, they
> should be /dev/smbus*.
Yeah, /dev/smbus* is correct; I only chose /dev/smb* because that's what
FreeBSD (and their tools) use. Easily changed.