NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/47977: [PATCH] usr.sbin/i2cscan: support scans using only 1 byte reads



>Number:         47977
>Category:       bin
>Synopsis:       [PATCH] usr.sbin/i2cscan: support scans using only 1 byte reads
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 30 14:55:00 +0000 2013
>Originator:     Thomas Cort
>Release:        
>Organization:
>Environment:
>Description:
With some ARM SoCs, dm37xx (BeagleBoard-xM) for example, 0 byte writes (i.e. 
quick writes) on the i2c bus are not supported. With the dm37xx in particular, 
it treats an I2C_CNT value of 0 as 65536. The i2cscan program uses 0 byte 
writes to probe devices in almost all of the slave address ranges. The driver 
for the dm37xx (src/sys/arch/arm/omap/omap3_i2c.c) returns EINVAL when a zero 
byte write is attempted. This means that a lot of devices go undetected by 
i2cscan on boards that don't support 0 byte writes.
>How-To-Repeat:

>Fix:
The Linux equivalent of i2cscan (i2cdetect from i2c-tools) provides a '-r' 
command line option to scan using 1 byte reads. The patch linked to below 
enables similar functionality in i2cscan. The '-r' command line option will 
cause all probes to be 1 byte reads. There is a second patch to update the man 
page.

http://tomcort.com/netbsd/i2cscan.c.patch
http://tomcort.com/netbsd/i2cscan.8.patch



Home | Main Index | Thread Index | Old Index