From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id 93237DDF09 for ; Tue, 3 Jul 2007 10:43:00 +1000 (EST) Subject: Re: [PATCH] powerpc: Add of_register_i2c_devices() From: Benjamin Herrenschmidt To: Segher Boessenkool In-Reply-To: <00a85f152aa3547f0f0b4acd7954468a@kernel.crashing.org> References: <00a85f152aa3547f0f0b4acd7954468a@kernel.crashing.org> Content-Type: text/plain Date: Tue, 03 Jul 2007 10:42:49 +1000 Message-Id: <1183423369.10386.49.camel@localhost.localdomain> Mime-Version: 1.0 Cc: linuxppc-dev@ozlabs.org, Paul Mackerras , Guennadi Liakhovetski List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, 2007-07-02 at 14:03 +0200, Segher Boessenkool wrote: > > + while ((node = of_get_next_child(adap_node, node))) { > > of_for_each_child_node() or whatever it is called? > > > + addr = of_get_property(node, "reg", &len); > > + if (!addr || len < sizeof(int) || *addr > 0xffff) > > + continue; > > Addresses aren't 16 bit AFAIK? Some i2c busses support 10 bits addressing... Ben.