NetBSD Problem Report #47977

From  Sun Jun 30 14:51:07 2013
Return-Path: <>
Received: from ( [])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "", Issuer "Postmaster" (verified OK))
	by (Postfix) with ESMTPS id 8087E7170F
	for <>; Sun, 30 Jun 2013 14:51:07 +0000 (UTC)
Message-Id: <>
Date: Sun, 30 Jun 2013 14:51:06 +0000 (UTC)
Subject: [PATCH] usr.sbin/i2cscan: support scans using only 1 byte reads
X-Send-Pr-Version: www-1.0

>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:          closed
>Class:          change-request
>Submitter-Id:   net
>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-From-To: open->closed
State-Changed-When: Wed, 10 Jul 2013 15:21:11 +0000
Change committed after review and OK from jmcneill@


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.