From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Likely Subject: Re: [RFC] [PATCH] Device Tree on ARM platform Date: Wed, 27 May 2009 21:21:07 -0600 Message-ID: References: <87vdnm8sec.fsf@macbook.be.48ers.dk> <4A1D6901.2090508@freescale.com> <20090527175609.GB31861@flint.arm.linux.org.uk> <4A1D8FBA.6040802@freescale.com> <9e4733910905271213k7f4b93e7i7e6f2af24d85f@mail.gmail.com> <20090527192116.GA31110@n2100.arm.linux.org.uk> <20090527193927.GD30039@game.jcrosoft.org> <20090527235704.GQ6805@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20090527235704.GQ6805-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-mnsaURCQ41sdnm+yROfE0A@public.gmane.org Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-mnsaURCQ41sdnm+yROfE0A@public.gmane.org To: Robert Schwebel Cc: devicetree-discuss , Russell King - ARM Linux , Janboe Ye , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Timur Tabi , Jon Smirl , Scott Wood , linux-arm-kernel-xIg/pKzrS19vn6HldHNs0ANdhmdF6hFW@public.gmane.org List-Id: devicetree@vger.kernel.org On Wed, May 27, 2009 at 5:57 PM, Robert Schwebel wrote: > On Wed, May 27, 2009 at 02:22:50PM -0600, Grant Likely wrote: >> 2) Driver binding mechanism: =A0device tree nodes usually have a >> "compatible" property which is a list of strings. The first string >> describes exactly what the device is (ie. "atmel,24c08") and an >> optional list of other devices which it is register interface >> backwards compatible with. > > This is a good example. The "exact" description above doesn't say > anything about some of the details the driver needs to know. Here is the > at24 driver: > > http://lxr.linux.no/linux+v2.6.29/include/linux/i2c/at24.h#L18 > > Where do we get the page size & flags from? It is inherent in the value "atmel,24c08". Because the exact device model is specified, the kernel can know what the page size and flags are for that device. OTOH, if it is appropriate for the device, then the binding can be defined to include things like page size and flags encoded explicitly in additional properties. g. -- = Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.