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 89269DDF13 for ; Tue, 3 Jul 2007 09:10:59 +1000 (EST) In-Reply-To: <20070702224643.GA21539@ld0162-tx32.am.freescale.net> References: <00a85f152aa3547f0f0b4acd7954468a@kernel.crashing.org> <20070702224643.GA21539@ld0162-tx32.am.freescale.net> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <0a3d0917402e24efbe6224c544ddd432@kernel.crashing.org> From: Segher Boessenkool Subject: Re: [PATCH] powerpc: Add of_register_i2c_devices() Date: Tue, 3 Jul 2007 01:10:47 +0200 To: Scott Wood 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: , >> AFAIK, i2c is not specified by OF standard. So, we are free to chose >> any >> "compatible" fields for our dts. Which we then would need to match >> against >> drivers. So, why not make this a 1-to-1 match? I.e., >> [OF] [I2C] >> compatible <-> driver_name >> model <-> type > > If we do this, then the compatible field should probably be preceded > with > "linux,", which would get stripped by of_register_i2c_devices(). This > would only be an interim measure until we can figure out some sort of > name registry via power.org. Once that happens, non-"linux," > compatible > fields could be looked up in an OF-to-linux table, or there could be a > way for i2c devices to specify OF matches in addition to driver name. Why even think of doing this? Just put the bloody name of the device in the "compatible" property and match on that. What is so hard about this? If the answer is "the Linux I2C stuff is badly structured", well, you know what to do :-) Segher