From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lee Jones Subject: Re: [PATCH 09/14] i2c: Add Device Tree support to the Nomadik I2C driver Date: Fri, 15 Jun 2012 11:00:25 +0100 Message-ID: <4FDB07B9.5010303@linaro.org> References: <1339428307-3850-1-git-send-email-lee.jones@linaro.org> <1339428307-3850-10-git-send-email-lee.jones@linaro.org> <4FD6F0E8.5040606@linaro.org> <4FD83AAD.2010701@linaro.org> <4FD88761.9050703@linaro.org> <20120614183636.GB30185@sirena.org.uk> <4FDA341C.8010501@linaro.org> <20120615093231.GB3898@opensource.wolfsonmicro.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <20120615093231.GB3898@opensource.wolfsonmicro.com> Sender: linux-kernel-owner@vger.kernel.org To: Mark Brown Cc: Linus Walleij , linus.walleij@stericsson.com, arnd@arndb.de, linux-kernel@vger.kernel.org, grant.likely@secretlab.ca, linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org List-Id: linux-i2c@vger.kernel.org On 15/06/12 10:32, Mark Brown wrote: > On Thu, Jun 14, 2012 at 07:57:32PM +0100, Lee Jones wrote: >> On 14/06/12 19:36, Mark Brown wrote: > >>> You're not understanding Linus' point. The compatible string isn't >>> useful here because properties like the maximum clock rate of the b= us >>> depend on the board design, not the silicon. The controller may be >>> perfectly happy to run at a given rate but other devices on the bus= or >>> the electrical engineering of the PCB itself may restrict this furt= her. > >> And you're not understanding mine. ;) > > I think we are (or at least I do)... > >> You can have multiple compatible strings for a single driver. Which >> one you reference from the Device Tree will dictate which group of >> settings are used, including variation of clock rates. > > I'm certainly well aware of that. The problem is that the compatible > strings should identify a particular IP or piece of silicon and be > unchanging properties of that hardware - for example, working out how > big a FIFO in a device is from the compatible information is totally > sensible and reasonable. Things like the I2C bus clock speed on the > other hand depend not on the individual device but on how it's been > integrated into the system so you'd end up saying things like > "nomadik-i2c-100khz-bus" in the compatible string which isn't great. > > If there's something like variation in the maximum speed that can be > supported by the different silicon the driver handles then working th= at > out from compatible and using it as the default is sensible but that'= s > not the same thing as providing customisation of the system bus > frequency to the user and if there's only one of those two that's > configurable it should be the system bus frequency. All agreed. I think we're singing off the same hymn-sheet here. :) I was just saying that it was possible to pick a selection of=20 configurations from a compatible string alone. I also mentioned that on= =20 reflection it would be neater to specify the properties individually=20 from Device Tree in case of small variations in configuration,=20 preventing us from using compatible strings like the one you mentioned. --=20 Lee Jones Linaro ST-Ericsson Landing Team Lead M: +44 77 88 633 515 Linaro.org =E2=94=82 Open source software for ARM SoCs =46ollow Linaro: Facebook | Twitter | Blog