NetBSD Problem Report #47977
From www@NetBSD.org Sun Jun 30 14:51:07 2013
Received: from mail.netbsd.org (mail.netbsd.org [126.96.36.199])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 8087E7170F
for <gnats-bugs@gnats.NetBSD.org>; Sun, 30 Jun 2013 14:51:07 +0000 (UTC)
Date: Sun, 30 Jun 2013 14:51:06 +0000 (UTC)
Subject: [PATCH] usr.sbin/i2cscan: support scans using only 1 byte reads
>Synopsis: [PATCH] usr.sbin/i2cscan: support scans using only 1 byte reads
>Arrival-Date: Sun Jun 30 14:55:00 +0000 2013
>Closed-Date: Wed Jul 10 15:21:11 +0000 2013
>Last-Modified: Wed Jul 10 15:21:11 +0000 2013
>Originator: Thomas Cort
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.
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.
State-Changed-When: Wed, 10 Jul 2013 15:21:11 +0000
Change committed after review and OK from jmcneill@
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.