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 0F939DDE11 for ; Fri, 20 Jul 2007 01:32:19 +1000 (EST) In-Reply-To: References: <00a85f152aa3547f0f0b4acd7954468a@kernel.crashing.org> <2055bb54b9816faaf5b2ceedc9cfa039@kernel.crashing.org> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <87DC7695-382B-4641-B9D9-75ACB49D41A4@kernel.crashing.org> From: Segher Boessenkool Subject: Re: [PATCH] powerpc: Add of_register_i2c_devices() Date: Thu, 19 Jul 2007 17:32:10 +0200 To: Guennadi Liakhovetski Cc: linuxppc-dev@ozlabs.org, Paul Mackerras List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , >> Your device is an rs5c372b. So, that's what you put in >> your device tree. Simple so far, right? >> >> Now some OF I2C code goes looking for IIC devices in the >> device tree. It finds this thing, and from a table or >> something it derives that it has to tell the kernel I2C >> layer this is an "rtc-rs5c372". [It would be nicer if it >> could just instantiate the correct driver directly, but >> if that's how the Linux I2C layer works, so be it]. >> >> No change in the I2C "core" needed, just an OF "compatible" >> matching thing like is needed *everywhere else* too. > > How about the patch below? Looks good. It should later be moved to a more generic I2C OF matching layer, but fine for now. Thanks! You might want to put vendor names in the "compatible" entries, dunno though, maybe these are "cross-vendor" ICs? Segher