i2c(8) diagnostic tool for review

Rafal Jaworowski raj at semihalf.com
Mon Dec 8 06:27:57 PST 2008


Stanislav Sedov wrote:
> On Fri, 05 Dec 2008 16:08:44 +0100
> Rafal Jaworowski <raj at semihalf.com> mentioned:
> 
>> This nice little program is helpful with inspecting an I2C bus, when bringing
>> up a new system, or just for diagnostic purposes:
>> http://people.freebsd.org/~raj/patches/misc/i2c.diff
>>
>> Note the patch extends the /dev/iicX interface with a ioctl for the 'repeated
>> start' method.
>>
>> More detailed description of the tool is in the manual page:
>> http://people.freebsd.org/~raj/patches/misc/i2c-man.txt
>>
>> Any comments welcome.
>>
> 
> Great!
> I haven't tried the tool itself yet, but there're some comments for
> the source itself. Hopefully, it'll be useful.

Thanks a lot for the review and comments. We'll try to correct all identified
issues.

[...]

>> +.if ${MACHINE_ARCH} == "arm"
>> +_i2c=          i2c
>> +.endif
> 
> It there any specific reason the utility is limited to arm? I2C interface
> is generic enough, and I think the utility will be useful for other platforms
> as well.

It should work on any platform, actually it was also used on PowerPC MPC85XX
without problems. It's only this current version of the patch that had build
limited to ARM.

Rafal


More information about the freebsd-embedded mailing list