Subject: Re: SMBus implementation
To: Jared D.McNeill <jmcneill@invisible.ca>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-kern
Date: 10/26/2005 21:53:07
On Oct 25, 2005, at 4:07 PM, Jared D. McNeill wrote:

> So I was bored, and decided to whip up some SMBus support code.  
> Feedback
> would be great.

"Try again."  :-)

This needs to be done within the context of sys/dev/i2c (which  
already has support for doing smbus operations with "regular" I2C  
interfaces).  If it doesn't integrate with the existing I2C  
framework, it's a non-starter.

There should not be /dev/smb* device nodes, IMO.

>
> What's there:
> 	FreeBSD-compatible /dev/smb* devices.
> 	Support for the VIA VT8235 SMBus controller (on PCI-ISA bridge).
> What's not:
> 	No ability to attach hw drivers to the smbus device.
> 	Maybe tie it in a bit tighter with the i2c stuff?
>
> If you're feeling dangerous, the code is available here:
>     http://www.invisible.ca/~jmcneill/netbsd/smbus/
>
> To use (to -current);
>
> 1. Apply the patch, untar archive into source tree.
> 2. Add the following to your kernel config:
> 	viapcib* at pci? dev ? function ?
> 	smbus*  at viapcib?
> 3. Create devices:
> 	cd /usr/src/etc
> 	make MAKEDEV
> 	cp MAKEDEV /dev
> 	cd /dev
> 	sh MAKEDEV smb
> 4. Install the smbus headers:
> 	cd /usr/src/sys/dev/smbus
> 	make includes
> 5. Grab 'smbmsg' from the FreeBSD source tree. It should compile as- 
> is.
> 6. Start poking around.
>
> I'll hold off on committing this for a while until it's better tested,
> and I hear some feedback telling me where I've gone wrong :)
>
> Cheers,
> Jared

-- thorpej