IIC support?

Krassimir Slavchev krassi at bulinfo.net
Tue Mar 6 16:09:15 UTC 2007


M. Warner Losh wrote:
> In message: <45EC2BF9.2000804 at bulinfo.net>
>             Krassimir Slavchev <krassi at bulinfo.net> writes:
> : M. Warner Losh wrote:
> : > In message: <45EC2667.9040004 at bulinfo.net>
> : >             Krassimir Slavchev <krassi at bulinfo.net> writes:
> : > : Warner Losh wrote:
> : > : >> I have problems to access the iic eeprom from userland. Even after set 
> : > : >> SCAN_IICBUS in iicbus.c nothing has been detected. I have made some 
> : > : >> tests from the bootloader to read/write from/to the eeprom and they work.
> : > : >> Is there any known problems with TWI or any differences between board 
> : > : >> settings?
> : > : >>     
> : > : >
> : > : > The IIC bus is not a self enumerating bus.  Bad things happen when you
> : > : > go out and try to 'probe' it, although often you can get away with
> : > : > that.  FreeBSD takes a conservative approach.  You need hints for each
> : > : > iic device on bus that you have on your board.
> : > : >
> : > : >   
> : > : Ok, that was just for testing.
> : > : 
> : > : I am trying to write a driver for pcf8563 (RTC similar to ds1672) but 
> : > : when I call the iicbus_transfer() function the iicbus_transfer_gen() is 
> : > : called instead of at91_twi_transfer().
> : > : In the kernel config file I have:
> : > : ...
> : > : device   at91_twi
> : > : device   iicbus
> : > : ...
> : > : 
> : > : Is this correct or I miss something else?
> : >
> : > Should be correct.  What version of FreeBSD are you using?
> : >   
> : 7.0-CURRENT, 2 days old
>
> OK.  I'll take a look to see if there are unmerged patches from p4.
> I'm nearly positive that I fixed this...
>
>   
When iicbus_transfer() is called with parent device then the right 
function is called.
If this is correct then ds1672 and ad7418 drivers should be corrected.

> Warner
>
>   
Best Regards



More information about the freebsd-arm mailing list