Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753566AbaBYTyn (ORCPT ); Tue, 25 Feb 2014 14:54:43 -0500 Received: from mail-vc0-f180.google.com ([209.85.220.180]:57488 "EHLO mail-vc0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752585AbaBYTyl (ORCPT ); Tue, 25 Feb 2014 14:54:41 -0500 MIME-Version: 1.0 In-Reply-To: <20140221153239.20dbb8c2@alan.etchedpixels.co.uk> References: <15eccfa508fd0f55230c4274e3e968f91a123b73.1387588711.git.luto@amacapital.net> <20140219151626.GA13973@katana> <20140219192646.1a62521d@alan.etchedpixels.co.uk> <20140221153239.20dbb8c2@alan.etchedpixels.co.uk> From: Andy Lutomirski Date: Tue, 25 Feb 2014 11:54:20 -0800 Message-ID: Subject: Re: [PATCH v6 4/4] i2c, i2c_imc: Add DIMM bus code To: One Thousand Gnomes Cc: Wolfram Sang , "linux-i2c@vger.kernel.org" , Jean Delvare , Guenter Roeck , "linux-kernel@vger.kernel.org" , Mauro Carvalho Chehab , Rui Wang Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 21, 2014 at 7:32 AM, One Thousand Gnomes wrote: >> I'm suggesting identifying a range of addresses on a bus with a "port" >> (or whatever it should be called). Multiple ports could claim >> non-overlapping ranges on the same bus. > > Which is fine until you meant a mux or a device that can be moved about > by writing to it, or has a wide range of addresses determined by > strapping. For muxes: isn't there already a system in place for dealing with them? For things with addresses determined by strapping: my vague proposal is explicitly intended to support them. (DIMMs are such a device.) Whoever instantiates the i2c "ports" is supposed to *know* the topology, including which straps are set where. In some cases, that data could come from ACPI or DT. In other cases, it's enumerated directly. The idea would be to allow the code that figures out the topology (both physical connectivity and straps) to be separated from the code that talks to the i2c endpoints. Just specifying the address ranges might be insufficient for things that are more flexible than DIMMs, though -- it might be necessary to say "this port has these addresses and this kind of device lives at this address". --Andy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/