Questions about i2c.c (TMP102 temperature sensor)
Nick Hibma
Nick at ip-knowhow.com
Tue Dec 6 20:53:53 UTC 2016
> I have an updated version of i2c(8) which support I2CRDWR here :
>> https://github.com/evadot/freebsd/tree/i2c_rdrw/usr.sbin/i2c
>>
>> I didn't commit it just because I want to make I2CRDWR the default
>> since there is iicbus_transfer_gen. I just need to make sure that it
>> works almost everwhere (it does on allwinner board where the driver
>> doesn't support I2CRDWR at least).
>>
>> Can you test using i2c(8) from my branch with your device ?
>
> It works on RPi2 with TMP102 attached. Although rdwr is off by default,
> I had to pass -x option to enable that behavior. I went through I2C drivers
> in HEAD and that’s iicbus methods they support (TRANSFER is the name
> of the method for RDWR):
>
> TI: TRANSFER, RESET
> i.MX: START, STOP, REPEATED START, RESET, READ, WRITE, TRANSFER
> Vybrid: START, STOP, REPEATED START, RESET, READ, WRITE, TRANSFER
> Exynos: START, STOP, REPEATED START, RESET, READ, WRITE, TRANSFER
> Allwinner: TRANSFER, RESET
> Tegra: TRANSFER, RESET
> Broadcom: TRANSFER, RESET
> AT91: TRANSFER, RESET
> powerpc/powermac/kiic.c: TRANSFER
> powerpc/mpc85xx/i2c.c: START, STOP, REPEATED START, RESET, READ, WRITE, TRANSFER
> XLR: START, STOP, REPEATED START, RESET, READ, WRITE, TRANSFER
>
> So in theory it should work on all these platforms
Bit banging over the nctgpio GPIO driver in CURRENT is the one I use. It’s part of the AMD SoC package (x86/amd64). I can’t be asked to dig into git to get at the sources, so if someone could send me a tar-ball I can test it here on a PC Engines APU board with .
It guess that bit banging would be a major boost if it works for that because hackers like simple tools like i2c to combine it with rrdtool to graph their whatchamacallits to automate their bing-bong-bang-thingies.
Nick
More information about the freebsd-arm
mailing list