From owner-freebsd-embedded@FreeBSD.ORG Mon Dec 8 14:27:57 2008 Return-Path: Delivered-To: embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0847106564A; Mon, 8 Dec 2008 14:27:57 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from semihalf.com (semihalf.com [206.130.101.55]) by mx1.freebsd.org (Postfix) with ESMTP id 824168FC1D; Mon, 8 Dec 2008 14:27:57 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from mail.semihalf.com (mail.semihalf.com [83.15.139.206]) by semihalf.com (8.13.1/8.13.1) with ESMTP id mB8ERtd9006951; Mon, 8 Dec 2008 07:27:56 -0700 Message-ID: <493D2EE9.4060808@semihalf.com> Date: Mon, 08 Dec 2008 15:27:53 +0100 From: Rafal Jaworowski Organization: Semihalf MIME-Version: 1.0 To: Stanislav Sedov References: <493943FC.8080001@semihalf.com> <20081206171829.82f0618a.stas@FreeBSD.org> In-Reply-To: <20081206171829.82f0618a.stas@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: embedded@freebsd.org Subject: Re: i2c(8) diagnostic tool for review X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 14:27:57 -0000 Stanislav Sedov wrote: > On Fri, 05 Dec 2008 16:08:44 +0100 > Rafal Jaworowski 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