From owner-freebsd-arch@FreeBSD.ORG Thu Jan 15 18:09:00 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07ADB10656C4 for ; Thu, 15 Jan 2009 18:09:00 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id BB7018FC18 for ; Thu, 15 Jan 2009 18:08:59 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n0FI7vIU074843; Thu, 15 Jan 2009 11:07:58 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 15 Jan 2009 11:08:24 -0700 (MST) Message-Id: <20090115.110824.298933043.imp@bsdimp.com> To: stb@lassitu.de From: "M. Warner Losh" In-Reply-To: References: <496C8C6A.2030708@icyb.net.ua> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: avg@icyb.net.ua, freebsd-arch@freebsd.org Subject: Re: smb(4): address format X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2009 18:09:00 -0000 In message: Stefan Bethke writes: : Am 13.01.2009 um 13:43 schrieb Andriy Gapon: : : > So, in practice, there two conventions of specifying a slave address: : > either as 0XXXXXXXb or XXXXXXX0b. : : Device datasheets generally specify the hard-wired or configurable : address as a bit string, with a slight preference to format that as : bbbb bbb. : : > In wider world 0XXXXXXXb format seems to be preferred, Linux also : > sticks : > to it. : : I personally find having the address right-aligned a sensible choice. : I think of the address as logical unit, and normally would rather have : the SMBus bit banging abstracted away by the driver/hardware. The format that is preferred on FreeBSD is xxxxxxxx0b. That's the format that the existing IIC bridge drivers use and deal with. I've not looked at the SMB drivers, but I went through all the iic bridge drivers in the 6.x time frame and made sure they were all consistent. If I missed the smb drivers, that's my bad. I could find no evidence that there was a format that was more preferred apart from the dozen data sheets that I'd read at the time which used the xxxxxxx0b. Warner